diff options
author | Patrick Palka <ppalka@gcc.gnu.org> | 2016-08-04 19:14:32 +0000 |
---|---|---|
committer | Patrick Palka <ppalka@gcc.gnu.org> | 2016-08-04 19:14:32 +0000 |
commit | 08156df50a56e4a4bd95159ad1bfbc50678f9e8a (patch) | |
tree | 29a17573923f7f183be6505b6fb4b9a3c390479d /gcc/cp | |
parent | 938da3a58b989f983233eceb8be320ea1b478081 (diff) | |
download | gcc-08156df50a56e4a4bd95159ad1bfbc50678f9e8a.zip gcc-08156df50a56e4a4bd95159ad1bfbc50678f9e8a.tar.gz gcc-08156df50a56e4a4bd95159ad1bfbc50678f9e8a.tar.bz2 |
Fix ICE on invalid variable template instantiation (PR c++/72759)
gcc/cp/ChangeLog:
PR c++/72759
* pt.c (tsubst_qualified_id): Return error_mark_node if
template_args is error_mark_node.
gcc/testsuite/ChangeLog:
PR c++/72759
* g++.dg/cpp1y/pr72759.C: New test.
From-SVN: r239147
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/pt.c | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 573ece8..5ec690d 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2016-08-04 Patrick Palka <ppalka@gcc.gnu.org> + + PR c++/72759 + * pt.c (tsubst_qualified_id): Return error_mark_node if + template_args is error_mark_node. + 2016-08-04 Jason Merrill <jason@redhat.com> PR c++/72415 diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 60c87e0..2f40700 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -13832,6 +13832,8 @@ tsubst_qualified_id (tree qualified_id, tree args, if (template_args) template_args = tsubst_template_args (template_args, args, complain, in_decl); + if (template_args == error_mark_node) + return error_mark_node; name = TREE_OPERAND (name, 0); } else |