diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2017-01-16 15:43:06 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2017-01-16 15:43:06 +0000 |
commit | 1ddca3f365df483715090940d330f02da42c0f2a (patch) | |
tree | 6842961845efcd495b7f47e159df3608208c934f /gcc/c-family | |
parent | 290687fb4ee780292684e85d616269305629adc2 (diff) | |
download | gcc-1ddca3f365df483715090940d330f02da42c0f2a.zip gcc-1ddca3f365df483715090940d330f02da42c0f2a.tar.gz gcc-1ddca3f365df483715090940d330f02da42c0f2a.tar.bz2 |
revert: 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>
Revert:
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>
Revert:
2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/71737
* g++.dg/cpp0x/pr71737.C: New.
From-SVN: r244496
Diffstat (limited to 'gcc/c-family')
-rw-r--r-- | gcc/c-family/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/c-family/c-common.c | 16 |
2 files changed, 15 insertions, 9 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index 525a73f..de95874 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,5 +1,13 @@ 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com> + Revert: + 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-16 Paolo Carlini <paolo.carlini@oracle.com> + PR c++/71737 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE. diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c index 085bea0..15ead18 100644 --- a/gcc/c-family/c-common.c +++ b/gcc/c-family/c-common.c @@ -7419,18 +7419,16 @@ set_underlying_type (tree x) if (TYPE_NAME (TREE_TYPE (x)) == 0) TYPE_NAME (TREE_TYPE (x)) = x; } - else if (DECL_ORIGINAL_TYPE (x) == NULL_TREE) + else if (TREE_TYPE (x) != error_mark_node + && DECL_ORIGINAL_TYPE (x) == NULL_TREE) { tree tt = TREE_TYPE (x); DECL_ORIGINAL_TYPE (x) = tt; - if (tt != error_mark_node) - { - tt = build_variant_type_copy (tt); - TYPE_STUB_DECL (tt) = TYPE_STUB_DECL (DECL_ORIGINAL_TYPE (x)); - TYPE_NAME (tt) = x; - TREE_USED (tt) = TREE_USED (x); - TREE_TYPE (x) = tt; - } + tt = build_variant_type_copy (tt); + TYPE_STUB_DECL (tt) = TYPE_STUB_DECL (DECL_ORIGINAL_TYPE (x)); + TYPE_NAME (tt) = x; + TREE_USED (tt) = TREE_USED (x); + TREE_TYPE (x) = tt; } } |