re PR fortran/53732 ("mismatching comparison operand types" on compile)
fortran/ PR fortran/53732 * trans-array.c (gfc_add_loop_ss_code): Disable self recursive calls handling nested loop(s) if the subscript flag is true. testsuite/ PR fortran/53732 * gfortran.dg/inline_sum_4.f90: New test. From-SVN: r189341
This commit is contained in:
parent
16b1765e55
commit
ad4fdadfd0
|
@ -1,3 +1,9 @@
|
|||
2012-07-06 Mikael Morin <mikael@gcc.gnu.org>
|
||||
|
||||
PR fortran/53732
|
||||
* trans-array.c (gfc_add_loop_ss_code): Disable self recursive calls
|
||||
handling nested loop(s) if the subscript flag is true.
|
||||
|
||||
2012-06-22 Tobias Burnus <burnus@net-b.de>
|
||||
|
||||
Backport from mainline
|
||||
|
|
|
@ -2398,7 +2398,6 @@ gfc_add_loop_ss_code (gfc_loopinfo * loop, gfc_ss * ss, bool subscript,
|
|||
gfc_ss_info *ss_info;
|
||||
gfc_array_info *info;
|
||||
gfc_expr *expr;
|
||||
bool skip_nested = false;
|
||||
int n;
|
||||
|
||||
/* Don't evaluate the arguments for realloc_lhs_loop_for_fcn_call; otherwise,
|
||||
|
@ -2487,12 +2486,7 @@ gfc_add_loop_ss_code (gfc_loopinfo * loop, gfc_ss * ss, bool subscript,
|
|||
/* Add the expressions for scalar and vector subscripts. */
|
||||
for (n = 0; n < GFC_MAX_DIMENSIONS; n++)
|
||||
if (info->subscript[n])
|
||||
{
|
||||
gfc_add_loop_ss_code (loop, info->subscript[n], true, where);
|
||||
/* The recursive call will have taken care of the nested loops.
|
||||
No need to do it twice. */
|
||||
skip_nested = true;
|
||||
}
|
||||
gfc_add_loop_ss_code (loop, info->subscript[n], true, where);
|
||||
|
||||
set_vector_loop_bounds (ss);
|
||||
break;
|
||||
|
@ -2548,7 +2542,7 @@ gfc_add_loop_ss_code (gfc_loopinfo * loop, gfc_ss * ss, bool subscript,
|
|||
}
|
||||
}
|
||||
|
||||
if (!skip_nested)
|
||||
if (!subscript)
|
||||
for (nested_loop = loop->nested; nested_loop;
|
||||
nested_loop = nested_loop->next)
|
||||
gfc_add_loop_ss_code (nested_loop, nested_loop->ss, subscript, where);
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2012-07-06 Mikael Morin <mikael@gcc.gnu.org>
|
||||
|
||||
PR fortran/53732
|
||||
* gfortran.dg/inline_sum_4.f90: New test.
|
||||
|
||||
2012-07-06 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
Backport from mainline
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
! { dg-do compile }
|
||||
!
|
||||
! PR fortran/53732
|
||||
! this was leading to an internal "mismatching comparison operand types"
|
||||
! error.
|
||||
!
|
||||
! Original testcase by minzastro <minzastro@googlemail.com>
|
||||
! Fixed by Dominique Dhumieres <dominiq@lps.ens.fr>
|
||||
|
||||
program test
|
||||
implicit none
|
||||
|
||||
real(8) arr(4,4,4,4)
|
||||
|
||||
arr(:,:,:,:) = 1d0
|
||||
|
||||
arr(1,:,:,:) = sum(arr, dim=1, mask=(arr(:,:,:,:) > 0d0))
|
||||
|
||||
end program test
|
Loading…
Reference in New Issue