+2005-06-01 Daniel Berlin <dberlin@dberlin.org>
+
+ Fix PR tree-optimization/21839
+
+ * gimplify.c (zero_sized_field_decl): New function.
+ (gimplify_init_ctor_eval): Use it.
+
2005-06-01 Josh Conner <jconner@apple.com>
PR 21478
* Makefile.in: Update dependencies.
-
2005-06-01 Danny Smith <dannysmith@users.sourceforge.net>
* config/i386/cygming.h (NO_PROFILE_COUNTERS): Define.
pre_p);
}
+/* Return true if FDECL is accessing a field that is zero sized. */
+
+static bool
+zero_sized_field_decl (tree fdecl)
+{
+ if (TREE_CODE (fdecl) == FIELD_DECL && DECL_SIZE (fdecl)
+ && integer_zerop (DECL_SIZE (fdecl)))
+ return true;
+ return false;
+}
+
/* A subroutine of gimplify_init_constructor. Generate individual
MODIFY_EXPRs for a CONSTRUCTOR. OBJECT is the LHS against which the
assignments should happen. LIST is the CONSTRUCTOR_ELTS of the
so we don't have to figure out what's missing ourselves. */
gcc_assert (purpose);
+ if (zero_sized_field_decl (purpose))
+ continue;
+
/* If we have a RANGE_EXPR, we have to build a loop to assign the
whole range. */
if (TREE_CODE (purpose) == RANGE_EXPR)
--- /dev/null
+ typedef struct { } spinlock_t;
+typedef struct {
+ unsigned sequence;
+ spinlock_t lock;
+} seqlock_t;
+void ext3_new_inode(seqlock_t *rsv_seqlock)
+{
+ *rsv_seqlock = (seqlock_t) { 0, (spinlock_t) { } };
+
+}
+
+