2014-11-27 Jakub Jelinek <jakub@redhat.com>
+ PR middle-end/64067
+ * expr.c (expand_expr_addr_expr_1) <case COMPOUND_LITERAL_EXPR>:
+ Handle it by returning address of COMPOUND_LITERAL_EXPR_DECL
+ not only if modifier is EXPAND_INITIALIZER, but whenever
+ COMPOUND_LITERAL_EXPR_DECL is non-NULL and TREE_STATIC.
+
PR tree-optimization/64024
* tree-vectorizer.h (struct _stmt_vec_info): Remove simd_clone_fndecl
field. Add simd_clone_info field.
break;
case COMPOUND_LITERAL_EXPR:
- /* Allow COMPOUND_LITERAL_EXPR in initializers, if e.g.
- rtl_for_decl_init is called on DECL_INITIAL with
- COMPOUNT_LITERAL_EXPRs in it, they aren't gimplified. */
- if (modifier == EXPAND_INITIALIZER
- && COMPOUND_LITERAL_EXPR_DECL (exp))
+ /* Allow COMPOUND_LITERAL_EXPR in initializers or coming from
+ initializers, if e.g. rtl_for_decl_init is called on DECL_INITIAL
+ with COMPOUND_LITERAL_EXPRs in it, or ARRAY_REF on a const static
+ array with address of COMPOUND_LITERAL_EXPR in DECL_INITIAL;
+ the initializers aren't gimplified. */
+ if (COMPOUND_LITERAL_EXPR_DECL (exp)
+ && TREE_STATIC (COMPOUND_LITERAL_EXPR_DECL (exp)))
return expand_expr_addr_expr_1 (COMPOUND_LITERAL_EXPR_DECL (exp),
target, tmode, modifier, as);
/* FALLTHRU */
2014-11-27 Jakub Jelinek <jakub@redhat.com>
+ PR middle-end/64067
+ * gcc.c-torture/compile/pr64067.c: New test.
+
PR tree-optimization/64024
* gcc.dg/vect/vect-simd-clone-13.c: New test.
* gcc.dg/vect/vect-simd-clone-14.c: New test.