aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Henderson <rth@cygnus.com>1997-12-18 15:11:42 -0800
committerJeff Law <law@gcc.gnu.org>1997-12-18 16:11:42 -0700
commit8342981f2de7306bf857c96b8b418be8882a0c63 (patch)
tree1f5da7670ce1a6a93e7a6e2181fac33d74360569 /gcc
parentdfe9141827d18651bf75ac735c0f28f6ebbbe1ca (diff)
downloadgcc-8342981f2de7306bf857c96b8b418be8882a0c63.zip
gcc-8342981f2de7306bf857c96b8b418be8882a0c63.tar.gz
gcc-8342981f2de7306bf857c96b8b418be8882a0c63.tar.bz2
* com.c (ffecom_sym_transform_): Assumed arrays have no upper bound.
From-SVN: r17141
Diffstat (limited to 'gcc')
-rw-r--r--gcc/f/ChangeLog.egcs4
-rw-r--r--gcc/f/com.c24
2 files changed, 18 insertions, 10 deletions
diff --git a/gcc/f/ChangeLog.egcs b/gcc/f/ChangeLog.egcs
index e491107..85fd788 100644
--- a/gcc/f/ChangeLog.egcs
+++ b/gcc/f/ChangeLog.egcs
@@ -1,3 +1,7 @@
+Fri Dec 19 00:12:01 1997 Richard Henderson <rth@cygnus.com>
+
+ * com.c (ffecom_sym_transform_): Assumed arrays have no upper bound.
+
Mon Dec 15 17:35:35 1997 Richard Henderson <rth@cygnus.com>
* com.c (ffecom_type_vardesc_): Vardesc.dims is a `ftnlen*'.
diff --git a/gcc/f/com.c b/gcc/f/com.c
index bf77e51..6d33573 100644
--- a/gcc/f/com.c
+++ b/gcc/f/com.c
@@ -8260,13 +8260,17 @@ ffecom_sym_transform_ (ffesymbol s)
assert (ffebld_right (dim) != NULL);
if ((ffebld_op (ffebld_right (dim)) == FFEBLD_opSTAR)
|| ffecom_doing_entry_)
- /* Used to just do high=low. But for ffecom_tree_
- canonize_ref_, it probably is important to correctly
- assess the size. E.g. given COMPLEX C(*),CFUNC and
- C(2)=CFUNC(C), overlap can happen, while it can't
- for, say, C(1)=CFUNC(C(2)). */
- high = convert (TREE_TYPE (low),
- TYPE_MAX_VALUE (TREE_TYPE (low)));
+ {
+ /* Used to just do high=low. But for ffecom_tree_
+ canonize_ref_, it probably is important to correctly
+ assess the size. E.g. given COMPLEX C(*),CFUNC and
+ C(2)=CFUNC(C), overlap can happen, while it can't
+ for, say, C(1)=CFUNC(C(2)). */
+ /* Even more recently used to set to INT_MAX, but that
+ broke when some overflow checking went into the back
+ end. Now we just leave the upper bound unspecified. */
+ high = NULL;
+ }
else
high = ffecom_expr (ffebld_right (dim));
@@ -8406,7 +8410,7 @@ ffecom_sym_transform_ (ffesymbol s)
if (!adjustable
&& ((TREE_CODE (low) != INTEGER_CST)
- || (TREE_CODE (high) != INTEGER_CST)))
+ || (high && TREE_CODE (high) != INTEGER_CST)))
adjustable = TRUE;
#if 0 /* Old approach -- see below. */
@@ -8416,7 +8420,7 @@ ffecom_sym_transform_ (ffesymbol s)
low,
ffecom_integer_zero_node);
- if (TREE_CODE (high) != INTEGER_CST)
+ if (high && TREE_CODE (high) != INTEGER_CST)
high = ffecom_3 (COND_EXPR, integer_type_node,
ffecom_adjarray_passed_ (s),
high,
@@ -8432,7 +8436,7 @@ ffecom_sym_transform_ (ffesymbol s)
/* ~~~similarly, this fixes dumb0.f. The C front end
does this, which is why dumb0.c would work. */
- if (TREE_CODE (high) != INTEGER_CST)
+ if (high && TREE_CODE (high) != INTEGER_CST)
high = variable_size (high);
type