aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
authorMarek Polacek <polacek@redhat.com>2020-06-17 19:23:10 -0400
committerGiuliano Belinassi <giuliano.belinassi@usp.br>2020-08-17 13:14:00 -0300
commit1d0bb03baa2ddc8105279a915dba3d0e0ba3b223 (patch)
tree1e4f6e4fbbdc63edb5b6fc1152b009ecf5dc9474 /gcc/fortran
parent0b1c8201a275484f625eaaa9cb666c28af1e5874 (diff)
downloadgcc-1d0bb03baa2ddc8105279a915dba3d0e0ba3b223.zip
gcc-1d0bb03baa2ddc8105279a915dba3d0e0ba3b223.tar.gz
gcc-1d0bb03baa2ddc8105279a915dba3d0e0ba3b223.tar.bz2
c++: Fix tsubst ICE with invalid static_cast [PR95728]
Since r11-423 tsubst_copy_and_build/TREE_LIST uses tsubst_tree_list instead of open coding it. While the latter could return an error node wrapped in a TREE_LIST, the former can return a naked error node. That broke in tsubst_copy_and_build/NEW_EXPR: tree placement = RECUR (TREE_OPERAND (t, 0)); // placement is now error_mark_node, so... for (; placement != NULL_TREE; placement = TREE_CHAIN (placement)) // ... this crashes If we just return, we avoid the ICE and improve the diagnostic a bit. gcc/cp/ChangeLog: PR c++/95728 * pt.c (tsubst_copy_and_build) <case NEW_EXPR>: Return error_mark_node if placement is erroneous. gcc/testsuite/ChangeLog: PR c++/95728 * g++.dg/template/cast6.C: New test.
Diffstat (limited to 'gcc/fortran')
0 files changed, 0 insertions, 0 deletions