------- Comment #1 from tkoenig at gcc dot gnu dot org 2008-01-16 22:36 ------- Here's a real test case:
program main real, dimension(2,2) :: a logical(kind=4), dimension(2) :: b integer, dimension(2) :: i equivalence (b,i) data a /1.0, 2.0, -0.1, -0.2 / i = 16843009 ! Initialize i to put junk into b b = any(a>0.5,dim=1) if (b(2) .or. .not. b(1)) print *,b i = 16843009 ! Initialize i to put junk into b b = all(a>0.5,dim=1) if (b(2) .or. .not. b(1)) print *,b end program main This patch works: Index: iresolve.c =================================================================== --- iresolve.c (revision 131577) +++ iresolve.c (working copy) @@ -256,8 +256,6 @@ gfc_resolve_all (gfc_expr *f, gfc_expr * f->shape = gfc_copy_shape_excluding (mask->shape, mask->rank, dim); } - resolve_mask_arg (mask); - f->value.function.name = gfc_get_string (PREFIX ("all_%c%d"), gfc_type_letter (mask->ts.type), mask->ts.kind); @@ -306,8 +304,6 @@ gfc_resolve_any (gfc_expr *f, gfc_expr * f->shape = gfc_copy_shape_excluding (mask->shape, mask->rank, dim); } - resolve_mask_arg (mask); - f->value.function.name = gfc_get_string (PREFIX ("any_%c%d"), gfc_type_letter (mask->ts.type), mask->ts.kind); -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34817