Re: Avoid NULL cfun ICE in gcc/config/nvptx/nvptx.c:nvptx_libcall_value (was: [PATCH] Fix PR70760)

2016-04-28 Thread Alexander Monakov
On Thu, 28 Apr 2016, Richard Biener wrote: > Doing anything based on 'cfun' here is fishy at least for the > call context of aggregate_value_p as that is also used when > looking at the caller side of a call for example when expanding calls > where cfun is then the callers cfun and not the callees.

Re: Avoid NULL cfun ICE in gcc/config/nvptx/nvptx.c:nvptx_libcall_value (was: [PATCH] Fix PR70760)

2016-04-28 Thread Richard Biener
On Thu, 28 Apr 2016, Thomas Schwinge wrote: > Hi! > > Richard's r235511 changes (quoted below) cause certain nvptx offloading > test cases to run into SIGSEGVs: > > [...] > #4 0x00d14193 in nvptx_libcall_value (mode=mode@entry=SImode) > at [...]/source-gcc/gcc/config/nvp

Avoid NULL cfun ICE in gcc/config/nvptx/nvptx.c:nvptx_libcall_value (was: [PATCH] Fix PR70760)

2016-04-28 Thread Thomas Schwinge
Hi! Richard's r235511 changes (quoted below) cause certain nvptx offloading test cases to run into SIGSEGVs: [...] #4 0x00d14193 in nvptx_libcall_value (mode=mode@entry=SImode) at [...]/source-gcc/gcc/config/nvptx/nvptx.c:489 #5 0x00d17a20 in nvptx_function_v

[PATCH] Fix PR70760

2016-04-27 Thread Richard Biener
The following patch fixes an issue in IPA PTA regarding to handling of DECL_BY_REFERENCE function results at the caller side. The issue for the testcase in the PR is that we use the wrong function decl to look for DECL_RESULT for calls that are an alias (which get DECL_RESULT released). But the