This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug optimization/12209] [3.4 Regression] GCC fails to bootstrap Cygwin with -funit-at-a-time


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12209



------- Additional Comments From kcook at gcc dot gnu dot org  2003-09-17 18:02 -------
Created an attachment (id=4776)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=4776&action=view)
cgraph dump from loop.c with "-O2 -g -funit-at-a-time -da" specified

Some further investigation reveals that Andrew is correct, the loop-optimzier
is not behaving poorly with UAT, it is actually loop.c that is being
miscompiled when "-funit-at-a-time" is enabled.

I deduced this by make CFLAGS="-O2 -fno-unit-at-a-time -g -da" loop.o moving
off the resulting files and then with make CFLAGS="-O2 -funit-at-a-time -g -da"
loop.o and looking at each.

Note that compiling just loop.c with -fno-unit-at-time allows the rest of the
compiler to be built.

I also compiled loop.c at "-O0" with and without "-funit-at-a-time", both of
these do work fine.

I can get some more attempt to get more details if asked, but the problem I am
having is that even the initial loop.c.00.rtl dumps are completely different
depending on whether "-funit-at-a-time" is on or off.  So I can't easily tell
what is different between the two.

The one thing I did notice, though I profess to having no idea how cgraph works
is that that in the "-O2 -funit-at-a-time dump" of loop.c.00.cgraph, scan_loop
ends up with no callers in the final cgraph dump.  I think this is wrong as it
is still called by loop_optimize even though cgraph decided to inline the
entire thing.  

The inital bug report was that the compiler will ICE basically right when it
attempts to call scan_loops, so my guess is that this is where the problem
happens.

I have attached that cgraph dump file.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]