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: unassig...@gcc.gnu.org ReportedBy: pro...@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.