Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1046034 - gcc (in eclipse) crashes with segfault when compiling file at optimisation level >1
Summary: gcc (in eclipse) crashes with segfault when compiling file at optimisation le...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: 20
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-23 10:14 UTC by michaelrst
Modified: 2015-02-12 14:38 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-02-12 14:38:27 UTC
Type: Bug


Attachments (Terms of Use)
Preprocessed source (5.64 MB, text/x-csrc)
2013-12-23 10:14 UTC, michaelrst
no flags Details


Links
System ID Private Priority Status Summary Last Updated
GNU Compiler Collection 59610 0 None None None Never

Description michaelrst 2013-12-23 10:14:00 UTC
Created attachment 840742 [details]
Preprocessed source

Description of problem:
Compiling a certain c++ file causes g++ to segfault if optimising at -O2, -O3, Os, -Ofast, not at -O0 or -O1


Version-Release number of selected component (if applicable): 
4.8.2 20131212 (Red Hat 4.8.2-7) (x86_64-redhat-linux)


How reproducible: 
Fully


Steps to Reproduce:
1. compile file wildfire.cpp with command line g++ -O2 -Wall -c -fmessage-length=0 -std=c++11 -MMD -MP -MF"src/wildfire.d" -MT"src/wildfire.d" -o "src/wildfire.o" "../src/wildfire.cpp"
2.
3.

Actual results:


Expected results:


Additional info:
console output
g++ -O2 -Wall -c -fmessage-length=0 -std=c++11 -v -MMD -MP -MF"src/wildfire.d" -MT"src/wildfire.d" -o "src/wildfire.o" "../src/wildfire.cpp"
Using built-in specs.
COLLECT_GCC=g++
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-isl=/builddir/build/BUILD/gcc-4.8.2-20131212/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.2-20131212/obj-x86_64-redhat-linux/cloog-install --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.8.2 20131212 (Red Hat 4.8.2-7) (GCC) 
COLLECT_GCC_OPTIONS='-O2' '-Wall' '-c' '-fmessage-length=0' '-std=c++11' '-v' '-MMD' '-MP' '-MF' 'src/wildfire.d' '-MT' 'src/wildfire.d' '-o' 'src/wildfire.o' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
 /usr/libexec/gcc/x86_64-redhat-linux/4.8.2/cc1plus -quiet -v -MMD src/wildfire.d -MF src/wildfire.d -MP -MT src/wildfire.d -D_GNU_SOURCE ../src/wildfire.cpp -quiet -dumpbase wildfire.cpp -mtune=generic -march=x86-64 -auxbase-strip src/wildfire.o -O2 -Wall -std=c++11 -version -fmessage-length=0 -o /tmp/ccK8hjXq.s
GNU C++ (GCC) version 4.8.2 20131212 (Red Hat 4.8.2-7) (x86_64-redhat-linux)
	compiled by GNU C version 4.8.2 20131212 (Red Hat 4.8.2-7), GMP version 5.1.2, MPFR version 3.1.2, MPC version 1.0.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory "/usr/lib/gcc/x86_64-redhat-linux/4.8.2/include-fixed"
ignoring nonexistent directory "/usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../../../x86_64-redhat-linux/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../../../include/c++/4.8.2
 /usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../../../include/c++/4.8.2/x86_64-redhat-linux
 /usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../../../include/c++/4.8.2/backward
 /usr/lib/gcc/x86_64-redhat-linux/4.8.2/include
 /usr/local/include
 /usr/include
End of search list.
GNU C++ (GCC) version 4.8.2 20131212 (Red Hat 4.8.2-7) (x86_64-redhat-linux)
	compiled by GNU C version 4.8.2 20131212 (Red Hat 4.8.2-7), GMP version 5.1.2, MPFR version 3.1.2, MPC version 1.0.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 36de953cba87bab1ad58280401e36d59
../src/wildfire.cpp: In function ‘void iwf::warning(iwf::errorPlus)’:
../src/wildfire.cpp:501:1: internal compiler error: Segmentation fault
 }

Comment 1 Marek Polacek 2015-02-12 14:38:27 UTC
PR59610 has been fixed and the preprocessed file compiles fine with gcc-c++-4.9.2-1.fc21.x86_64.


Note You need to log in before you can comment on or make changes to this bug.