[Bug bootstrap/31523] bootstrap xgcc internal compiler error (using -O3)
--- Comment #12 from anirkko at insel dot ch 2007-05-07 10:29 --- (In reply to comment #10) ... Yes, I'm going to reopen it, but I'm not sure someone will tackle it. The culprit is -finline-functions: The gcc man page says -O3 adds only 3 additional options. My bootstrapping script tells me the bug is in -finline-functions. Base compiler = gcc-4.1.2 (itself built without error using -O2), target compiler also gcc-4.1.2, when using -finline-functions as bootflags, the bootstrapped xgcc fails with an ICE at exactly the same place as originally reported above. Should -finline-functions be excluded from the default -O3 options? (until mended. If it can't be trusted building the comopiler, can it be trusted for anything else?) keywords added: build (problem occurs during bootstrap) wrong-code (compiles and links xgcc, but then xgcc fails later) ice-on-valid-code (the xgcc above fails with ICE during the build) -- anirkko at insel dot ch changed: What|Removed |Added Keywords||build, ice-on-valid-code, ||wrong-code http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31523
[Bug bootstrap/31523] bootstrap xgcc internal compiler error (using -O3)
--- Comment #13 from anirkko at insel dot ch 2007-05-07 10:33 --- (In addition to comment #12) PS: The above was done on sparcv9 (UltraSparc-III) with Solaris 8. Thus, the bug is confirmed on several machines with several versions of Solaris and several versions of binutils (2.14 and 2.17) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31523
[Bug bootstrap/31523] bootstrap xgcc internal compiler error (using -O3)
--- Comment #11 from anirkko at insel dot ch 2007-04-30 09:41 --- (In reply to comment #10) Therefore, I still think there is a bug in -O3. (alternatively, in the combination of the two). Would you consider reopening this bug if it was -O3? (In this case, I might re-run the bootstrap with only '-O3', next weekend). Yes, I'm going to reopen it, but I'm not sure someone will tackle it. Testing several combinations, it turns out the bug is indeed in '-O3' alone: Machine: Ultrasparc Base compiler: gcc-4.1.2 (bootstrapped with -O2) Using this setup, bootstrapping -works with '-O2' -works with '-O2 -mcpu=supersparc -no-app-regs' -FAILS with '-O3' -FAILS with '-O3 -mcpu=supersparc -no-app-regs' (exactly same ICE as reported in the first place, above) Thus, it is reproduced several times, both with gcc-3.4.3 and gcc-4.1.2 itself as base compiler. Would it help to individually test the various sub-options that -O3 switches on? If you could give me these sub-options ranked according to 'suspectedness' then I could run the script to test them one by one. Reason: if the responsible sub-option is identified, it could be discarded from the -O3 defaults for being tested and found unsafe, even if no one has time to tackle/mend it. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31523
[Bug bootstrap/31523] bootstrap xgcc internal compiler error (using -O3)
--- Comment #9 from anirkko at insel dot ch 2007-04-23 11:35 --- (In reply to comment #8) The bootstrap works fine with all flags equal to '-O2' Great, thanks for the confirmation. Still worrysome, because somewhere in the installation instructions, it is recommended to bootstrap the compiler with the flags one intends to later use it with. Please point me to this and I'll immediately propose to delete it. 99% of the testing of the compiler is done with the default bootstrap settings. Does it mean the offending flag is broken and should never be used at all? -mcpu=supersparc is totally untested these days so bugs can be expected, yes. Please point me to this... It is in the main directory, file FAQ, section Optimizing the compiler itself: If you want to test a particular optimization option, it's useful to try bootstrapping the compiler with that option turned on. But please don't let this be removed, because 1) I find the suggestion useful, and it seems to somewhat parallel the reason why you want the compiler bootstrap itself through all stages in the first place: to make sure it can compile itself. Likewise, if it can compile itself reproducibly through the bootstrap using different options, you have made sure these options are pretty well tested for real code by the time you have the compiler finished 2) You closed this bug on the premises that -mcpu=supersparc is the culprit. Well, it isn't: I now bootstrapped with '-O2 -mcpu=supersparc' and everything went fine! Therefore, I still think there is a bug in -O3. (alternatively, in the combination of the two). Would you consider reopening this bug if it was -O3? (In this case, I might re-run the bootstrap with only '-O3', next weekend). -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31523
[Bug bootstrap/31523] bootstrap xgcc internal compiler error (using -O3)
--- Comment #10 from ebotcazou at gcc dot gnu dot org 2007-04-23 11:55 --- It is in the main directory, file FAQ, section Optimizing the compiler itself: If you want to test a particular optimization option, it's useful to try bootstrapping the compiler with that option turned on. OK, but note that it's quite different from what you said. First, it's not recommended, it's useful to try. Second, it's only for *testing* the option, not for production use. 1) I find the suggestion useful, and it seems to somewhat parallel the reason why you want the compiler bootstrap itself through all stages in the first place: to make sure it can compile itself. Likewise, if it can compile itself reproducibly through the bootstrap using different options, you have made sure these options are pretty well tested for real code by the time you have the compiler finished OK, that makes sense. Therefore, I still think there is a bug in -O3. (alternatively, in the combination of the two). Would you consider reopening this bug if it was -O3? (In this case, I might re-run the bootstrap with only '-O3', next weekend). Yes, I'm going to reopen it, but I'm not sure someone will tackle it. -- ebotcazou at gcc dot gnu dot org changed: What|Removed |Added Status|RESOLVED|UNCONFIRMED Resolution|WONTFIX | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31523
[Bug bootstrap/31523] bootstrap xgcc internal compiler error (using -O3)
--- Comment #7 from anirkko at insel dot ch 2007-04-18 14:24 --- (In reply to comment #2) Can you try without setting the CFLAGS, etc. because what might be happening is the base compiler miscompiling the new compiler? The bootstrap works fine with all flags equal to '-O2' Still worrysome, because somewhere in the installation instructions, it is recommended to bootstrap the compiler with the flags one intends to later use it with. Sometime, will try to find out whether the offending flag is -O3 or -mcpu=supersparc. Does it mean the offending flag is broken and should never be used at all? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31523
[Bug bootstrap/31523] bootstrap xgcc internal compiler error (using -O3)
--- Comment #8 from ebotcazou at gcc dot gnu dot org 2007-04-18 14:35 --- The bootstrap works fine with all flags equal to '-O2' Great, thanks for the confirmation. Still worrysome, because somewhere in the installation instructions, it is recommended to bootstrap the compiler with the flags one intends to later use it with. Please point me to this and I'll immediately propose to delete it. 99% of the testing of the compiler is done with the default bootstrap settings. Does it mean the offending flag is broken and should never be used at all? -mcpu=supersparc is totally untested these days so bugs can be expected, yes. -- ebotcazou at gcc dot gnu dot org changed: What|Removed |Added Status|WAITING |RESOLVED Resolution||WONTFIX http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31523
[Bug bootstrap/31523] bootstrap xgcc internal compiler error (using -O3)
--- Comment #3 from ebotcazou at gcc dot gnu dot org 2007-04-16 07:00 --- Do really have a SuperSPARC? If no, remove the -mcpu=supersparc option, it is totally untested these days. If so, I'd suggest to stick with a 3.x compiler on this presumably old machine. -- ebotcazou at gcc dot gnu dot org changed: What|Removed |Added CC||ebotcazou at gcc dot gnu dot ||org Status|UNCONFIRMED |WAITING http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31523
[Bug bootstrap/31523] bootstrap xgcc internal compiler error (using -O3)
--- Comment #4 from anirkko at insel dot ch 2007-04-16 09:15 --- (In reply to comment #2) Can you try without setting the CFLAGS, etc. because what might be happening is the base compiler miscompiling the new compiler? Tried something slightly different: because this happened in C++, I bootstrapped gcc-4.1.2 with lang=C,ada and it worked fine, error-free, including passing the stage2 comparison passed. The resulting gcc-4.1.2 should now be enough to use as base compiler to build everything else, including c++. When doing this (same flags and options), I got exactly the same internal compiler error again. Thus, both the base compiler gcc-3.4.3 and gcc-4.1.2 lead to the same error. Will try next without -O3 and other flags to see if one of these generate the error. -- anirkko at insel dot ch changed: What|Removed |Added CC||anirkko at insel dot ch http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31523
[Bug bootstrap/31523] bootstrap xgcc internal compiler error (using -O3)
--- Comment #5 from anirkko at insel dot ch 2007-04-16 09:21 --- (In reply to comment #3) Do really have a SuperSPARC? If no, remove the -mcpu=supersparc option, it is totally untested these days. If so, I'd suggest to stick with a 3.x compiler on this presumably old machine. Several machines from SuperSPARC 110 MHz to multi-CPU UltraSPARC-III 1.3 GHz, and even the SuperSPARCs still work better than the average PC. Some old SBUS hardware only works with the old machines. I like to have the same gcc binary running on all machines, which will also produce binaries that will run on all machines from Solaris 2.6 to Solaris 10. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31523
[Bug bootstrap/31523] bootstrap xgcc internal compiler error (using -O3)
--- Comment #6 from ebotcazou at gcc dot gnu dot org 2007-04-16 09:59 --- Will try next without -O3 and other flags to see if one of these generate the error. Most likely I'd say. I happen to regularly bootstrap GCC 4.1.x with GCC 3.4.3 and the default options on Solaris 2.5.1 and 2.6 UltraSPARC machines and this works flawlessly: http://gcc.gnu.org/ml/gcc-testresults/2007-02/msg00700.html http://gcc.gnu.org/ml/gcc-testresults/2007-02/msg00578.html -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31523
[Bug bootstrap/31523] bootstrap xgcc internal compiler error (using -O3)
--- Comment #1 from anirkko at insel dot ch 2007-04-13 22:46 --- *** Bug 31565 has been marked as a duplicate of this bug. *** -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31523
[Bug bootstrap/31523] bootstrap xgcc internal compiler error (using -O3)
--- Comment #2 from pinskia at gcc dot gnu dot org 2007-04-13 22:47 --- Can you try without setting the CFLAGS, etc. because what might be happening is the base compiler miscompiling the new compiler? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31523