This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/42631] [4.5 Regression] "-fcompare-debug failure" with "-O1 -funroll-loops"
- From: "aoliva at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Jan 2010 05:27:10 -0000
- Subject: [Bug rtl-optimization/42631] [4.5 Regression] "-fcompare-debug failure" with "-O1 -funroll-loops"
- References: <bug-42631-14164@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #12 from aoliva at gcc dot gnu dot org 2010-01-08 05:27 -------
It is a bug. The compiler shouldn't generate different code depending on -g,
and that's what's (potentially) going on here. That the code is undefined per
a language standard shouldn't take precedence over a more general design
principle in GCC: we should still emit the same code, crash or exhibit
otherwise undefined behavior in just the same way. Surely you wouldn't like to
have a surprise such as finding out the crash or the bug you're hunting
disappears when you recompile the program with -g, would you? That's the kind
of bug that -fcompare-debug is designed to catch, and that's what it just did.
Now, since leaving the bug in *would* do harm (as above), the question is
whether to fix it in DF or in web. I'm ambivalent, but I'd rather not put time
into either one if it's going to be rejected in favor of the other.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42631