This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/66232] -fPIC -fno-plt -mx32 fails to generate indirect branch via GOT
- From: "hjl.tools at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 21 May 2015 15:31:13 +0000
- Subject: [Bug target/66232] -fPIC -fno-plt -mx32 fails to generate indirect branch via GOT
- Auto-submitted: auto-generated
- References: <bug-66232-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66232
--- Comment #3 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to H.J. Lu from comment #2)
> Created attachment 35585 [details]
> A patch
>
> I am testing this.
It failed this:
[hjl@gnu-6 pr66232]$ cat x.c
extern void (*bar) (void);
void
foo (int n)
{
int i;
for (i = 0; i < n; i++)
{
if (!bar)
continue;
(*bar) ();
}
}
[hjl@gnu-6 pr66232]$ make
/export/build/gnu/gcc-x32/build-x86_64-linux/gcc/xgcc
-B/export/build/gnu/gcc-x32/build-x86_64-linux/gcc -fPIC -O -mx32 -S -o x.s x.c
x.c: In function âfooâ:
x.c:12:1: error: unable to generate reloads for:
}
^
(call_insn 17 15 18 5 (call (mem:QI (zero_extend:DI (reg/f:SI 87 [ D.1845 ]))
[0 *_6 S1 A8])
(const_int 0 [0])) x.c:10 651 {*call_x32}
(expr_list:REG_DEAD (reg/f:SI 87 [ D.1845 ])
(nil))
(nil))
x.c:12:1: internal compiler error: in curr_insn_transform, at
lra-constraints.c:3488
0xcf0c1e _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
/export/gnu/import/git/sources/gcc/gcc/rtl-error.c:110
0xbc6dec curr_insn_transform
/export/gnu/import/git/sources/gcc/gcc/lra-constraints.c:3488
0xbc9c6c lra_constraints(bool)
/export/gnu/import/git/sources/gcc/gcc/lra-constraints.c:4436
0xbb6074 lra(_IO_FILE*)
/export/gnu/import/git/sources/gcc/gcc/lra.c:2317
0xb64a10 do_reload
/export/gnu/import/git/sources/gcc/gcc/ira.c:5412
0xb64dbe execute
/export/gnu/import/git/sources/gcc/gcc/ira.c:5583
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.
make: *** [x.s] Error 1
[hjl@gnu-6 pr66232]$