gcc/
PR target/70860
* config/nvptx/nvptx.c (nvptx_libcall_value): Handle NULL cfun.
(nvptx_function_value): Assert non-NULL cfun.
From-SVN: r235748
+2016-05-02 Thomas Schwinge <thomas@codesourcery.com>
+
+ PR target/70860
+ * config/nvptx/nvptx.c (nvptx_libcall_value): Handle NULL cfun.
+ (nvptx_function_value): Assert non-NULL cfun.
+
2016-05-02 Eric Botcazou <ebotcazou@adacore.com>
PR rtl-optimization/70886
static rtx
nvptx_libcall_value (machine_mode mode, const_rtx)
{
- if (!cfun->machine->doing_call)
+ if (!cfun || !cfun->machine->doing_call)
/* Pretend to return in a hard reg for early uses before pseudos can be
generated. */
return gen_rtx_REG (mode, NVPTX_RETURN_REGNUM);
if (outgoing)
{
+ gcc_assert (cfun);
cfun->machine->return_mode = mode;
return gen_rtx_REG (mode, NVPTX_RETURN_REGNUM);
}