PR middle-end/98578 - ICE warning on uninitialized VLA access
authorMartin Sebor <msebor@redhat.com>
Thu, 7 Jan 2021 21:20:39 +0000 (14:20 -0700)
committerMartin Sebor <msebor@redhat.com>
Thu, 7 Jan 2021 21:22:28 +0000 (14:22 -0700)
commit178f0afce3611282170de380fcea9db9d6e3ff0c
treef51d4f81b339ac5b16118c497b9499835abe5d5e
parent2f359597e49a15a2aef8f83ea7a14649854334cb
PR middle-end/98578 - ICE warning on uninitialized VLA access

gcc/c-family/ChangeLog:

PR middle-end/98578
* c-pretty-print.c (print_mem_ref): Strip array from access type.
Avoid assuming acces type's size is constant.  Correct condition
guarding the printing of a parenthesis.

gcc/testsuite/ChangeLog:

PR middle-end/98578
* gcc.dg/plugin/gil-1.c: Adjust expected output.
* gcc.dg/uninit-pr98578.c: New test.
gcc/c-family/c-pretty-print.c
gcc/testsuite/gcc.dg/plugin/gil-1.c
gcc/testsuite/gcc.dg/uninit-pr98578.c [new file with mode: 0644]