aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeoffrey Keating <geoffk@apple.com>2007-07-03 19:13:00 +0000
committerGeoffrey Keating <geoffk@gcc.gnu.org>2007-07-03 19:13:00 +0000
commitf972b2cb9d8f9b1689df010f08cec6f2cb30d93c (patch)
tree1f00cfca13ba6cc72d6ba3c2fe124bb529ce6016
parent0bacb8c7487e559d2f6536eeb4aa30747d214182 (diff)
downloadgcc-f972b2cb9d8f9b1689df010f08cec6f2cb30d93c.zip
gcc-f972b2cb9d8f9b1689df010f08cec6f2cb30d93c.tar.gz
gcc-f972b2cb9d8f9b1689df010f08cec6f2cb30d93c.tar.bz2
* tree.h (DECL_ALIGN): Prevent use on a FUNCTION_DECL.
From-SVN: r126270
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/tree.h2
2 files changed, 5 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 816993d..f9413cd 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,7 @@
+2007-07-03 Geoffrey Keating <geoffk@apple.com>
+
+ * tree.h (DECL_ALIGN): Prevent use on a FUNCTION_DECL.
+
2007-07-03 Tom Tromey <tromey@redhat.com>
* c-parser.c (objc_pq_context): Removed.
diff --git a/gcc/tree.h b/gcc/tree.h
index a28f20b..9845779 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -2586,7 +2586,7 @@ struct tree_memory_partition_tag GTY(())
/* Likewise for the size in bytes. */
#define DECL_SIZE_UNIT(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.size_unit)
/* Holds the alignment required for the datum, in bits. */
-#define DECL_ALIGN(NODE) (DECL_COMMON_CHECK (NODE)->decl_common.u1.a.align)
+#define DECL_ALIGN(NODE) (TREE_NOT_CHECK (DECL_COMMON_CHECK (NODE), FUNCTION_DECL)->decl_common.u1.a.align)
/* The alignment of NODE, in bytes. */
#define DECL_ALIGN_UNIT(NODE) (DECL_ALIGN (NODE) / BITS_PER_UNIT)
/* For FIELD_DECLs, off_align holds the number of low-order bits of