aboutsummaryrefslogtreecommitdiff
path: root/gcc/stor-layout.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2003-08-20 08:24:18 -0400
committerJason Merrill <jason@gcc.gnu.org>2003-08-20 08:24:18 -0400
commit3acef2ae63e40303a73a7559939689c397c0450d (patch)
tree5de64ab02077a2ceccd6dd2c4e277f161bd8ac99 /gcc/stor-layout.c
parent8f7d850c97a24f9809bfc3f9505d508e8b011000 (diff)
downloadgcc-3acef2ae63e40303a73a7559939689c397c0450d.zip
gcc-3acef2ae63e40303a73a7559939689c397c0450d.tar.gz
gcc-3acef2ae63e40303a73a7559939689c397c0450d.tar.bz2
stor-layout.c (do_type_align): Only copy DECL_USER_ALIGN from TYPE_USER_ALIGN for FIELD_DECLs.
* stor-layout.c (do_type_align): Only copy DECL_USER_ALIGN from TYPE_USER_ALIGN for FIELD_DECLs. * attribs.c (decl_attributes): Rebuild the function pointer type after changing the target type. * tree.c (get_qualified_type): Also check that the attributes match. From-SVN: r70597
Diffstat (limited to 'gcc/stor-layout.c')
-rw-r--r--gcc/stor-layout.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c
index 54e6a56..afd830d 100644
--- a/gcc/stor-layout.c
+++ b/gcc/stor-layout.c
@@ -344,7 +344,8 @@ do_type_align (tree type, tree decl)
if (TYPE_ALIGN (type) > DECL_ALIGN (decl))
{
DECL_ALIGN (decl) = TYPE_ALIGN (type);
- DECL_USER_ALIGN (decl) = TYPE_USER_ALIGN (type);
+ if (TREE_CODE (decl) == FIELD_DECL)
+ DECL_USER_ALIGN (decl) = TYPE_USER_ALIGN (type);
}
}