Skip to content

Commit

Permalink
tree-cfg.c (verify_gimple_comparison): Verify that vector comparison …
Browse files Browse the repository at this point in the history
…returns a vector.

2012-11-27  Marc Glisse  <[email protected]>

	* tree-cfg.c (verify_gimple_comparison): Verify that vector
	comparison returns a vector.

From-SVN: r193862
  • Loading branch information
mglisse authored and Marc Glisse committed Nov 27, 2012
1 parent c2a73de commit d8d638d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
5 changes: 5 additions & 0 deletions gcc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2012-11-27 Marc Glisse <[email protected]>

* tree-cfg.c (verify_gimple_comparison): Verify that vector
comparison returns a vector.

2012-11-27 Meador Inge <[email protected]>

* collect2.c (main): Call find_file_set_debug.
Expand Down
11 changes: 10 additions & 1 deletion gcc/tree-cfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -3266,7 +3266,16 @@ verify_gimple_comparison (tree type, tree op0, tree op1)
if (INTEGRAL_TYPE_P (type)
&& (TREE_CODE (type) == BOOLEAN_TYPE
|| TYPE_PRECISION (type) == 1))
;
{
if (TREE_CODE (op0_type) == VECTOR_TYPE
|| TREE_CODE (op1_type) == VECTOR_TYPE)
{
error ("vector comparison returning a boolean");
debug_generic_expr (op0_type);
debug_generic_expr (op1_type);
return true;
}
}
/* Or an integer vector type with the same size and element count
as the comparison operand types. */
else if (TREE_CODE (type) == VECTOR_TYPE
Expand Down

0 comments on commit d8d638d

Please sign in to comment.