diff mbox

Fix PR50574

Message ID alpine.LNX.2.00.1109301530050.2130@zhemvz.fhfr.qr
State New
Headers show

Commit Message

Richard Biener Sept. 30, 2011, 1:30 p.m. UTC
This fixes PR50574, we shouldn't compare vector mode sizes because
vectors can have BLKmode in gimple.

Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk.

Richard.

2011-09-30  Richard Guenther  <rguenther@suse.de>

	PR middle-end/50574
	* tree-cfg.c (verify_gimple_comparison): Compare component
	mode sizes for vector comparisons.
diff mbox

Patch

Index: gcc/tree-cfg.c
===================================================================
--- gcc/tree-cfg.c	(revision 179378)
+++ gcc/tree-cfg.c	(working copy)
@@ -3229,8 +3302,8 @@  verify_gimple_comparison (tree type, tre
         }
 
       if (TYPE_VECTOR_SUBPARTS (type) != TYPE_VECTOR_SUBPARTS (op0_type)
-	  || (GET_MODE_SIZE (TYPE_MODE (type))
-	      != GET_MODE_SIZE (TYPE_MODE (op0_type))))
+	  || (GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (type)))
+	      != GET_MODE_SIZE (TYPE_MODE (TREE_TYPE (op0_type)))))
         {
           error ("invalid vector comparison resulting type");
           debug_generic_expr (type);