This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/49452] comp-goto-2.c regresses in testing


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]