public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/50189] New: Wrong code error in -O2 compile, target independent
@ 2011-08-25 17:19 pkoning at gcc dot gnu.org
  2011-08-25 17:21 ` [Bug c++/50189] " pkoning at gcc dot gnu.org
                   ` (19 more replies)
  0 siblings, 20 replies; 21+ messages in thread
From: pkoning at gcc dot gnu.org @ 2011-08-25 17:19 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50189

             Bug #: 50189
           Summary: Wrong code error in -O2 compile, target independent
    Classification: Unclassified
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: pkoning@gcc.gnu.org


Created attachment 25105
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25105
Test program

The attached test program compiles to wrong code with GCC 4.5.3 (and 4.5.1)
when compiled -O2.  GCC 4.6.1 gets it right.

I did some digging and determined that the problem shows up in the
-fdump-tree-all output in the .068t.vrp1 dump file; the preceding file
(.067.mergephi2) is correct.  In the generated code that corresponds to the
check_pos method, the second compare "if (m_timestamp != a_timestamp)" is
transformed into "if (3 == a_timestamp)".  If m_timestamp were of time
position_t (an enum of range 0..3) that would be correct, but m_timestamp is an
unsigned int so it can, and in our application does, have values larger than 3.


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

end of thread, other threads:[~2012-01-03 15:29 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-25 17:19 [Bug c++/50189] New: Wrong code error in -O2 compile, target independent pkoning at gcc dot gnu.org
2011-08-25 17:21 ` [Bug c++/50189] " pkoning at gcc dot gnu.org
2011-08-25 17:43 ` pkoning at gcc dot gnu.org
2011-08-25 18:34 ` [Bug c++/50189] [4.5 Regression] " pinskia at gcc dot gnu.org
2011-08-26  8:01 ` [Bug middle-end/50189] " rguenth at gcc dot gnu.org
2011-08-26  8:27 ` jakub at gcc dot gnu.org
2011-08-26  8:32 ` [Bug middle-end/50189] [4.5/4.6 Regression] Wrong code error in -O2 [-fstrict-enums] " rguenth at gcc dot gnu.org
2011-09-09 19:35 ` pkoning at gcc dot gnu.org
2011-10-10 20:42 ` pkoning at gcc dot gnu.org
2011-10-11  9:06 ` rguenth at gcc dot gnu.org
2011-10-11  9:09 ` rguenth at gcc dot gnu.org
2011-10-11 19:03 ` pkoning at gcc dot gnu.org
2011-10-12 11:43 ` rguenth at gcc dot gnu.org
2011-10-12 14:05 ` pkoning at gcc dot gnu.org
2011-10-12 14:17 ` rguenther at suse dot de
2011-10-12 14:23 ` rguenther at suse dot de
2011-10-12 15:14 ` rguenth at gcc dot gnu.org
2011-10-12 15:17 ` [Bug middle-end/50189] [4.5 " rguenth at gcc dot gnu.org
2011-10-12 15:18 ` [Bug middle-end/50189] [4.5/4.6 " rguenth at gcc dot gnu.org
2012-01-03 15:29 ` [Bug middle-end/50189] [4.5 " rguenth at gcc dot gnu.org
2012-01-03 15:29 ` rguenth 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).