From: Richard Henderson Date: Wed, 11 Feb 1998 00:41:14 +0000 (-0800) Subject: com.c (ffecom_ptr_to_expr): Do upper - lower in the native type, so as to properly... X-Git-Tag: prereleases/egcs-1.0.2-prerelease~50 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d4f37c41082765e46f559511f4abfb3adb7efb20;p=thirdparty%2Fgcc.git 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: r17845 --- diff --git a/gcc/f/ChangeLog.egcs b/gcc/f/ChangeLog.egcs index d0a048fd553f..7ab871286150 100644 --- a/gcc/f/ChangeLog.egcs +++ b/gcc/f/ChangeLog.egcs @@ -1,3 +1,8 @@ +Tue Feb 10 03:13:48 1998 Richard Henderson + + * com.c (ffecom_ptr_to_expr) [FFEBLD_opARRAYREF]: Do upper - lower + in the native type, so as to properly handle negative indices. + Mon Feb 9 00:49:55 1998 Craig Burley Fix -fpedantic combined with `F()' invocation, diff --git a/gcc/f/com.c b/gcc/f/com.c index bf77e515082c..a63864a1ad5d 100644 --- a/gcc/f/com.c +++ b/gcc/f/com.c @@ -13036,9 +13036,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;