On Wed, Oct 11, 2017 at 08:17:25AM +0200, Martin Liška wrote:
> One can see use-after-scope error in boostrap-asan:
> 
> gcc/ChangeLog:
> 
> 2017-10-10  Martin Liska  <mli...@suse.cz>
> 
>       * print-rtl.c (print_insn): Move declaration of idbuf
>       to same scope as name.
> ---
>  gcc/print-rtl.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 

> diff --git a/gcc/print-rtl.c b/gcc/print-rtl.c
> index 79ec463df45..28d99862cad 100644
> --- a/gcc/print-rtl.c
> +++ b/gcc/print-rtl.c
> @@ -1792,11 +1792,11 @@ print_insn (pretty_printer *pp, const rtx_insn *x, 
> int verbose)
>      case DEBUG_INSN:
>        {
>       const char *name = "?";
> +     char idbuf[32];
>  
>       if (DECL_P (INSN_VAR_LOCATION_DECL (x)))
>         {
>           tree id = DECL_NAME (INSN_VAR_LOCATION_DECL (x));
> -         char idbuf[32];
>           if (id)
>             name = IDENTIFIER_POINTER (id);
>           else if (TREE_CODE (INSN_VAR_LOCATION_DECL (x))

Ok.  This should IMHO go into release branches too.

        Jakub

Reply via email to