diff options
author | Roger Sayle <sayle@gcc.gnu.org> | 2006-12-17 18:28:07 +0000 |
---|---|---|
committer | Roger Sayle <sayle@gcc.gnu.org> | 2006-12-17 18:28:07 +0000 |
commit | fcd443200bdf5cefcfd2a711ae6fae6239443aca (patch) | |
tree | e7831650401f70808448a7867424483017c55832 /gcc/fortran/trans-array.c | |
parent | 2ef73bb4ef051fdcf5e186465fa9bf4f7933f8f3 (diff) | |
download | gcc-fcd443200bdf5cefcfd2a711ae6fae6239443aca.zip gcc-fcd443200bdf5cefcfd2a711ae6fae6239443aca.tar.gz gcc-fcd443200bdf5cefcfd2a711ae6fae6239443aca.tar.bz2 |
re PR fortran/30207 (ICE in gfc_dep_resolver with where (a < 0) a(:) = 1)
2006-12-17 Roger Sayle <roger@eyesopen.com>
Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/30207
* dependency.c (gfc_full_array_ref_p): New function to test whether
the given array ref specifies the entire array.
(gfc_dep_resolver): Use gfc_full_array_ref_p to analyze AR_FULL
array refs against AR_SECTION array refs, and vice versa.
* dependency.h (gfc_full_array_ref_p): Prototype here.
* trans-array.c (gfc_conv_expr_descriptor): Use gfc_full_array_ref_p.
* gfortran.fortran-torture/execute/where21.f90: New test.
From-SVN: r119990
Diffstat (limited to 'gcc/fortran/trans-array.c')
-rw-r--r-- | gcc/fortran/trans-array.c | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c index b65ec74..23163d5 100644 --- a/gcc/fortran/trans-array.c +++ b/gcc/fortran/trans-array.c @@ -4147,7 +4147,6 @@ gfc_conv_expr_descriptor (gfc_se * se, gfc_expr * expr, gfc_ss * ss) tree start; tree offset; int full; - gfc_ref *ref; gcc_assert (ss != gfc_ss_terminator); @@ -4184,25 +4183,7 @@ gfc_conv_expr_descriptor (gfc_se * se, gfc_expr * expr, gfc_ss * ss) else if (se->direct_byref) full = 0; else - { - ref = info->ref; - gcc_assert (ref->u.ar.type == AR_SECTION); - - full = 1; - for (n = 0; n < ref->u.ar.dimen; n++) - { - /* Detect passing the full array as a section. This could do - even more checking, but it doesn't seem worth it. */ - if (ref->u.ar.start[n] - || ref->u.ar.end[n] - || (ref->u.ar.stride[n] - && !gfc_expr_is_one (ref->u.ar.stride[n], 0))) - { - full = 0; - break; - } - } - } + full = gfc_full_array_ref_p (info->ref); if (full) { |