re PR tree-optimization/54920 (segfault in tree-ssa-pre.c during Firefox build)

2012-10-15  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/54920
	* tree-ssa-pre.c (create_expression_by_pieces): Properly
	allocate temporary storage for all NARY elements.

	* gcc.dg/torture/pr54920.c: New testcase.

From-SVN: r192454
This commit is contained in:
Richard Guenther 2012-10-15 11:22:49 +00:00 committed by Richard Biener
parent 7bd8fc3ba1
commit f843144b28
4 changed files with 25 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2012-10-15 Richard Guenther <rguenther@suse.de>
PR tree-optimization/54920
* tree-ssa-pre.c (create_expression_by_pieces): Properly
allocate temporary storage for all NARY elements.
2012-10-15 Joern Rennecke <joern.rennecke@embecosm.com>
* web.c (union_match_dups): Properly handle OP_INOUT match_dups.

View File

@ -1,3 +1,8 @@
2012-10-15 Richard Guenther <rguenther@suse.de>
PR tree-optimization/54920
* gcc.dg/torture/pr54920.c: New testcase.
2012-10-15 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/unchecked_convert9.ad[sb]: New test.

View File

@ -0,0 +1,13 @@
/* { dg-do compile } */
typedef short __v8hi __attribute__ ((__vector_size__ (16)));
typedef long long __m128i __attribute__ ((__vector_size__ (16)));
int a;
__m128i b;
void
fn1 ()
{
while (1)
b = (__m128i) (__v8hi) { a, 0, 0, 0, 0, 0 };
}

View File

@ -2853,7 +2853,7 @@ create_expression_by_pieces (basic_block block, pre_expr expr,
case NARY:
{
vn_nary_op_t nary = PRE_EXPR_NARY (expr);
tree genop[4];
tree *genop = XALLOCAVEC (tree, nary->length);
unsigned i;
for (i = 0; i < nary->length; ++i)
{