This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/49452] comp-goto-2.c regresses in testing
- From: "ebotcazou at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 17 Jun 2011 16:52:15 +0000
- Subject: [Bug tree-optimization/49452] comp-goto-2.c regresses in testing
- Auto-submitted: auto-generated
- References: <bug-49452-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49452
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ebotcazou at gcc dot
| |gnu.org
--- Comment #2 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2011-06-17 16:51:41 UTC ---
> NORETURN attribute marked to it but there's no reason why this should be marked
> as NORETURN - surely there is a flow of control that allows control to go out
> of the function.
>
>
> x(a)
> {
> __label__ xlab;
> void y(a)
> {
> void *x = &&llab;
> if (a==-1)
> goto *x;
> if (a==0)
> goto xlab;
> llab:
> y (a-1);
> }
> y (a);
> xlab:;
> return a;
> }
Yes, but this isn't a return, this is a non-local goto so NORETURN is correct.