public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/95676] New: [armhf] g++ mis-compiles code at -O1 or above
@ 2020-06-15  4:33 jamessan at jamessan dot com
  2020-06-15 13:00 ` [Bug target/95676] " rearnsha at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: jamessan at jamessan dot com @ 2020-06-15  4:33 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95676

            Bug ID: 95676
           Summary: [armhf] g++ mis-compiles code at -O1 or above
           Product: gcc
           Version: 9.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jamessan at jamessan dot com
  Target Milestone: ---

Created attachment 48730
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48730&action=edit
Reduced test case

After uploading msgpack-c 3.3.0 to Debian, the armhf build failed due to a
specific test failing.  I originally reported this to msgpack-c's upstream:
https://github.com/msgpack/msgpack-c/issues/881

However, after testing on Debian's porterbox, it seems to be a GCC issue.  The
issue does not reproduce when compiled with -O0 but does with -O1 or higher.

Similarly, changing the line that was failing from using googletest's
"EXPECT_TRUE(foo == bar);" to "EXPECT_EQ(foo, bar);" caused the test to pass.

I was able to use creduce to produce the attached file, test.cpp, which
exhibits the problem.  The final assignment in main (cd = ce.aq<ba::z::bw>() ==
g;) should always evaluate to true.

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

end of thread, other threads:[~2020-06-23 14:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-15  4:33 [Bug c++/95676] New: [armhf] g++ mis-compiles code at -O1 or above jamessan at jamessan dot com
2020-06-15 13:00 ` [Bug target/95676] " rearnsha at gcc dot gnu.org
2020-06-16  0:49 ` jamessan at jamessan dot com
2020-06-23  4:45 ` jamessan at jamessan dot com
2020-06-23 14:34 ` acoplan 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).