summaryrefslogtreecommitdiff
path: root/gcc/attribs.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/attribs.c')
-rw-r--r--gcc/attribs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/attribs.c b/gcc/attribs.c
index 543931add01..b915c880716 100644
--- a/gcc/attribs.c
+++ b/gcc/attribs.c
@@ -386,7 +386,9 @@ decl_attributes (node, attributes, flags)
/* Layout the decl in case anything changed. */
if (spec->type_required && DECL_P (*node)
- && TREE_CODE (*node) == VAR_DECL)
+ && (TREE_CODE (*node) == VAR_DECL
+ || TREE_CODE (*node) == PARM_DECL
+ || TREE_CODE (*node) == RESULT_DECL))
{
/* Force a recalculation of mode and size. */
DECL_MODE (*node) = VOIDmode;