aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorSteve Ellcey <sje@cup.hp.com>2005-10-07 17:34:18 +0000
committerSteve Ellcey <sje@gcc.gnu.org>2005-10-07 17:34:18 +0000
commit79a1aca79799abe989b78a732148f29767af29dc (patch)
treebf414f36ac47d2de5e18cac60c26794365e93b30 /gcc
parent9bff16b865d92c65d324ad8a32d73e11d84db02b (diff)
downloadgcc-79a1aca79799abe989b78a732148f29767af29dc.zip
gcc-79a1aca79799abe989b78a732148f29767af29dc.tar.gz
gcc-79a1aca79799abe989b78a732148f29767af29dc.tar.bz2
struct-layout-1_generate.c (generate_fields): Do not put aligned attributes on array elements.
* gcc.dg/compat/struct-layout-1_generate.c (generate_fields): Do not put aligned attributes on array elements. From-SVN: r105094
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c8
2 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 44e8a7a..47bd2f9 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2005-10-07 Steve Ellcey <sje@cup.hp.com>
+
+ * gcc.dg/compat/struct-layout-1_generate.c (generate_fields):
+ Do not put aligned attributes on array elements.
+
2005-10-07 Ulrich Weigand <uweigand@de.ibm.com>
PR testsuite/23611, PR testsuite/23615
diff --git a/gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c b/gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c
index b3d6ece..5519cf9 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c
@@ -1743,6 +1743,14 @@ generate_fields (enum FEATURE features, struct entry *e, struct entry *parent,
|| (e[n].type >= &aligned_bitfld_types[0]
&& e[n].type < &aligned_bitfld_types[n_aligned_bitfld_types])))
e[n].attrib = NULL;
+
+ /* If this is an array type, do not put aligned attributes on
+ elements. Aligning elements to a value greater than their
+ size will result in a compiler error. */
+
+ if ((e[n].etype == ETYPE_ARRAY)
+ && (strncmp (e[n].attrib, "atal", 4) == 0))
+ e[n].attrib = NULL;
}
}
}