PR middle-end/46844
* gimple-fold.c (canonicalize_constructor_val): Canonicalize
addresses.
* gcc.c-torture/compile/pr46866.c: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167649
138bc75d-0d04-0410-961f-
82ee72b054a4
+2010-12-09 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/46844
+ * gimple-fold.c (canonicalize_constructor_val): Canonicalize
+ addresses.
+
2010-12-09 Joseph Myers <joseph@codesourcery.com>
* config/i386/netware.h (TARGET_POSIX_IO): Define.
return NULL_TREE;
if (base && TREE_CODE (base) == VAR_DECL)
add_referenced_var (base);
+ /* We never have the chance to fixup types in global initializers
+ during gimplification. Do so here. */
+ if (TREE_TYPE (TREE_TYPE (cval)) != TREE_TYPE (TREE_OPERAND (cval, 0)))
+ cval = build_fold_addr_expr (TREE_OPERAND (cval, 0));
}
return cval;
}
+2010-12-09 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/46844
+ * gcc.c-torture/compile/pr46866.c: New testcase.
+
2010-12-09 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
PR testsuite/45068
--- /dev/null
+extern void *malloc(__SIZE_TYPE__);
+typedef struct T T;
+struct T {
+ void (*destroy)(void *);
+};
+void destroy(union { void *this; } __attribute__((transparent_union)));
+static const typeof(destroy) *_destroy = (const typeof(destroy)*)destroy;
+void destroy(void *this);
+static T *create_empty(void)
+{
+ T *this = malloc(sizeof(*this));
+ *this = (typeof(*this)){ _destroy };
+ return this;
+}
+void openssl_crl_load(void)
+{
+ T *this = create_empty();
+ destroy(this);
+}