When compiling sdcc 3.0.0 with gcc 4.6.0, gcc goes into an infinite loop. This patch turns off gcc optimisation in the problematic function.
Workaround gcc 4.6.0 infinite loop
Sdcc HEAD compiles without problems with gcc 4.6.0 and 4.6.1 mingw cross compiler and with gcc 4.6.0 on sparc and x86 Solaris. Can you please provide some more info on which platform you encountered the problem, how you compiled (or where did you get) the gcc compiler, which options you used to compile sdcc...
The problem was encountered when building in Fedora 15 and Fedora 16 (rawhide) on x86_64. The gcc was the version current in these versions of Fedora on 22 Mar 2001. The problem involves optimization at -O2. The patch turns off gcc optimization for the offending function and then turns it back on after the function. The SDCC source used was sdcc-src-3.0.0.tar.bz2
Fixed in svn revision #6769.
This seems to be Linux native x86 specific gcc bug: even on Linux x86_64 it works.
This bog should be reported to gcc bug tracker.
Has anyone reported this bug to the gcc developers?
I haven't. It needs some work to minimize the case...
I minimased ths case and submitted the gcc bug: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52653
I'm not sure if this is the only problem, since the submitted bug hangs the gcc compiler regardless of the optimization level, whilst the sdcc compilation hangs only with optimization -O2.
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.