diff options
author | Janus Weil <janus@gcc.gnu.org> | 2016-12-13 19:55:20 +0100 |
---|---|---|
committer | Janus Weil <janus@gcc.gnu.org> | 2016-12-13 19:55:20 +0100 |
commit | 7a28353e36d0c2b1dc81883437d2064a50c00e8e (patch) | |
tree | 9d1e9d025f22b461e270aae2ebd39ebc4c5a4ffb /gcc/fortran/array.c | |
parent | c3c54e0f074083d3bdfe97153a704f5584ec3fa4 (diff) | |
download | gcc-7a28353e36d0c2b1dc81883437d2064a50c00e8e.zip gcc-7a28353e36d0c2b1dc81883437d2064a50c00e8e.tar.gz gcc-7a28353e36d0c2b1dc81883437d2064a50c00e8e.tar.bz2 |
re PR fortran/78798 ([cleanup] some int-valued functions should be bool)
2016-12-13 Janus Weil <janus@gcc.gnu.org>
PR fortran/78798
* gfortran.h (gfc_is_constant_expr, gfc_is_formal_arg,
gfc_is_compile_time_shape): Return bool instead of int.
* array.c (gfc_is_compile_time_shape): Ditto.
* expr.c (gfc_is_constant_expr): Ditto.
* resolve.c (gfc_is_formal_arg): Ditto. Make formal_arg_flag bool.
From-SVN: r243621
Diffstat (limited to 'gcc/fortran/array.c')
-rw-r--r-- | gcc/fortran/array.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/gcc/fortran/array.c b/gcc/fortran/array.c index e6917a5..154b860 100644 --- a/gcc/fortran/array.c +++ b/gcc/fortran/array.c @@ -2581,18 +2581,16 @@ gfc_find_array_ref (gfc_expr *e) /* Find out if an array shape is known at compile time. */ -int +bool gfc_is_compile_time_shape (gfc_array_spec *as) { - int i; - if (as->type != AS_EXPLICIT) - return 0; + return false; - for (i = 0; i < as->rank; i++) + for (int i = 0; i < as->rank; i++) if (!gfc_is_constant_expr (as->lower[i]) || !gfc_is_constant_expr (as->upper[i])) - return 0; + return false; - return 1; + return true; } |