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



--- Comment #8 from David Abdurachmanov <david.abdurachmanov at gmail dot com> 
2013-01-04 11:31:21 UTC ---

I have tested  the trunk, rev 194883. Seems to compile the test case #1, but it

still fails in the original program, Sherpa [1].



I am attaching pre-processed test case #2. Sadly, it includes <complex>.



[1] https://sherpa.hepforge.org/trac/wiki



### ICE, SEGFAULT ###



testcase.cpp: In constructor 'B<Tp>::B()':

testcase.cpp:6:61:   in constexpr expansion of 'std::complex<double>(1.0e+0)'

testcase.cpp:6:61: internal compiler error: Segmentation fault

     std::complex<double>((true ? 1.0 : std::complex<double>()));

                                                             ^

Please submit a full bug report,

with preprocessed source if appropriate.

See <http://gcc.gnu.org/bugs.html> for instructions.



### COMPILE LINE ###



g++ -m64 -O2 -std=c++11 -c testcase.cpp -fPIC -g -o ./testcase.o



### TEST CASE ###



#include <complex>



template <typename Tp>

struct B {

  B() {

    std::complex<double>((true ? 1.0 : std::complex<double>()));

  }

};



### GCC FULL OUTPUT ###



Using built-in specs.

COLLECT_GCC=g++

Target: x86_64-unknown-linux-gnu

Configured with: ../configure

--prefix=/build/davidlt/gcc480/b/tmp/BUILDROOT/b27d27381a0266701ed8b36f187c62dd/opt/cmssw/slc5_amd64_gcc480/external/gcc/4.8.0

--disable-multilib --disable-nls --enable-languages=c,c++,fortran

--enable-gold=yes --enable-lto

--with-gmp=/build/davidlt/gcc480/b/tmp/BUILDROOT/b27d27381a0266701ed8b36f187c62dd/opt/cmssw/slc5_amd64_gcc480/external/gcc/4.8.0

--with-mpfr=/build/davidlt/gcc480/b/tmp/BUILDROOT/b27d27381a0266701ed8b36f187c62dd/opt/cmssw/slc5_amd64_gcc480/external/gcc/4.8.0

--with-mpc=/build/davidlt/gcc480/b/tmp/BUILDROOT/b27d27381a0266701ed8b36f187c62dd/opt/cmssw/slc5_amd64_gcc480/external/gcc/4.8.0

--with-isl=/build/davidlt/gcc480/b/tmp/BUILDROOT/b27d27381a0266701ed8b36f187c62dd/opt/cmssw/slc5_amd64_gcc480/external/gcc/4.8.0

--with-cloog=/build/davidlt/gcc480/b/tmp/BUILDROOT/b27d27381a0266701ed8b36f187c62dd/opt/cmssw/slc5_amd64_gcc480/external/gcc/4.8.0

--disable-isl-version-check --enable-shared CC='gcc -fPIC' CXX='c++ -fPIC'

CPP=cpp CXXCPP='c++ -E'

Thread model: posix

gcc version 4.8.0 20130104 (experimental) (GCC) 

COLLECT_GCC_OPTIONS='-v' '-save-temps' '-m64' '-O2' '-std=c++11' '-c' '-fPIC'

'-g' '-o' './testcase.o' '-shared-libgcc' '-mtune=generic' '-march=x86-64'



/build/davidlt/gcc480/test/slc5_amd64_gcc480/external/gcc/4.8.0/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.8.0/cc1plus

-E -quiet -v -iprefix

/build/davidlt/gcc480/test/slc5_amd64_gcc480/external/gcc/4.8.0/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.8.0/

-D_GNU_SOURCE testcase.cpp -m64 -mtune=generic -march=x86-64 -std=c++11 -fPIC

-g -fworking-directory -O2 -fpch-preprocess -o testcase.ii

ignoring nonexistent directory

"/build/davidlt/gcc480/test/slc5_amd64_gcc480/external/gcc/4.8.0/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.8.0/../../../../x86_64-unknown-linux-gnu/include"

ignoring duplicate directory

"/build/davidlt/gcc480/test/slc5_amd64_gcc480/external/gcc/4.8.0/bin/../lib/gcc/../../lib/gcc/x86_64-unknown-linux-gnu/4.8.0/../../../../include/c++/4.8.0"

