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