diff options
author | Richard Henderson <rth@cygnus.com> | 1998-02-10 16:44:03 -0800 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1998-02-10 17:44:03 -0700 |
commit | e203760cfa2d838f0eb71cee3a101aef31ebc11f (patch) | |
tree | 6c2d3b80d5517324f6c47e97c967d31e1b2f9c2a /gcc | |
parent | a2d53b285d44f774b3cf892baa69c4a40e60164f (diff) | |
download | gcc-e203760cfa2d838f0eb71cee3a101aef31ebc11f.zip gcc-e203760cfa2d838f0eb71cee3a101aef31ebc11f.tar.gz gcc-e203760cfa2d838f0eb71cee3a101aef31ebc11f.tar.bz2 |
com.c (ffecom_ptr_to_expr): Do upper - lower in the native type, so as to properly handle negative indices.
* com.c (ffecom_ptr_to_expr) [FFEBLD_opARRAYREF]: Do upper - lower
in the native type, so as to properly handle negative indices.
From-SVN: r17847
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/f/ChangeLog.egcs | 5 | ||||
-rw-r--r-- | gcc/f/com.c | 8 |
2 files changed, 10 insertions, 3 deletions
diff --git a/gcc/f/ChangeLog.egcs b/gcc/f/ChangeLog.egcs index da2b7ef..ab70deb 100644 --- a/gcc/f/ChangeLog.egcs +++ b/gcc/f/ChangeLog.egcs @@ -1,3 +1,8 @@ +Wed Feb 11 01:44:48 1998 Richard Henderson (rth@cygnus.com) + + * com.c (ffecom_ptr_to_expr) [FFEBLD_opARRAYREF]: Do upper - lower + in the native type, so as to properly handle negative indices. + Fri Jan 9 19:09:07 1998 Craig Burley <burley@gnu.org> Fix -fpedantic combined with `F()' invocation, diff --git a/gcc/f/com.c b/gcc/f/com.c index 49b2f24..4934134 100644 --- a/gcc/f/com.c +++ b/gcc/f/com.c @@ -13032,9 +13032,11 @@ ffecom_ptr_to_expr (ffebld expr) item, size_binop (MULT_EXPR, size_in_bytes (TREE_TYPE (array)), - size_binop (MINUS_EXPR, - ffecom_expr (dims[i]), - TYPE_MIN_VALUE (TYPE_DOMAIN (array))))); + convert (sizetype, + fold (build (MINUS_EXPR, + TREE_TYPE (TYPE_MIN_VALUE (TYPE_DOMAIN (array))), + ffecom_expr (dims[i]), + TYPE_MIN_VALUE (TYPE_DOMAIN (array))))))); } } return item; |