public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/53239] New: [4.7 Regression] -ftree-vrp breaks min()
@ 2012-05-04 21:41 proski at gnu dot org
  2012-05-04 21:43 ` [Bug c++/53239] " proski at gnu dot org
                   ` (15 more replies)
  0 siblings, 16 replies; 17+ messages in thread
From: proski at gnu dot org @ 2012-05-04 21:41 UTC (permalink / raw)
  To: gcc-bugs

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.


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2012-05-16 15:25 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-04 21:41 [Bug c++/53239] New: [4.7 Regression] -ftree-vrp breaks min() proski at gnu dot org
2012-05-04 21:43 ` [Bug c++/53239] " proski at gnu dot org
2012-05-04 21:54 ` pinskia at gcc dot gnu.org
2012-05-04 21:55 ` pinskia at gcc dot gnu.org
2012-05-04 22:03 ` [Bug middle-end/53239] [4.7 Regression] VRP vs named value return opt pinskia at gcc dot gnu.org
2012-05-04 23:21 ` hjl.tools at gmail dot com
2012-05-07  3:22 ` proski at gnu dot org
2012-05-07  7:14 ` [Bug tree-optimization/53239] " jakub at gcc dot gnu.org
2012-05-07  7:27 ` jakub at gcc dot gnu.org
2012-05-07  9:35 ` rguenth at gcc dot gnu.org
2012-05-07  9:38 ` rguenth at gcc dot gnu.org
2012-05-07 12:36 ` proski at gnu dot org
2012-05-07 13:24 ` [Bug tree-optimization/53239] [4.7/4.8 " hjl.tools at gmail dot com
2012-05-07 13:33 ` jakub at gcc dot gnu.org
2012-05-07 13:33 ` dak at gnu dot org
2012-05-07 13:34 ` jakub at gcc dot gnu.org
2012-05-16 15:58 ` jakub at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).