http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58067
Bug ID: 58067 Summary: ICE in GFortran recog.c:2158 Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: woodard at redhat dot com Created attachment 30602 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30602&action=edit a flattened self contained version of the NAS benchmark. When I try to compile one of the NAS benchmark's with -fpic and -mcmodel=large with GCC 4.8.0 up through the current trunk (20130802) I get an internal compiler error. This looks rather similar to PR56797 but that particular bug seems to have been only on ARM and this occurs on x86_64. So it may be that PR56797 is more expansive than initially thought or this might be a different bug. I can't tell. [ben@snog BT-MZ]$ PATH=/home/ben/Work/gcc-test/bin/:$PATH gfortran -c -save-temps -O2 -g -fopenmp -fpic -mcmodel=large bt-all.f bt-all.f: In function ‘MAIN__._omp_fn.1’: bt-all.f:305:0: note: non-delegitimized UNSPEC UNSPEC_PLTOFF (9) found in variable location do iz = 1, proc_num_zones ^ bt-all.f:305:0: note: non-delegitimized UNSPEC UNSPEC_PLTOFF (9) found in variable location bt-all.f: In function ‘MAIN__._omp_fn.0’: bt-all.f:449:0: error: unrecognizable insn: 999 continue ^ (call_insn/u 52 51 53 2 (parallel [ (set (reg:DI 0 ax) (call:DI (mem:QI (symbol_ref:DI ("__tls_get_addr")) [0 S1 A8]) (const_int 0 [0]))) (unspec:DI [ (symbol_ref:DI ("omp_cmn2a_") [flags 0x10] <var_decl 0x7f57f37f9390 omp_cmn2a>) ] UNSPEC_TLS_GD) ]) bt-all.f:48 -1 (expr_list:REG_EH_REGION (const_int -2147483648 [0xffffffff80000000]) (nil)) (nil)) bt-all.f:449:0: internal compiler error: in extract_insn, at recog.c:2158 0x922c1a _fatal_insn(char const*, rtx_def const*, char const*, int, char const*) ../.././gcc/rtl-error.c:109 0x922c49 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*) ../.././gcc/rtl-error.c:117 0x8f966a extract_insn(rtx_def*) ../.././gcc/recog.c:2158 0x7bdbee instantiate_virtual_regs_in_insn ../.././gcc/function.c:1609 0x7bdbee instantiate_virtual_regs ../.././gcc/function.c:1926 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <http://gcc.gnu.org/bugs.html> for instructions. This problem doesn't seem to occur except when you have -fpic and -mcmodel=large. Changing the memory model to medium or small or removing the -fpic allows the code to compile. Attached is a flattened self contained version of the NAS benchmark my fortran is not good enough to boil it down into a more parsimonious reproducer.