This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/64724] New: C++ loop with -O3 optimization produces segfault while -O2 is fine
- From: "aprokop at sandia dot gov" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 22 Jan 2015 04:53:00 +0000
- Subject: [Bug c++/64724] New: C++ loop with -O3 optimization produces segfault while -O2 is fine
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64724
Bug ID: 64724
Summary: C++ loop with -O3 optimization produces segfault while
-O2 is fine
Product: gcc
Version: 4.9.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: aprokop at sandia dot gov
$ gcc -v
Using built-in specs.
COLLECT_GCC=/home/aprokop/local/opt/gcc-4.9.2/bin/gcc
COLLECT_LTO_WRAPPER=/home/aprokop/local/opt/gcc-4.9.2/libexec/gcc/x86_64-unknown-linux-gnu/4.9.2/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-4.9.2/configure
--prefix=/home/aprokop/local/opt/gcc-4.9.2 --enable-gold
--enable-languages=c,c++,fortran
Thread model: posix
gcc version 4.9.2 (GCC)
I've tried 4.9.1, 4.9.2 and the trunk versions. The attached code results in
segfault. Valgrind generates "General protection fault".