Closed Bug 237594 Opened 21 years ago Closed 17 years ago

Need configure.in test to check whether gcc breaks with certain optimizer switches

Categories

(SeaMonkey :: Build Config, defect)

All
Linux
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: roland.mainz, Assigned: ajschult784)

References

Details

Attachments

(1 file, 1 obsolete file)

[Follow-up of bug 233497] We need configure.in test to check whether the gcc compiler generates wrong code when certain optimisation switches like -Os are set. From bug 233497: -- snip -- -- Additional Comment #39 From Andrew Schultz 2004-03-11 12:36 PST [reply] jakub@redhat.com pointed to http://gcc.gnu.org/PR12308 and said the next Fedora gcc RPMs would have the fix. Based on my limited understanding of the bug @gcc.org, the optimization flags that are triggering the bug here probably just set up the proper environment for the bug to occur. For instance, the testcase @gcc.org has the bug with -O2. -fno-gcse might or might not resolve all symptoms of the bug. It might be worthwhile build a custom gcc so that at least mozilla.org's binaries work ok. I'll test out the dbaron's Mozilla patch and the gcc patch tonight. Also, gcc-3.2.3-24 is not affected by this bug (at least not my testcase), so any configure.in test could be confined to gcc > 3.2 -- Additional Comment #40 From David Baron 2004-03-11 12:46 PST [reply] If there's a relevant compiler bug that we can detect with a configure.in test, we should do it (the test should fail and tell people what options to use instead). (We already have a test for a long long bug with gcc 2.7.x that shows up with --enable-pedantic.) Also, -O2 apparently does -fgcse as well. -- snip -- Testcase program can be found under http://bugzilla.redhat.com/bugzilla/attachment.cgi?id=98452&action=edit
Requesting "blocking 1.7b" status, IMHO we should stop distributors from shooting themselvs into the feet... malfunction builds usually result in bad press and worse...
Flags: blocking1.7b?
I'm not the person to do this, since I'm not set up to simplify the testcase that shows the problem.
Assignee: dbaron → nobody
ajschult: can you make a simplified testcase for configure.in, please ?
Attached patch patch (obsolete) — Splinter Review
testcase taken from http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12308#c0 the testcase I attached to Red Hat's bugzilla did not trigger the bug on gcc 3.4 while the one at gnu.org did trigger it with gcc 3.4. with the patch, configure bails if the bug occur and instrusts the user to recompile with -fno-gcse.
Assignee: nobody → ajschult
Status: NEW → ASSIGNED
Attachment #144023 - Flags: review?(bryner)
+yes) + AC_MSG_ERROR([Your compiler appears to have a known bug where when using -Os. Reconfigure using --fno-gcse. ]) + ;; Perhaps the warning should be differently worded? ("...where when...")
thanks Andreas
Attachment #144023 - Attachment is obsolete: true
Andrew Schultz: Is the test specific for gcc or for all compilers ? I suggest to make the test mandatory for all compilers on Unix/Linux... maybe some day we're thankfull that the test found a problem before someone had to sacrify a weekend with debugging...
> Is the test specific for gcc or for all compilers ? I suggest to make the test The check is performed for all compilers on all platforms... > mandatory for all compilers on Unix/Linux... maybe some day we're thankfull that > the test found a problem before someone had to sacrify a weekend with > debugging... well, chances would be exceedingly low that the same exact bug would show up on another compiler using that exact testcase -- and if it did, -fno-gcse would be no help. And we can't exactly include a C/C++ test suite in configure.in.
I think this is the wrong approach. Sorry, there are many cases where people have had to find workaround in the code for compiler bugs. Just turning off gcse or other optimizations should be avoided, especially for all Unix compilers, as if they all had the same bugs, or were equally buggy. Roland, you can spend your weekends however you like, but we'll thank you if you help isolate the code that's being miscompiled and develop a better workaround. If you don't have the time, that's ok -- but someone else may, and deoptimizing whole files is not the right first, or second, or even third answer. /be
Flags: blocking1.7b?
Flags: blocking1.7b-
Flags: blocking1.7?
Attachment #144023 - Flags: review?(bryner)
Flags: blocking1.7? → blocking1.7-
Product: Browser → Seamonkey
Andrew, Are you still working on this ?
No, this seems to be WONTFIX. The buggy compilers are probably unused at this point anyway.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: