aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/method.c
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2018-01-03 16:01:31 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2018-01-03 16:01:31 +0000
commitce4734988f9ee022fbe5195f85ea04e7372a9eda (patch)
treec697e1a3cc5365d89d311a21bd8e38d5ecaab0f5 /gcc/cp/method.c
parentfa9544ab4df0e88946488fb82f4b994bf36a97ff (diff)
downloadgcc-ce4734988f9ee022fbe5195f85ea04e7372a9eda.zip
gcc-ce4734988f9ee022fbe5195f85ea04e7372a9eda.tar.gz
gcc-ce4734988f9ee022fbe5195f85ea04e7372a9eda.tar.bz2
[PR c++/83667] Fix tree_dump ICE
https://gcc.gnu.org/ml/gcc-patches/2018-01/msg00148.html PR c++/83667 * method.c (make_alias_for): Copy DECL_CONTEXT. PR c++/83667 * g++.dg/ipa/pr83667.C: New. From-SVN: r256179
Diffstat (limited to 'gcc/cp/method.c')
-rw-r--r--gcc/cp/method.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/method.c b/gcc/cp/method.c
index 6b080c0..55c84f1 100644
--- a/gcc/cp/method.c
+++ b/gcc/cp/method.c
@@ -206,7 +206,7 @@ make_alias_for (tree target, tree newid)
TREE_CODE (target), newid, TREE_TYPE (target));
DECL_LANG_SPECIFIC (alias) = DECL_LANG_SPECIFIC (target);
cxx_dup_lang_specific_decl (alias);
- DECL_CONTEXT (alias) = NULL;
+ DECL_CONTEXT (alias) = DECL_CONTEXT (target);
TREE_READONLY (alias) = TREE_READONLY (target);
TREE_THIS_VOLATILE (alias) = TREE_THIS_VOLATILE (target);
TREE_PUBLIC (alias) = 0;