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 middle-end/80053] Label with address taken should prevent duplication of containing basic block


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80053

--- Comment #5 from rguenther at suse dot de <rguenther at suse dot de> ---
On Fri, 17 Mar 2017, amonakov at gcc dot gnu.org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80053
> 
> --- Comment #3 from Alexander Monakov <amonakov at gcc dot gnu.org> ---
> ... unless labels are intended to act similar to non-static function-scope
> variables, with computed address usable only until the containing function
> returns?  Except when used in static initializers, which makes them act as if
> their addresses were constant expressions?

Not sure - we do have nonlocal gotos (but those are introduced by
means of nested functions and thus follow the static initialization rule).
Certainly an interesting testcase ;)  I suppose we simply forget to
set DECL_NONLOCAL on L1/L2, doing so might pessimize the case where
we have computed goto with local labels only though.

> (still, if the this testcase is deemed invalid, the original issue remains)

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