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

lcc: compiler hangs on simple statement #77

Open
kervinck opened this issue May 27, 2019 · 2 comments
Open

lcc: compiler hangs on simple statement #77

kervinck opened this issue May 27, 2019 · 2 comments

Comments

@kervinck
Copy link
Owner

$ cat hang2.c
int f(int c)
{ 
  if (c == -1)
    return 0;
}
$ make hang2.gt1
Utils/lcc/build/lcc -ILibs -c hang2.c -o hang2.o
hang2.c:5: warning: missing return value
Assertion failed: (offset < 0x10000lu), function local, file ./build/gt1.c, line 4435.
Utils/lcc/build/lcc: fatal error in Utils/lcc/build/rcc
make: *** [hang2.o] Error 1
$

Similar to #76 but not the same.

@kervinck
Copy link
Owner Author

kervinck commented Jun 4, 2019

This is in fact the same type of register spilling issue as #76. We can solve it with #76, or workaround it by replacing SUBW with XORW for the relational operator (this could be part of #64).

@lb3361
Copy link
Contributor

lb3361 commented Aug 25, 2022

This issue should be closed since glcc fixes it.

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

No branches or pull requests

2 participants