diff options
author | Jakub Jelinek <jakub@redhat.com> | 2016-07-18 20:42:24 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2016-07-18 20:42:24 +0200 |
commit | 7a7f16ca45487c0a414c9a3d06423ab80d0f6a4f (patch) | |
tree | 049dc48270bdabefd3aee6960faf743bd7389d8a /gcc/cp | |
parent | f4d902955b3d123937ab85866c51f9b665591604 (diff) | |
download | gcc-7a7f16ca45487c0a414c9a3d06423ab80d0f6a4f.zip gcc-7a7f16ca45487c0a414c9a3d06423ab80d0f6a4f.tar.gz gcc-7a7f16ca45487c0a414c9a3d06423ab80d0f6a4f.tar.bz2 |
re PR c++/71826 (ICE on valid C++ code with ambiguous member lookup: tree check: expected baselink, have error_mark in tsubst_baselink, at cp/pt.c:13737)
PR c++/71826
* pt.c (tsubst_baselink): Only set BASELINK_OPTYPE for BASELINK_P.
* g++.dg/template/pr71826.C: New test.
From-SVN: r238441
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/cp/pt.c | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 3cd6b13..899b2ae 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ 2016-07-18 Jakub Jelinek <jakub@redhat.com> + PR c++/71826 + * pt.c (tsubst_baselink): Only set BASELINK_OPTYPE for BASELINK_P. + PR c++/71822 * cp-gimplify.c (cp_gimplify_expr) <case VEC_INIT_EXPR>: Recursively fold *expr_p before genericizing it. diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 1fbf546..916fd7b 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -13767,7 +13767,8 @@ tsubst_baselink (tree baselink, tree object_type, BASELINK_FUNCTIONS (baselink), template_args); /* Update the conversion operator type. */ - BASELINK_OPTYPE (baselink) = optype; + if (BASELINK_P (baselink)) + BASELINK_OPTYPE (baselink) = optype; if (!object_type) object_type = current_class_type; |