On 04/28/2017 11:27 AM, Bernd Edlinger wrote:
Yes I agree, that is probably not worth it. So I could try to remove
the special handling of PIC+const and see what happens.
However the SYMBOL_REF_FUNCTION_P is another story, that part I would
like to keep: It happens quite often, already w/o -fpic that call
statements are using SYMBOL_REFs to ordinary (not weak) function
symbols, and may_trap returns 1 for these call statements wihch is IMHO
wrong.
Hmm, thinking more about this, wasn't the original case a PIC referrence
for something like &x[BIGNUM].
Perhaps we could consider a PIC reference without other arithmetic as
safe. That would likely pick up the SYMBOL_REF_FUNCTION_P case you want
as well good deal many more PIC references as non-trapping.
Jeff