diff mbox

vect pat recog fails in sbitmap.c on ia64

Message ID or7hm0lcdb.fsf@livre.localdomain
State New
Headers show

Commit Message

Alexandre Oliva June 15, 2010, 12:16 p.m. UTC
On Jun 11, 2010, Richard Guenther <richard.guenther@gmail.com> wrote:

> On Fri, Jun 11, 2010 at 9:25 PM, Alexandre Oliva <aoliva@redhat.com> wrote:
>> A -O3 bootstrap on ia64-linux-gnu crashes building sbitmap.c in stage2.
>> The problem is that get_vectype_for_scalar_type (type_out = <unsigned
>> long int>) returns type_out = NULL, and then vect_pattern_recog_1
>> crashes when it attempts to take the mode of the returned type.

> You should instead bail out immediately.

> Ok with that change.

Thanks, here's what I'm checking in.
diff mbox

Patch

for  gcc/ChangeLog
from  Alexandre Oliva  <aoliva@redhat.com>

	* tree-vect-patterns.c (vect_pattern_recog_1): Bail out if we
	don't get a vector type for output.

Index: gcc/tree-vect-patterns.c
===================================================================
--- gcc/tree-vect-patterns.c.orig	2010-06-14 16:08:23.000000000 -0300
+++ gcc/tree-vect-patterns.c	2010-06-14 16:25:04.000000000 -0300
@@ -699,6 +699,8 @@  vect_pattern_recog_1 (
 	type_out = get_vectype_for_scalar_type (type_out);
       else
 	type_out = type_in;
+      if (!type_out)
+	return;
       pattern_vectype = type_out;
 
       if (is_gimple_assign (pattern_stmt))