diff options
author | Adam Butcher <adam@jessamine.co.uk> | 2013-09-23 23:43:44 +0100 |
---|---|---|
committer | Adam Butcher <abutcher@gcc.gnu.org> | 2013-09-23 23:43:44 +0100 |
commit | ef4369671c4948c08c88965a913a8401a0bae8a7 (patch) | |
tree | b15acd47d2359083f31a9d877b387a499cf15d62 | |
parent | 7a9a6e244936e62fb9889237331ae324a0638f0e (diff) | |
download | gcc-ef4369671c4948c08c88965a913a8401a0bae8a7.zip gcc-ef4369671c4948c08c88965a913a8401a0bae8a7.tar.gz gcc-ef4369671c4948c08c88965a913a8401a0bae8a7.tar.bz2 |
Fix 58500.
gcc/cp/
PR c++/58500
* type-utils.h (find_type_usage): Only traverse one type level into
member function pointers.
gcc/testsuite/
PR c++/58500
* g++.dg/cpp1y/pr58500.C: New testcase.
From-SVN: r202851
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/type-utils.h | 2 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/cpp1y/pr58500.C | 8 |
4 files changed, 20 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 380fae9..ec40ed5 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,11 @@ 2013-09-23 Adam Butcher <adam@jessamine.co.uk> + PR c++/58500 + * type-utils.h (find_type_usage): Only traverse one type level into + member function pointers. + +2013-09-23 Adam Butcher <adam@jessamine.co.uk> + * parser.c (cp_parser_init_declarator): Defer calling finish_fully_implicit_template for forward declarations until after other decl processing is complete. Cleanup for clarity: Extract 'else' diff --git a/gcc/cp/type-utils.h b/gcc/cp/type-utils.h index 3e82ca4..2febce7 100644 --- a/gcc/cp/type-utils.h +++ b/gcc/cp/type-utils.h @@ -47,7 +47,7 @@ find_type_usage (tree t, bool (*pred) (const_tree)) if (TYPE_PTRMEMFUNC_P (t)) return find_type_usage - (TREE_TYPE (TREE_TYPE (TYPE_PTRMEMFUNC_FN_TYPE (t))), pred); + (TREE_TYPE (TYPE_PTRMEMFUNC_FN_TYPE (t)), pred); return NULL_TREE; } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 8a19710..4101cc2 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2013-09-23 Adam Butcher <adam@jessamine.co.uk> + + PR c++/58500 + * g++.dg/cpp1y/pr58500.C: New testcase. + 2013-09-23 Eric Botcazou <ebotcazou@adacore.com> * gnat.dg/opt28.ad[sb]: New test. diff --git a/gcc/testsuite/g++.dg/cpp1y/pr58500.C b/gcc/testsuite/g++.dg/cpp1y/pr58500.C new file mode 100644 index 0000000..b9d4a26 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp1y/pr58500.C @@ -0,0 +1,8 @@ +// { dg-do compile } +// { dg-options "-std=gnu++1y" } + +// PR c++/58500 + +struct A {}; + +void foo(auto (A::*)()); |