re PR c++/71737 (ICE following 2x pack expansion in non-pack with template alias)
/c-family 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com> PR c++/71737 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE. /testsuite 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com> PR c++/71737 * g++.dg/cpp0x/pr71737.C: New. From-SVN: r244486
This commit is contained in:
parent
d743728f90
commit
7d2f3f1d29
|
@ -1,3 +1,8 @@
|
||||||
|
2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
|
||||||
|
|
||||||
|
PR c++/71737
|
||||||
|
* c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
|
||||||
|
|
||||||
2017-01-12 Martin Sebor <msebor@redhat.com>
|
2017-01-12 Martin Sebor <msebor@redhat.com>
|
||||||
|
|
||||||
(-Wformat-overflow): ...to this.
|
(-Wformat-overflow): ...to this.
|
||||||
|
|
|
@ -7419,16 +7419,18 @@ set_underlying_type (tree x)
|
||||||
if (TYPE_NAME (TREE_TYPE (x)) == 0)
|
if (TYPE_NAME (TREE_TYPE (x)) == 0)
|
||||||
TYPE_NAME (TREE_TYPE (x)) = x;
|
TYPE_NAME (TREE_TYPE (x)) = x;
|
||||||
}
|
}
|
||||||
else if (TREE_TYPE (x) != error_mark_node
|
else if (DECL_ORIGINAL_TYPE (x) == NULL_TREE)
|
||||||
&& DECL_ORIGINAL_TYPE (x) == NULL_TREE)
|
|
||||||
{
|
{
|
||||||
tree tt = TREE_TYPE (x);
|
tree tt = TREE_TYPE (x);
|
||||||
DECL_ORIGINAL_TYPE (x) = tt;
|
DECL_ORIGINAL_TYPE (x) = tt;
|
||||||
tt = build_variant_type_copy (tt);
|
if (tt != error_mark_node)
|
||||||
TYPE_STUB_DECL (tt) = TYPE_STUB_DECL (DECL_ORIGINAL_TYPE (x));
|
{
|
||||||
TYPE_NAME (tt) = x;
|
tt = build_variant_type_copy (tt);
|
||||||
TREE_USED (tt) = TREE_USED (x);
|
TYPE_STUB_DECL (tt) = TYPE_STUB_DECL (DECL_ORIGINAL_TYPE (x));
|
||||||
TREE_TYPE (x) = tt;
|
TYPE_NAME (tt) = x;
|
||||||
|
TREE_USED (tt) = TREE_USED (x);
|
||||||
|
TREE_TYPE (x) = tt;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
|
||||||
|
|
||||||
|
PR c++/71737
|
||||||
|
* g++.dg/cpp0x/pr71737.C: New.
|
||||||
|
|
||||||
2017-01-16 Eric Botcazou <ebotcazou@adacore.com>
|
2017-01-16 Eric Botcazou <ebotcazou@adacore.com>
|
||||||
|
|
||||||
* gnat.dg/opt62.adb: New test.
|
* gnat.dg/opt62.adb: New test.
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
// PR c++/78765
|
||||||
|
// { dg-do compile { target c++11 } }
|
||||||
|
|
||||||
|
template <template <typename ...> class TT>
|
||||||
|
struct quote {
|
||||||
|
template <typename ...Ts>
|
||||||
|
using apply = TT<Ts...>; // { dg-error "pack expansion" }
|
||||||
|
};
|
||||||
|
|
||||||
|
template <typename>
|
||||||
|
using to_int_t = int;
|
||||||
|
|
||||||
|
using t = quote<quote<to_int_t>::apply>::apply<int>;
|
Loading…
Reference in New Issue