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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID

--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
Ok, I believe it's an invalid testcase:

@node Labels as Values
...
You may not use this mechanism to jump to code in a different function.
If you do that, totally unpredictable things happen.  The best way to
avoid this is to store the label address only in automatic variables and
never pass it as an argument.

an exception is made for direct gotos to labels from nested functions to
the containing function if the label is previously declared.  C++ doesn't
support nested functions and lambdas are not explicitely mentioned.

Note that even before IPA propagates &label we mess up the CFG to:

int main() ()
{
  struct __lambda0 f;

label:
  main()::<lambda(void*)>::_ZZ4mainENKUlPvE_clES_.isra.0 (&label);

}

so even cases that would rely on inlining to bring the reference back
to the label containing function may "break".

ICE fixed -> INVALID.

Reply via email to