When compiling the attached code with gcc 4.2.1 with -O, the result fails on
PPC linux:
host> ppc86xx-linux-c++ -O -g -o iostest iostest.cxx
target> ./iostest
Segmentation fault
The code works fine:
- When built without optimization
- On x86 linux (also using gcc 4.2.1)
- With #define WORKAROUND (to avoid using an anonymous namespace)
--
Summary: Segfault with -O, iostream, anonymous namespace on PPC
Product: gcc
Version: 4.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: fp at mc dot com
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: powerpc-timesys-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40391