[Bug c++/67487] ICE: Illegal instruction, header

2015-09-08 Thread mazen....@uni-ulm.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67487

--- Comment #2 from mazen@uni-ulm.de ---
The node I was trying to compile the program at uses an AMD Opteron with the
x86-64 instruction set. I listed the detailed CPU information below, in case it
is useful. Here is the backtrace and disassembly.

(gdb) bt
#0  0x010d7fa8 in __gmpn_popcount ()
#1  0x010bfa94 in parsed_string_to_mpfr ()
#2  0x010c0311 in mpfr_strtofr ()
#3  0x00a1bb8e in real_from_string(real_value*, char const*) ()
#4  0x00a1c5dd in real_from_string3(real_value*, char const*,
machine_mode) ()
#5  0x0073c024 in interpret_float(cpp_token const*, unsigned int, char
const*, overflow_type*) ()
#6  0x0073cccd in c_lex_with_flags(tree_node**, unsigned int*, unsigned
char*, int) ()
#7  0x0065ff40 in cp_lexer_get_preprocessor_token(cp_lexer*, cp_token*)
()
#8  0x0068ee89 in c_parse_file() ()
#9  0x007418a3 in c_common_parse_file() ()
#10 0x00aa0f32 in compile_file() ()
#11 0x00aa2c1f in toplev::main(int, char**) ()
#12 0x0103418a in main ()
(gdb) disassemble
Dump of assembler code for function __gmpn_popcount:
   0x010d7f40 <+0>: lea(%rdi,%rsi,8),%rdi
   0x010d7f44 <+4>: imul   $0x,%esi,%ecx
   0x010d7f47 <+7>: and$0x7,%ecx
   0x010d7f4a <+10>:neg%rsi
   0x010d7f4d <+13>:mov%ecx,%eax
   0x010d7f4f <+15>:neg%rax
   0x010d7f52 <+18>:lea(%rdi,%rax,8),%rdi
   0x010d7f56 <+22>:xor%eax,%eax
   0x010d7f58 <+24>:lea(%rcx,%rcx,4),%rcx
   0x010d7f5c <+28>:lea0x1d(%rip),%rdx# 0x10d7f80
<__gmpn_popcount+64>
   0x010d7f63 <+35>:lea(%rdx,%rcx,2),%rdx
   0x010d7f67 <+39>:jmpq   *%rdx
   0x010d7f69 <+41>:nopl   0x0(%rax,%rax,1)
   0x010d7f71 <+49>:data16 data16 data16 data16 data16 nopw
%cs:0x0(%rax,%rax,1)
   0x010d7f80 <+64>:popcnt 0x0(%rdi,%rsi,8),%r8
   0x010d7f87 <+71>:add%r8,%rax
   0x010d7f8a <+74>:popcnt 0x8(%rdi,%rsi,8),%r9
   0x010d7f91 <+81>:add%r9,%rax
   0x010d7f94 <+84>:popcnt 0x10(%rdi,%rsi,8),%r8
   0x010d7f9b <+91>:add%r8,%rax
   0x010d7f9e <+94>:popcnt 0x18(%rdi,%rsi,8),%r9
   0x010d7fa5 <+101>:   add%r9,%rax
=> 0x010d7fa8 <+104>:   popcnt 0x20(%rdi,%rsi,8),%r8
   0x010d7faf <+111>:   add%r8,%rax
   0x010d7fb2 <+114>:   popcnt 0x28(%rdi,%rsi,8),%r9
   0x010d7fb9 <+121>:   add%r9,%rax
   0x010d7fbc <+124>:   popcnt 0x30(%rdi,%rsi,8),%r8
   0x010d7fc3 <+131>:   add%r8,%rax
   0x010d7fc6 <+134>:   popcnt 0x38(%rdi,%rsi,8),%r9
   0x010d7fcd <+141>:   add%r9,%rax
   0x010d7fd0 <+144>:   add$0x8,%rsi
   0x010d7fd4 <+148>:   js 0x10d7f80 <__gmpn_popcount+64>
   0x010d7fd6 <+150>:   retq
End of assembler dump.



Here is the CPU info.

processor   : 0
vendor_id   : AuthenticAMD
cpu family  : 15
model   : 37
model name  : AMD Opteron(tm) Processor 252
stepping: 1
cpu MHz : 2611.975
cache size  : 1024 KB
physical id : 0
siblings: 1
core id : 0
cpu cores   : 1
apicid  : 0
initial apicid  : 0
fpu : yes
fpu_exception   : yes
cpuid level : 1
wp  : yes
flags   : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext fxsr_opt lm 3dnowext
3dnow rep_good extd_apicid pni lahf_lm
bogomips: 5223.95
TLB size: 1024 4K pages
clflush size: 64
cache_alignment : 64
address sizes   : 40 bits physical, 48 bits virtual
power management: ts fid vid ttp

