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

--- Comment #4 from Tom de Vries <vries at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #1)
> The only way to capture these may
> be to introduce additional scoping in the FEs whenever new local decls
> are added.  Also consider
> 
>   const char *oldst = st;
>   const char *st = "Hello, world!";
> 
> so even consecutive inits may need two separate scopes.

At the DWARF side, DW_AT_start_scope looks applicable:
...
The debugging information entry for a program variable, formal parameter or
constant may have the following attributes:
...
11. A DW_AT_start_scope attribute if the scope of an object is smaller than
(that is, is a subset of the addresses of) the scope most closely enclosing the
object.
...

Maybe this can be generating without introducing additional scoping?

Reply via email to