aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-family/c-attribs.cc
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2022-05-05 11:03:44 -0400
committerJason Merrill <jason@redhat.com>2022-05-16 17:32:46 -0400
commited12749a3c9d9569a2c23df2e0db2136dcd3512d (patch)
tree59dcadc8531bd38bb052c0ffdd4e5c0b40210f73 /gcc/c-family/c-attribs.cc
parent2402dc6b982c4dacac2360830f0edc123c588110 (diff)
downloadgcc-ed12749a3c9d9569a2c23df2e0db2136dcd3512d.zip
gcc-ed12749a3c9d9569a2c23df2e0db2136dcd3512d.tar.gz
gcc-ed12749a3c9d9569a2c23df2e0db2136dcd3512d.tar.bz2
attribs: fix typedefs in generic code [PR105492]
In my patch for PR100545 I added an assert to check for broken typedefs in set_underlying_type, and it found one in this case: rs6000_handle_altivec_attribute had the same problem as handle_mode_attribute. So let's move the fixup into decl_attributes. PR c/105492 gcc/ChangeLog: * attribs.cc (decl_attributes): Fix broken typedefs here. gcc/c-family/ChangeLog: * c-attribs.cc (handle_mode_attribute): Don't fix broken typedefs here.
Diffstat (limited to 'gcc/c-family/c-attribs.cc')
-rw-r--r--gcc/c-family/c-attribs.cc10
1 files changed, 0 insertions, 10 deletions
diff --git a/gcc/c-family/c-attribs.cc b/gcc/c-family/c-attribs.cc
index e50e79e..4dc68db 100644
--- a/gcc/c-family/c-attribs.cc
+++ b/gcc/c-family/c-attribs.cc
@@ -2215,16 +2215,6 @@ handle_mode_attribute (tree *node, tree name, tree args,
TYPE_QUALS (type));
if (TYPE_USER_ALIGN (type))
*node = build_aligned_type (*node, TYPE_ALIGN (type));
-
- tree decl = node[2];
- if (decl && TYPE_NAME (type) == decl)
- {
- /* Set up the typedef all over again. */
- DECL_ORIGINAL_TYPE (decl) = NULL_TREE;
- TREE_TYPE (decl) = *node;
- set_underlying_type (decl);
- *node = TREE_TYPE (decl);
- }
}
return NULL_TREE;