processor   : 1
vendor_id   : AuthenticAMD
cpu family  : 15
model   : 37
model name  : AMD Opteron(tm) Processor 252
stepping: 1
cpu MHz : 2611.975
cache size  : 1024 KB
physical id : 1
siblings: 1
core id : 0
cpu cores   : 1
apicid  : 1
initial apicid  : 1
fpu : yes
fpu_exception   : yes
cpuid level : 1
wp  : yes
flags   : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov
pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext fxsr_opt lm 3dnowext
3dnow rep_good extd_apicid pni lahf_lm
bogomips: 5222.97
TLB size: 1024 4K pages
clflush size: 64
cache_alignment : 64
address sizes   : 40 bits physical, 48 bits virtual
power management: ts fid vid ttp


[Bug c++/67487] ICE: Illegal instruction, header

2015-09-08 Thread mazen....@uni-ulm.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67487

--- Comment #4 from mazen@uni-ulm.de ---
Ok, thanks Markus.


[Bug c++/67487] New: ICE: Illegal instruction, header

2015-09-07 Thread mazen....@uni-ulm.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67487

Bug ID: 67487
   Summary: ICE: Illegal instruction,  header
   Product: gcc
   Version: 5.1.0
Status: UNCONFIRMED
  Severity: critical
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: mazen@uni-ulm.de
  Target Milestone: ---

Created attachment 36303
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36303=edit
preprocessed source

Code compiles fine without the "-std=c++11" option. The source code simply
includes the complex header (#include ) and does nothing else, i.e.,
empty main.

Output of the command line:


[mazenali@bloob ~]$ g++ -std=c++11 -save-temps -v hello.cpp
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/cm/local/apps/gcc/5.1.0/libexec/gcc/x86_64-unknown-linux-gnu/5.1.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-5.1.0/configure --prefix=/cm/local/apps/gcc/5.1.0
--enable-languages=c,c++,fortran
--with-gmp-include=/root/rpmbuild/BUILD/gcc-5.1.0-obj/../gcc-5.1.0/our-gmp
--with-gmp-lib=/root/rpmbuild/BUILD/gcc-5.1.0-obj/../gcc-5.1.0/our-gmp/.libs
--with-mpc-include=/root/rpmbuild/BUILD/gcc-5.1.0-obj/../gcc-5.1.0/our-mpc/src
--with-mpc-lib=/root/rpmbuild/BUILD/gcc-5.1.0-obj/../gcc-5.1.0/our-mpc/src/.libs
--with-mpfr-include=/root/rpmbuild/BUILD/gcc-5.1.0-obj/../gcc-5.1.0/our-mpfr/src
--with-mpfr-lib=/root/rpmbuild/BUILD/gcc-5.1.0-obj/../gcc-5.1.0/our-mpfr/src/.libs
Thread model: posix
gcc version 5.1.0 (GCC)
COLLECT_GCC_OPTIONS='-std=c++11' '-save-temps' '-v' '-shared-libgcc'
'-mtune=generic' '-march=x86-64'
 /cm/local/apps/gcc/5.1.0/libexec/gcc/x86_64-unknown-linux-gnu/5.1.0/cc1plus -E
-quiet -v -D_GNU_SOURCE hello.cpp -mtune=generic -march=x86-64 -std=c++11
-fpch-preprocess -o hello.ii
ignoring nonexistent directory
"/cm/local/apps/gcc/5.1.0/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/../../../../x86_64-unknown-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 .
 /home/mazenali/InstalledTools/root/usr/include
 /cm/shared/apps/openblas/0.2.14/include/openblas

/cm/local/apps/gcc/5.1.0/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/../../../../include/c++/5.1.0

/cm/local/apps/gcc/5.1.0/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/../../../../include/c++/5.1.0/x86_64-unknown-linux-gnu

/cm/local/apps/gcc/5.1.0/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/../../../../include/c++/5.1.0/backward
 /cm/local/apps/gcc/5.1.0/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/include
 /usr/local/include
 /cm/local/apps/gcc/5.1.0/include
 /cm/local/apps/gcc/5.1.0/lib/gcc/x86_64-unknown-linux-gnu/5.1.0/include-fixed
 /usr/include
End of search list.
COLLECT_GCC_OPTIONS='-std=c++11' '-save-temps' '-v' '-shared-libgcc'
'-mtune=generic' '-march=x86-64'
 /cm/local/apps/gcc/5.1.0/libexec/gcc/x86_64-unknown-linux-gnu/5.1.0/cc1plus
-fpreprocessed hello.ii -quiet -dumpbase hello.cpp -mtune=generic -march=x86-64
-auxbase hello -std=c++11 -version -o hello.s
GNU C++11 (GCC) version 5.1.0 (x86_64-unknown-linux-gnu)
compiled by GNU C version 5.1.0, 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++11 (GCC) version 5.1.0 (x86_64-unknown-linux-gnu)
compiled by GNU C version 5.1.0, 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: 2ba336c0aa0a4c2023d25b6ee96c100c
In file included from hello.cpp:1:0:
/cm/local/apps/gcc/5.1.0/include/c++/5.1.0/complex:1587:7: internal compiler
error: Illegal instruction
   const _Tp __pi_2 = 1.5707963267948966192313216916397514L;
   ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.