diff options
author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-06-30 18:51:29 +0000 |
---|---|---|
committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-06-30 18:51:29 +0000 |
commit | 5e410273761a0a3bb1cece5c11b0f73efe70716f (patch) | |
tree | 0afc62b27294c1b4d7e94bac36e99f94358d3499 /gcc/cp | |
parent | d93128cba6350bbfc6d9d5631bab90b9b7360fd7 (diff) | |
download | gcc-5e410273761a0a3bb1cece5c11b0f73efe70716f.tar.gz |
PR c++/61566
* mangle.c (decl_mangling_context): Look through a TEMPLATE_DECL.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@212165 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/cp/mangle.c | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index e925e133422..122cf8ada59 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ 2014-06-30 Jason Merrill <jason@redhat.com> + PR c++/61566 + * mangle.c (decl_mangling_context): Look through a TEMPLATE_DECL. + * decl.c (build_ptrmemfunc_type): Don't give a PMF RECORD_TYPE TYPE_BINFO or TYPE_LANG_SPECIFIC. * cp-tree.h (TYPE_PTRMEMFUNC_FLAG): Use TYPE_LANG_FLAG_2. diff --git a/gcc/cp/mangle.c b/gcc/cp/mangle.c index ac1c1da9730..02c05d47747 100644 --- a/gcc/cp/mangle.c +++ b/gcc/cp/mangle.c @@ -742,6 +742,10 @@ decl_mangling_context (tree decl) if (tcontext != NULL_TREE) return tcontext; + if (TREE_CODE (decl) == TEMPLATE_DECL + && DECL_TEMPLATE_RESULT (decl)) + decl = DECL_TEMPLATE_RESULT (decl); + if (TREE_CODE (decl) == TYPE_DECL && LAMBDA_TYPE_P (TREE_TYPE (decl))) { |