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

--- Comment #5 from Tom de Vries <vries at gcc dot gnu.org> ---
> Switch conversion triggers for this example, which introduces 
> a function static var,

Hmm, that was my impression from PR84592 comment 5, and the comments in
tree-switch-conversion.c.

When I compile this example, the only relevant difference I can observe is
DECL_CONTEXT:
...
static int a;

void
foo (void)
{
  static int b;
}
...

For variable a, DECL_CONTEXT starts out NULL, and then becomes the translation
unit decl during parsing.  For variable, DECL_CONTEXT is foo.

When I debug an example that triggers switch conversion the DECL_CONTEXT for
CSWTCH.x is NULL, and remains like that.

So, in the end, I'm not quite sure whether I can say that CSWTCH.x is a file or
function scope static.

Reply via email to