re PR c++/22487 (C++ front-end produces mis-match types in EQ_EXPR (array constructor))
authorRichard Guenther <rguenther@suse.de>
Fri, 4 Nov 2005 09:46:43 +0000 (09:46 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Fri, 4 Nov 2005 09:46:43 +0000 (09:46 +0000)
2005-11-04  Richard Guenther  <rguenther@suse.de>

PR c++/22487
* init.c (build_vec_init): Build comparison of matching
types.

From-SVN: r106487

gcc/cp/ChangeLog
gcc/cp/init.c

index 2d82433628b2c01a932b63e10cc2772f3b1e7529..0e7d5e935ba58730a37a4d83da3b92d3bff1f3d7 100644 (file)
@@ -1,3 +1,9 @@
+2005-11-04  Richard Guenther  <rguenther@suse.de>
+
+       PR c++/22487
+       * init.c (build_vec_init): Build comparison of matching
+       types.
+
 2005-11-03  Josh Conner  <jconner@apple.com>
 
        PR c++/19989
index 44cfc440628afdaf9260cd4643ebec792b9cfd9b..1ff2fd7be7be2f52ca090bb9fb456447db48d8f5 100644 (file)
@@ -2613,8 +2613,8 @@ build_vec_init (tree base, tree maxindex, tree init,
 
       for_stmt = begin_for_stmt ();
       finish_for_init_stmt (for_stmt);
-      finish_for_cond (build2 (NE_EXPR, boolean_type_node,
-                              iterator, integer_minus_one_node),
+      finish_for_cond (build2 (NE_EXPR, boolean_type_node, iterator,
+                              build_int_cst (TREE_TYPE (iterator), -1)),
                       for_stmt);
       finish_for_expr (build_unary_op (PREDECREMENT_EXPR, iterator, 0),
                       for_stmt);