public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/41892]  New: generated code increments past enum boundary
@ 2009-10-31 17:50 caolanm at redhat dot com
  2009-10-31 17:51 ` [Bug c++/41892] " caolanm at redhat dot com
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: caolanm at redhat dot com @ 2009-10-31 17:50 UTC (permalink / raw)
  To: gcc-bugs

i.e. the attached code is fine on x86_64 but crashes on s390x with
g++ -O2 -fpic demo.cxx
it does not crash with 
g++ -O2 demo.cxx
or
g++ -fpic demo.cxx

expected output is...
0 3 0 3 0 3 1 3 2 3 1 3 0 3 1 3 1 3 2 3 2 3 0 3 2 3 1 3 2 3 0 3 0 3 0 3 1 3 2 3
1 3 0 3 1 3 1 3 2 3 2 3 0 3 2 3 1 3 2 3 0 3 0 3 1 3 1 3 2 3 2 3
actual output is...
0 3 0 3 0 3 1 3 2 3 0 3 3 3 0 3 4 3 0 3 5 3 0 3 6 3 0 3 7 3 0 3 8 ... crash


-- 
           Summary: generated code increments past enum boundary
           Product: gcc
           Version: 4.4.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: caolanm at redhat dot com
  GCC host triplet: s390x-ibm-linux


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


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

* [Bug c++/41892] generated code increments past enum boundary
  2009-10-31 17:50 [Bug c++/41892] New: generated code increments past enum boundary caolanm at redhat dot com
@ 2009-10-31 17:51 ` caolanm at redhat dot com
  2009-10-31 17:52 ` caolanm at redhat dot com
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: caolanm at redhat dot com @ 2009-10-31 17:51 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from caolanm at redhat dot com  2009-10-31 17:51 -------
Created an attachment (id=18943)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18943&action=view)
demo code

s390x-redhat-linux-g++ -O2 -fpic demo.cxx


-- 


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


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

* [Bug c++/41892] generated code increments past enum boundary
  2009-10-31 17:50 [Bug c++/41892] New: generated code increments past enum boundary caolanm at redhat dot com
  2009-10-31 17:51 ` [Bug c++/41892] " caolanm at redhat dot com
@ 2009-10-31 17:52 ` caolanm at redhat dot com
  2009-11-01 10:27 ` rguenth at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: caolanm at redhat dot com @ 2009-10-31 17:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from caolanm at redhat dot com  2009-10-31 17:52 -------
$ gcc --version
gcc (GCC) 4.4.2 20091019 (Red Hat 4.4.2-5)


-- 


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


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

* [Bug c++/41892] generated code increments past enum boundary
  2009-10-31 17:50 [Bug c++/41892] New: generated code increments past enum boundary caolanm at redhat dot com
  2009-10-31 17:51 ` [Bug c++/41892] " caolanm at redhat dot com
  2009-10-31 17:52 ` caolanm at redhat dot com
@ 2009-11-01 10:27 ` rguenth at gcc dot gnu dot org
  2009-11-06 10:22 ` [Bug target/41892] " jakub at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-11-01 10:27 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from rguenth at gcc dot gnu dot org  2009-11-01 10:26 -------
You should report this to RedHat, RedHat ships modified GCCs.  Alternatively
reproduce this with a FSF release.


-- 


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


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

* [Bug target/41892] generated code increments past enum boundary
  2009-10-31 17:50 [Bug c++/41892] New: generated code increments past enum boundary caolanm at redhat dot com
                   ` (2 preceding siblings ...)
  2009-11-01 10:27 ` rguenth at gcc dot gnu dot org
@ 2009-11-06 10:22 ` jakub at gcc dot gnu dot org
  2009-11-06 12:35 ` jakub at gcc dot gnu dot org
  2009-11-06 16:26 ` caolanm at redhat dot com
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-11-06 10:22 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from jakub at gcc dot gnu dot org  2009-11-06 10:22 -------
The only difference on the attached testcase between vanilla 4.4 branch and
4.4-RH is unwind info, in particular epilogue unwind info.  The testcase never
throws, so I don't think it matters.
With -fno-exceptions -fno-asynchronous-unwind-tables the generated assembly is
identical (in both cases from x86_64-linux -> s390x-linux cross).
I'm now grabbing a real s390x box to see whether the testcase actually fails at
runtime...


-- 


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


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

* [Bug target/41892] generated code increments past enum boundary
  2009-10-31 17:50 [Bug c++/41892] New: generated code increments past enum boundary caolanm at redhat dot com
                   ` (3 preceding siblings ...)
  2009-11-06 10:22 ` [Bug target/41892] " jakub at gcc dot gnu dot org
@ 2009-11-06 12:35 ` jakub at gcc dot gnu dot org
  2009-11-06 16:26 ` caolanm at redhat dot com
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-11-06 12:35 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from jakub at gcc dot gnu dot org  2009-11-06 12:35 -------
Anyway, I can't reproduce the runtime failure, neither with HEAD of 4.4 branch,
or 4.4-RH branch, nor 4.4.2-5.el6, nor 4.4.2-7.el6.


-- 


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


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

* [Bug target/41892] generated code increments past enum boundary
  2009-10-31 17:50 [Bug c++/41892] New: generated code increments past enum boundary caolanm at redhat dot com
                   ` (4 preceding siblings ...)
  2009-11-06 12:35 ` jakub at gcc dot gnu dot org
@ 2009-11-06 16:26 ` caolanm at redhat dot com
  5 siblings, 0 replies; 7+ messages in thread
From: caolanm at redhat dot com @ 2009-11-06 16:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from caolanm at redhat dot com  2009-11-06 16:26 -------
Hmm, I can reproduce it 100% on hercules, but checking on a real s390x and
despite matches the hercules settings to that of the real box it works fine on
reality and blows up on the emulator. 

Lets blame hercules then until there's some evidence to think otherwise. Odd
though.


-- 

caolanm at redhat dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |WORKSFORME


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


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

end of thread, other threads:[~2009-11-06 16:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-31 17:50 [Bug c++/41892] New: generated code increments past enum boundary caolanm at redhat dot com
2009-10-31 17:51 ` [Bug c++/41892] " caolanm at redhat dot com
2009-10-31 17:52 ` caolanm at redhat dot com
2009-11-01 10:27 ` rguenth at gcc dot gnu dot org
2009-11-06 10:22 ` [Bug target/41892] " jakub at gcc dot gnu dot org
2009-11-06 12:35 ` jakub at gcc dot gnu dot org
2009-11-06 16:26 ` caolanm at redhat dot com

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).