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. From-SVN: r246962
This commit is contained in:
parent
6397118495
commit
be7c73ae35
4 changed files with 25 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
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-04-17 Bernd Edlinger <bernd.edlinger@hotmail.de>
|
||||
|
||||
PR c++/80287
|
||||
|
|
|
@ -1551,6 +1551,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;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2017-04-18 Marek Polacek <polacek@redhat.com>
|
||||
|
||||
PR c++/80244 - ICE with attribute in template alias.
|
||||
* g++.dg/cpp0x/alias-decl-59.C: New test.
|
||||
|
||||
2017-04-17 Bernd Edlinger <bernd.edlinger@hotmail.de>
|
||||
|
||||
PR c++/80287
|
||||
|
|
11
gcc/testsuite/g++.dg/cpp0x/alias-decl-59.C
Normal file
11
gcc/testsuite/g++.dg/cpp0x/alias-decl-59.C
Normal file
|
@ -0,0 +1,11 @@
|
|||
// PR c++/80244
|
||||
// { dg-do compile { target c++11 } }
|
||||
|
||||
template<typename>
|
||||
struct A {};
|
||||
|
||||
template<typename T>
|
||||
using B = A<__underlying_type(T) [[gnu::aligned(4)]]>; // { dg-warning "ignoring attributes on template argument" }
|
||||
|
||||
template<typename T>
|
||||
using B = A<__underlying_type(T) [[gnu::packed]]>; // { dg-warning "ignoring attributes on template argument" }
|
Loading…
Add table
Reference in a new issue