This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/53239] New: [4.7 Regression] -ftree-vrp breaks min()
- From: "proski at gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 04 May 2012 21:40:50 +0000
- Subject: [Bug c++/53239] New: [4.7 Regression] -ftree-vrp breaks min()
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53239
Bug #: 53239
Summary: [4.7 Regression] -ftree-vrp breaks min()
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: proski@gnu.org
GNU Lilypond is miscompiled on Fedora 17. It manifests as a failure to process
any non-trivial input. Both i386 and x86_64 are affected.
$ gcc --version
gcc (GCC) 4.7.0 20120502 (Red Hat 4.7.0-3)
It turns out that adding -fno-tree-vrp fixes the problem. A call to min() is
affected. Comparing the assembly output without and with -fno-tree-vrp shows
that the generated assembly code wrongly eliminates a conditional register move
after calling the compare (_ZN6Moment7compareERKS_S1_) function.
The attached file was generated on i386.
Credit for finding a problem in the assembly goes to David Kastrup.