c++: zero_init_expr_p of dependent expression
authorPatrick Palka <ppalka@redhat.com>
Thu, 23 Apr 2020 21:26:46 +0000 (17:26 -0400)
committerPatrick Palka <ppalka@redhat.com>
Thu, 23 Apr 2020 21:30:01 +0000 (17:30 -0400)
commit9a453da5cac7b6610cd342a7bea256acba5e61e1
tree1145f49f47c7d912e4e9bcba893841c484005500
parentf9f166251f181ddcee64092d89aecbc1166ca706
c++: zero_init_expr_p of dependent expression

This fixes an ICE coming from mangle.c:write_expression when building the
testsuite of range-v3; the added testcase is a reduced reproducer for the ICE.

gcc/cp/ChangeLog:

* tree.c (zero_init_expr_p): Use uses_template_parms instead of
dependent_type_p.

gcc/testsuite/ChangeLog:

* g++.dg/cpp0x/dependent3.C: New test.
gcc/cp/ChangeLog
gcc/cp/tree.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/dependent3.C [new file with mode: 0644]