https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62123
Bug ID: 62123 Summary: internal compiler error: output_operand: invalid expression as operand with option -std=c++11 and using std::complex Product: gcc Version: 4.9.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: paul.frei...@bruker-biospin.de Created attachment 33312 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33312&action=edit Short self contained sample code showing the behavior An internal compiler error is reported in the attached short code example when using a two dimensional static templated array with std::complex<> as template parameter. The error occurs only when the object is created with new on the heap: c++ -v output: Using built-in specs. COLLECT_GCC=/opt/gcc-4.9.1/bin/c++ Target: x86_64-unknown-linux-gnu Configured with: /home/anba/compiler/srcs/gcc-4.9.1/configure --prefix=/opt/gcc-4.9.1 --enable-threads=posix --enable-__cxa_atexit --disable-nls --enable-languages=c,c++,fortran Thread model: posix gcc version 4.9.1 (GCC) COLLECT_GCC_OPTIONS='-v' '-save-temps' '-std=c++11' '-c' '-o' 'yyy' '-shared-libgcc' '-mtune=generic' '-march=x86-64' /opt/gcc-4.9.1/libexec/gcc/x86_64-unknown-linux-gnu/4.9.1/cc1plus -E -quiet -v -D_GNU_SOURCE yyy.cpp -mtune=generic -march=x86-64 -std=c++11 -fpch-preprocess -o yyy.ii ignoring nonexistent directory "/opt/gcc-4.9.1/lib/gcc/x86_64-unknown-linux-gnu/4.9.1/../../../../x86_64-unknown-linux-gnu/include" #include "..." search starts here: #include <...> search starts here: /opt/gcc-4.9.1/lib/gcc/x86_64-unknown-linux-gnu/4.9.1/../../../../include/c++/4.9.1 /opt/gcc-4.9.1/lib/gcc/x86_64-unknown-linux-gnu/4.9.1/../../../../include/c++/4.9.1/x86_64-unknown-linux-gnu /opt/gcc-4.9.1/lib/gcc/x86_64-unknown-linux-gnu/4.9.1/../../../../include/c++/4.9.1/backward /opt/gcc-4.9.1/lib/gcc/x86_64-unknown-linux-gnu/4.9.1/include /usr/local/include /opt/gcc-4.9.1/include /opt/gcc-4.9.1/lib/gcc/x86_64-unknown-linux-gnu/4.9.1/include-fixed /usr/include End of search list. COLLECT_GCC_OPTIONS='-v' '-save-temps' '-std=c++11' '-c' '-o' 'yyy' '-shared-libgcc' '-mtune=generic' '-march=x86-64' /opt/gcc-4.9.1/libexec/gcc/x86_64-unknown-linux-gnu/4.9.1/cc1plus -fpreprocessed yyy.ii -quiet -dumpbase yyy.cpp -mtune=generic -march=x86-64 -auxbase-strip yyy -std=c++11 -version -o yyy.s GNU C++ (GCC) version 4.9.1 (x86_64-unknown-linux-gnu) compiled by GNU C version 4.9.1, GMP version 5.1.3, MPFR version 3.1.2, MPC version 1.0.2 GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 GNU C++ (GCC) version 4.9.1 (x86_64-unknown-linux-gnu) compiled by GNU C version 4.9.1, GMP version 5.1.3, MPFR version 3.1.2, MPC version 1.0.2 GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 Compiler executable checksum: dc34c618c1317de624b41ef61a9ec9db yyy.cpp:25:1: internal compiler error: output_operand: invalid expression as operand }