aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/simplify.c
diff options
context:
space:
mode:
authorVictor Leikehman <lei@il.ibm.com>2004-08-08 12:28:25 +0000
committerPaul Brook <pbrook@gcc.gnu.org>2004-08-08 12:28:25 +0000
commit94538bd12ae8ffa02164399a616ef806e77f797b (patch)
tree9f3bff0e67ca9e26d25d40bbb89175a03d998121 /gcc/fortran/simplify.c
parent352a77c8dc72715bbe230e04cd72583d5a900291 (diff)
downloadgcc-94538bd12ae8ffa02164399a616ef806e77f797b.zip
gcc-94538bd12ae8ffa02164399a616ef806e77f797b.tar.gz
gcc-94538bd12ae8ffa02164399a616ef806e77f797b.tar.bz2
simplify.c (gfc_simplify_shape): Bugfix.
2004-08-08 Victor Leikehman <lei@il.ibm.com> * simplify.c (gfc_simplify_shape): Bugfix. * expr.c (gfc_copy_shape_excluding): New function. * gfortran.h (gfc_get_shape): Bugfix. (gfc_copy_shape_excluding): Added declaration. * iresolve.c (gfc_resolve_all, gfc_resolve_any, gfc_resolve_count, gfc_resolve_cshift, gfc_resolve_eoshift, gfc_resolve_lbound, gfc_resolve_ubound, gfc_resolve_transpose): Added compile time resolution of shape. From-SVN: r85685
Diffstat (limited to 'gcc/fortran/simplify.c')
-rw-r--r--gcc/fortran/simplify.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/fortran/simplify.c b/gcc/fortran/simplify.c
index 0a32d6f..bffda59 100644
--- a/gcc/fortran/simplify.c
+++ b/gcc/fortran/simplify.c
@@ -3213,12 +3213,12 @@ gfc_simplify_shape (gfc_expr * source)
int n;
try t;
+ if (source->rank == 0 || source->expr_type != EXPR_VARIABLE)
+ return NULL;
+
result = gfc_start_constructor (BT_INTEGER, gfc_default_integer_kind (),
&source->where);
- if (source->rank == 0 || source->expr_type != EXPR_VARIABLE)
- return result;
-
ar = gfc_find_array_ref (source);
t = gfc_array_ref_shape (ar, shape);