PR c++/95768 - pretty-printer ICE on -Wuninitialized with allocated storage
authorMartin Sebor <msebor@redhat.com>
Wed, 6 Jan 2021 20:44:27 +0000 (13:44 -0700)
committerMartin Sebor <msebor@redhat.com>
Wed, 6 Jan 2021 20:44:27 +0000 (13:44 -0700)
commitabb1b6058c09a7c0430d9bf019466ada07ca7b40
treee50447a0a440d9d001da20594941715368a26c36
parentfd64f348a6b40621dc2bcc743f5fdfb31ed0894c
PR c++/95768 - pretty-printer ICE on -Wuninitialized with allocated storage

gcc/c-family/ChangeLog:

PR c++/95768
* c-pretty-print.c (c_pretty_printer::primary_expression): For
SSA_NAMEs print VLA names and GIMPLE defining statements.
(print_mem_ref): New function.
(c_pretty_printer::unary_expression): Call it.

gcc/cp/ChangeLog:

PR c++/95768
* error.c (dump_expr): Call c_pretty_printer::unary_expression.

gcc/testsuite/ChangeLog:

PR c++/95768
* g++.dg/pr95768.C: New test.
* g++.dg/warn/Wuninitialized-12.C: New test.
* gcc.dg/uninit-38.c: New test.
gcc/c-family/c-pretty-print.c
gcc/cp/error.c
gcc/testsuite/g++.dg/pr95768.C [new file with mode: 0644]
gcc/testsuite/g++.dg/warn/Wuninitialized-12.C [new file with mode: 0644]
gcc/testsuite/gcc.dg/uninit-38.c [new file with mode: 0644]