User account creation filtered due to spam.
With 4.3.0 20071212 on hppa:
tbm@tx:~$ /usr/lib/gcc-snapshot/bin/gcc -O1 -fPIC ffcall-trampoline.i
./trampoline.c: In function 'is_trampoline_r':
./trampoline.c:1176: error: unrecognizable insn:
(insn 10 9 11 4 ./trampoline.c:1168 (set (reg:SI 100)
(plus:SI (reg:SI 19 %r19)
(high:SI (symbol_ref/v:SI ("@tramp_r") [flags 0x41] <function_decl 0x4007bb60 tramp_r>)))) -1 (nil))
./trampoline.c:1176: internal compiler error: in extract_insn, at recog.c:1990
Please submit a full bug report,
Created attachment 14791 [details]
Subject: Bug 34525
Date: Thu Dec 20 01:17:57 2007
New Revision: 131096
* pa.c (legitimize_pic_address): Force function labels into memory.
Fixed by change.
What are the reasons this was marked as a 4.3 regression? I'm interested
when the regression occurred since the backend has never forced function
labels to memory in this code.
A simpler testcase is:
dave@gsyprf11:~/gcc_test$ less pr34525.c
extern void tramp_r ();
int is_trampoline_r (void* function)
void *tramp_r_address = &tramp_r;
if (!(((long)function & 3) == 2))
((((long *) ((char*)function - 2)) == ((long *) ((char*)tramp_r_address-2)
&& ((((long *) ((char*)function - 2))) == (long)((char*)function - 2 + 16
? 1 : 0
I marked it as a 4.3 regression because I believe 4.2 was able to compile
the code. If you think it applies to 4.2, maybe it would be a good idea
to apply the patch there as well.
BTW, it might be a good idea to check in the testcase you came up with.
Thanks for fixing this so quickly.
Subject: Re: [4.3 Regression] ICE in extract_insn, at recog.c:1990 on hppa
> Thanks for fixing this so quickly.
Actually, I realized last night that I failed to load the function label
from memory. I'll try to fix it today.
I don't think I'll install the testcase. The reason is there are
no complex circumstances around this change. So, once the problem
is fixed, I expect it to stay fixed.
Subject: Bug 34525
Date: Fri Dec 21 23:37:07 2007
New Revision: 131126
* pa.c (legitimize_pic_address): Emit insn to load function label
forced to memory.
This problem should now be fixed. I had modified the testcase and
this led me to think I'd killed the ICE ;)
I have to say that the code in the original testcase is probably very
wrong for hppa. Like ia64, function pointers point to function descriptors
(when the plabel bit is set). The function descriptor also may point to
a stub and not the function code.