ignoring duplicate directory

"/build/davidlt/gcc480/test/slc5_amd64_gcc480/external/gcc/4.8.0/bin/../lib/gcc/../../lib/gcc/x86_64-unknown-linux-gnu/4.8.0/../../../../include/c++/4.8.0/x86_64-unknown-linux-gnu"

ignoring duplicate directory

"/build/davidlt/gcc480/test/slc5_amd64_gcc480/external/gcc/4.8.0/bin/../lib/gcc/../../lib/gcc/x86_64-unknown-linux-gnu/4.8.0/../../../../include/c++/4.8.0/backward"

ignoring duplicate directory

"/build/davidlt/gcc480/test/slc5_amd64_gcc480/external/gcc/4.8.0/bin/../lib/gcc/../../lib/gcc/x86_64-unknown-linux-gnu/4.8.0/include"

ignoring duplicate directory

"/build/davidlt/gcc480/test/slc5_amd64_gcc480/external/gcc/4.8.0/bin/../lib/gcc/../../lib/gcc/x86_64-unknown-linux-gnu/4.8.0/include-fixed"

ignoring nonexistent directory

"/build/davidlt/gcc480/test/slc5_amd64_gcc480/external/gcc/4.8.0/bin/../lib/gcc/../../lib/gcc/x86_64-unknown-linux-gnu/4.8.0/../../../../x86_64-unknown-linux-gnu/include"

#include "..." search starts here:

#include <...> search starts here:



/build/davidlt/gcc480/test/slc5_amd64_gcc480/external/gcc/4.8.0/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.8.0/../../../../include/c++/4.8.0



/build/davidlt/gcc480/test/slc5_amd64_gcc480/external/gcc/4.8.0/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.8.0/../../../../include/c++/4.8.0/x86_64-unknown-linux-gnu



/build/davidlt/gcc480/test/slc5_amd64_gcc480/external/gcc/4.8.0/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.8.0/../../../../include/c++/4.8.0/backward



/build/davidlt/gcc480/test/slc5_amd64_gcc480/external/gcc/4.8.0/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.8.0/include



/build/davidlt/gcc480/test/slc5_amd64_gcc480/external/gcc/4.8.0/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.8.0/include-fixed

 /usr/local/include



/build/davidlt/gcc480/test/slc5_amd64_gcc480/external/gcc/4.8.0/bin/../lib/gcc/../../include

 /usr/include

End of search list.

COLLECT_GCC_OPTIONS='-v' '-save-temps' '-m64' '-O2' '-std=c++11' '-c' '-fPIC'

'-g' '-o' './testcase.o' '-shared-libgcc' '-mtune=generic' '-march=x86-64'



/build/davidlt/gcc480/test/slc5_amd64_gcc480/external/gcc/4.8.0/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.8.0/cc1plus

-fpreprocessed testcase.ii -quiet -dumpbase testcase.cpp -m64 -mtune=generic

-march=x86-64 -auxbase-strip ./testcase.o -g -O2 -std=c++11 -version -fPIC -o

testcase.s

GNU C++ (GCC) version 4.8.0 20130104 (experimental) (x86_64-unknown-linux-gnu)

    compiled by GNU C version 4.8.0 20130104 (experimental), GMP version 5.0.5,

MPFR version 3.1.1, MPC version 1.0.1

GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096

GNU C++ (GCC) version 4.8.0 20130104 (experimental) (x86_64-unknown-linux-gnu)

    compiled by GNU C version 4.8.0 20130104 (experimental), GMP version 5.0.5,

MPFR version 3.1.1, MPC version 1.0.1

GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096

Compiler executable checksum: c3d94833375abd849e271df27fe17da2

testcase.cpp: In constructor 'B<Tp>::B()':

testcase.cpp:6:61:   in constexpr expansion of 'std::complex<double>(1.0e+0)'

testcase.cpp:6:61: internal compiler error: Segmentation fault

     std::complex<double>((true ? 1.0 : std::complex<double>()));

                                                             ^

Please submit a full bug report,

with preprocessed source if appropriate.

See <http://gcc.gnu.org/bugs.html> for instructions.

Reply via email to