From patchwork Tue Jun 15 12:16:32 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: vect pat recog fails in sbitmap.c on ia64 Date: Tue, 15 Jun 2010 02:16:32 -0000 From: Alexandre Oliva X-Patchwork-Id: 55644 Message-Id: To: Richard Guenther Cc: gcc-patches@gcc.gnu.org On Jun 11, 2010, Richard Guenther wrote: > On Fri, Jun 11, 2010 at 9:25 PM, Alexandre Oliva 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 = > 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. for gcc/ChangeLog from Alexandre Oliva * 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))