]> git.ipfire.org Git - thirdparty/gcc.git/commit
Handle folded nonconstant array bounds [PR101702]
authorMartin Sebor <msebor@redhat.com>
Wed, 17 Nov 2021 18:51:33 +0000 (11:51 -0700)
committerMartin Sebor <msebor@redhat.com>
Wed, 17 Nov 2021 18:52:29 +0000 (11:52 -0700)
commit2c2148d8c144d7388abcb7c34b782be647fe81c9
treeecea694a9449cb48b399d7a3d92eb62e406a223b
parentd3a9082d7acc3ef443de6f14a16e7063d92844b1
Handle folded nonconstant array bounds [PR101702]

PR c/101702 - ICE: in handle_argspec_attribute, at c-family/c-attribs.c:3623

gcc/c/ChangeLog:

PR c/101702
* c-decl.c (get_parm_array_spec): Strip casts earlier and fold array
bounds before deciding if they're constant.

gcc/testsuite/ChangeLog:

PR c/101702
* gcc.dg/Warray-parameter-11.c: New test.
gcc/c/c-decl.c
gcc/testsuite/gcc.dg/Warray-parameter-11.c [new file with mode: 0644]