I get a "undefined reference to `.LL226'" error when compiling RCS with -O2 on sparc using gcc 4.2. This problem goes away when I use -O2. The assembler output shows that .LL226 is referenced but not defined anywhere. I'll attach the .i file and the .s file with -O1 (works) and -O2 (fails). Unfortunately I don't have a smaller test case.
> Automatic build of rcs_5.7-18 on bilbao by sbuild/sparc 85 ... > gcc -O2 -g rlog.o rcslex.o rcsmap.o rcssyn.o rcsrev.o rcsutil.o maketime.o > partime.o rcstime.o rcsf nms.o rcskeep.o rcskeys.o version.o -o rlog > rlog.o: In function `getrevpairs'://build/tbm/rcs-5.7/src/rlog.c:1214: > undefined reference to `.LL226' > ://build/tbm/rcs-5.7/src/rlog.c:1214: undefined reference to `.LL226' > ://build/tbm/rcs-5.7/src/rlog.c:1217: undefined reference to `.LL226' > ://build/tbm/rcs-5.7/src/rlog.c:1218: undefined reference to `.LL226' > ://build/tbm/rcs-5.7/src/rlog.c:1218: undefined reference to `.LL226' > collect2: ld returned 1 exit status > make[2]: *** [rlog] Error 1 -- Summary: [4.2 regression] sparc: undefined reference to .LL226 with -O2 Product: gcc Version: 4.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: tbm at cyrius dot com GCC build triplet: sparc-linux-gnu GCC host triplet: sparc-linux-gnu GCC target triplet: sparc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27531