This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR56982, handle setjmp like non-local labels
- From: Ian Lance Taylor <iant at google dot com>
- To: Andreas Schwab <schwab at linux-m68k dot org>
- Cc: Richard Biener <rguenther at suse dot de>, gcc-patches at gcc dot gnu dot org, Jakub Jelinek <jakub at redhat dot com>
- Date: Sat, 20 Apr 2013 13:19:43 -0700
- Subject: Re: [PATCH] Fix PR56982, handle setjmp like non-local labels
- References: <alpine dot LNX dot 2 dot 00 dot 1304171351250 dot 21094 at zhemvz dot fhfr dot qr> <m2d2tpxuuh dot fsf at igel dot home>
On Sat, Apr 20, 2013 at 5:14 AM, Andreas Schwab <schwab@linux-m68k.org> wrote:
> Richard Biener <rguenther@suse.de> writes:
>
>> PR tree-optimization/56982
>> * builtins.def (BUILT_IN_LONGJMP): longjmp is not a leaf
>> function.
>> * gimplify.c (gimplify_call_expr): Notice special calls.
>> (gimplify_modify_expr): Likewise.
>> * tree-cfg.c (make_abnormal_goto_edges): Handle setjmp-like
>> abnormal control flow receivers.
>> (call_can_make_abnormal_goto): Handle cfun->calls_setjmp
>> in the same way as cfun->has_nonlocal_labels.
>> (gimple_purge_dead_abnormal_call_edges): Likewise.
>> (stmt_starts_bb_p): Make setjmp-like abnormal control flow
>> receivers start a basic-block.
>
> This breaks libgo.
>
> ../../../gcc/libgo/runtime/proc.c: In function ‘runtime_mcall.constprop.7’:
> ../../../gcc/libgo/runtime/proc.c:419:13: error: ‘({anonymous})’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
> getcontext(&gp->context);
> ^
That's an unusually useless error message. There are no local structs
in this function. Without digging into the compiler I'm not sure what
this means or how to fix it.
Ian