This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/58595] internal compiler error: in gen_movsi when compiling on arm some files of lttng-tools with -fPIE
- From: "meadori at codesourcery dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 21 Feb 2014 19:16:46 +0000
- Subject: [Bug target/58595] internal compiler error: in gen_movsi when compiling on arm some files of lttng-tools with -fPIE
- Auto-submitted: auto-generated
- References: <bug-58595-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58595
--- Comment #3 from Meador Inge <meadori at codesourcery dot com> ---
As shown in the backtrace, the ICE occurs when GCSE tries generate a move.
The the following asserts fire in 'gen_movsi':
gcc_assert (GET_CODE (tmp) == SYMBOL_REF);
gcc_assert (SYMBOL_REF_TLS_MODEL (tmp) != 0);
This is because the move operands look like:
(gdb) p debug_rtx(operands[0])
(reg/f:SI 115)
(gdb) p debug_rtx(operands[1])
(mem/u/c:SI (plus:SI (reg:SI 111)
(unspec:SI [
(symbol_ref:SI ("state") [flags 0x90] <var_decl 0xf7c50114
state>)
] UNSPEC_PIC_SYM)) [0 S4 A32])
We aren't expecting the 'mem' expression with the TLS reference in side.
I am not sure if this is just an overzealous assert or we have a deeper
issue. Removing the asserts does allow the code to compile.