Closed rtjoa closed 4 months ago
I think the issue is with the load function, which returns something but doesn't declare a return type. I get errors when I try to interpret calls to load
in a main that doesn't take a pointer param.
If I add the following test to eggcc it passes:
@load(p: ptr<int>): int {
v: int = load p;
ret v;
}
@main() {
one: int = const 1;
p: ptr<int> = alloc one;
store p one;
v: int = call @load p;
free p;
print v;
}
Thoughts @rtjoa?
Oops, you're right. Closing
The following program panics with RunType
egglog
:with this message:
I think we see the problem - that a function returning a loaded value doesn't return a state edge - when we print this simple program as RVSDG: