Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ppci-cc: a function declared in another function definition makes the IR generator crash #88

Open
tstreiff opened this issue Jun 14, 2020 · 0 comments

Comments

@tstreiff
Copy link
Contributor

tstreiff commented Jun 14, 2020

void exit(int);
int main() {
exit(1);
}

is compiled and executed correctly.

int main() {
void exit(int);
exit(1);
}

raises an exception in the front-end

File "/home/tsf/sandbox/ppci/ppci/lang/c/codegenerator.py", line 1373, in gen_variable_access
value = self.ir_var_map[declaration]
KeyError: Function storage=None typ=Function-type name=exit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant