diff options
author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-01-16 15:43:06 +0000 |
---|---|---|
committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-01-16 15:43:06 +0000 |
commit | ba5a0dd73bc9b00a455347b3e679431ce25fd68c (patch) | |
tree | 6842961845efcd495b7f47e159df3608208c934f /gcc/c-family | |
parent | 5d8c1c50806f4eb65a1285425bdf1025be4483c0 (diff) | |
download | gcc-ba5a0dd73bc9b00a455347b3e679431ce25fd68c.tar.gz |
/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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@244496 138bc75d-0d04-0410-961f-82ee72b054a4
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 525a73f93aa..de958748882 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 085bea03ac4..15ead18d36d 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; } } |