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

David Malcolm <dmalcolm at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2019-01-25
                 CC|                            |dmalcolm at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Confirmed.

It's unexpectedly reaching this case in get_parm_decl with a VAR_DECL:

7513              /* Other things that might be encountered.  */
7514            case LABEL_DECL:
7515            case VAR_DECL:
7516            default:
7517              gcc_unreachable ();

(gdb) p *b
$3 = {u = {type = <tree 0x0>, label = 0x0}, decl = <var_decl 0x7ffff7ffbab0>,
id = <tree 0x0>, prev = 0x0, shadowed = 0x0, 
  depth = 3, invisible = 0, nested = 0, inner_comp = 0, in_struct = 0, locus =
169024}
(gdb) call inform (b->locus, "b->locus")
z1.c: In function ‘f’:
z1.c:3:21: note: b->locus
    3 |   void g (int [(int){ x }]);
      |                     ^

(gdb) call debug_tree (decl)
 <var_decl 0x7ffff7ffbab0 D.1908
    type <integer_type 0x7ffff18c65e8 int public SI
        size <integer_cst 0x7ffff18aded0 constant 32>
        unit-size <integer_cst 0x7ffff18adee8 constant 4>
        align:32 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7ffff18c65e8 precision:32 min <integer_cst 0x7ffff18ade88 -2147483648> max
<integer_cst 0x7ffff18adea0 2147483647>
        pointer_to_this <pointer_type 0x7ffff18ce9d8>>
    used ignored read SI z1.c:3:21 size <integer_cst 0x7ffff18aded0 32>
unit-size <integer_cst 0x7ffff18adee8 4>
    align:32 warn_if_not_align:0 context <function_decl 0x7ffff19d9f00 f>
initial <parm_decl 0x7ffff19fa000 x>>

Reply via email to