diff options
author | mpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-06-24 10:53:48 +0000 |
---|---|---|
committer | mpolacek <mpolacek@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-06-24 10:53:48 +0000 |
commit | dcc0c65e26f3f654ecf39e9d5cc23f0703af1e7e (patch) | |
tree | d46abc9fc91f3b0be6117f9a099b22b19beb6d88 /gcc/cp | |
parent | 1c05a0492b2323154d81e3ef563dc3d8fe056910 (diff) | |
download | gcc-dcc0c65e26f3f654ecf39e9d5cc23f0703af1e7e.tar.gz |
PR c++/80244 - ICE with attribute in template alias.
* tree.c (strip_typedefs): Handle UNDERLYING_TYPE.
* g++.dg/cpp0x/alias-decl-59.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-6-branch@249622 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/tree.c | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 57db5ca858f..17085d81ce1 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -8,6 +8,11 @@ * parser.c (cp_parser_std_attribute_list): Return error_mark if make_pack_expansion returns an error. + 2017-04-18 Marek Polacek <polacek@redhat.com> + + PR c++/80244 - ICE with attribute in template alias. + * tree.c (strip_typedefs): Handle UNDERLYING_TYPE. + 2017-06-22 Jakub Jelinek <jakub@redhat.com> Backported from mainline diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index fe04f2b7125..c1e6dbb805d 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -1457,6 +1457,10 @@ strip_typedefs (tree t, bool *remove_attributes) DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P (t), tf_none)); break; + case UNDERLYING_TYPE: + type = strip_typedefs (UNDERLYING_TYPE_TYPE (t), remove_attributes); + result = finish_underlying_type (type); + break; default: break; } |