public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "pkoning at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/50189] New: Wrong code error in -O2 compile, target independent Date: Thu, 25 Aug 2011 17:19:00 -0000 [thread overview] Message-ID: <bug-50189-4@http.gcc.gnu.org/bugzilla/> (raw) 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.
next reply other threads:[~2011-08-25 17:18 UTC|newest] Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-08-25 17:19 pkoning at gcc dot gnu.org [this message] 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
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-50189-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).