mirror of git://gcc.gnu.org/git/gcc.git
re PR target/70633 (ICE on valid code at -Os (in 32-bit mode) on x86_64-linux-gnu: output_operand: invalid expression as operand)
PR middle-end/70633 * gimplify.c (gimplify_init_constructor): Clear TREE_STATIC if gimplification turns some element into non-constant. * gcc.c-torture/compile/pr70633.c: New test. From-SVN: r234934
This commit is contained in:
parent
3d3f9e7e69
commit
37947cd0bd
|
|
@ -1,5 +1,9 @@
|
|||
2016-04-13 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR middle-end/70633
|
||||
* gimplify.c (gimplify_init_constructor): Clear TREE_STATIC if
|
||||
gimplification turns some element into non-constant.
|
||||
|
||||
PR debug/70628
|
||||
* rtl.h (convert_memory_address_addr_space_1): New prototype.
|
||||
* explow.c (convert_memory_address_addr_space_1): No longer static,
|
||||
|
|
|
|||
|
|
@ -4172,6 +4172,10 @@ gimplify_init_constructor (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p,
|
|||
fb_rvalue);
|
||||
if (tret == GS_ERROR)
|
||||
ret = GS_ERROR;
|
||||
else if (TREE_STATIC (ctor)
|
||||
&& !initializer_constant_valid_p (ce->value,
|
||||
TREE_TYPE (ce->value)))
|
||||
TREE_STATIC (ctor) = 0;
|
||||
}
|
||||
if (!is_gimple_reg (TREE_OPERAND (*expr_p, 0)))
|
||||
TREE_OPERAND (*expr_p, 1) = get_formal_tmp_var (ctor, pre_p);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
2016-04-13 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR middle-end/70633
|
||||
* gcc.c-torture/compile/pr70633.c: New test.
|
||||
|
||||
PR debug/70628
|
||||
* gcc.dg/torture/pr70628.c: New test.
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,12 @@
|
|||
/* PR middle-end/70633 */
|
||||
|
||||
typedef long V __attribute__((vector_size (4 * sizeof (long))));
|
||||
|
||||
void foo (V *);
|
||||
|
||||
void
|
||||
bar (void)
|
||||
{
|
||||
V b = { (long) bar, 0, 0, 0 };
|
||||
foo (&b);
|
||||
}
|
||||
Loading…
Reference in New Issue