This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/66193] ICE for initialisation of some non-zero-sized arrays
- From: "tkoenig at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 19 May 2015 20:14:44 +0000
- Subject: [Bug fortran/66193] ICE for initialisation of some non-zero-sized arrays
- Auto-submitted: auto-generated
- References: <bug-66193-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66193
--- Comment #8 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
This patch looks good:
--- arith.c (Revision 223202)
+++ arith.c (Arbeitskopie)
@@ -1390,6 +1390,12 @@ reduce_binary (arith (*eval) (gfc_expr *, gfc_expr
if (op1->expr_type == EXPR_CONSTANT && op2->expr_type == EXPR_CONSTANT)
return eval (op1, op2, result);
+ if (op1->expr_type == EXPR_ARRAY)
+ gfc_check_constructor_type (op1);
+
+ if (op2->expr_type == EXPR_ARRAY)
+ gfc_check_constructor_type (op2);
+
if (op1->expr_type == EXPR_CONSTANT && op2->expr_type == EXPR_ARRAY)
return reduce_binary_ca (eval, op1, op2, result);