Since I don't think the people at gcc-bugs.org support Red Hat's gcc 2.96-54, and because I've made more good than bad experience with that particular snapshot, I post this here... The following code fails to compile. Apparently, without any reason. http://sourceforge.net/projects/sidplay2/ [snip] make[1]: Entering directory /home/ms/files/source/sidplay2/libsidplay-20001020/src' c++ -DHAVE_CONFIG_H -I. -I. -I.. -I/home/ms/files/source/sidplay2/resid-0.9 -g -O2 -c sidplayer.cpp sidplayer.cpp: In method void sidplayer_pr::envReset ()': sidplayer.cpp:583: Internal compiler error in expand_shift, at expmed.c :2026 Please submit a full bug report. See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions. make[1]: *** [sidplayer.o] Error 1 make[1]: Leaving directory /home/ms/files/source/sidplay2/libsidplay-20001020/src' make: *** [all-recursive] Error 1 The code fragment in question is this: void sidplayer_pr::evalBankSelect (ubyte_sidt data) { // Determine new memory configuration. isBasic = ((data & 3) == 3); isIO = ((data & 7) > 4); isKernal = ((data & 2) != 0); // *** this is line 583, isKernal is bool _bankReg = data; #ifdef DEBUG ram[1] = data; #endif // DEBUG }
Bugzilla messed up the formatting. Think of line 583 as two separate lines in order to avoid any misunderstanding: isKernal = ((data & 2) != 0); // *** this is line 583, isKernal is bool
Can you please rerun the command with additional -save-temps -v options and post here its output and resulting .ii file? Code fragments are not very useful for reproducing bugs... Thanks.
Created attachment 4469 [details] the requested .ii file and typescript
Btw, no such error if it's compiled _without_ -O, -O2, or higher, respectively.
Fix posted to gcc-patches, if it is accepted, will make it into rawhide and upcoming gcc errata. Thanks for the report.
Fixed in gcc-c++-2.96-63 in rawhide.