diff options
author | janus <janus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-12-13 18:55:20 +0000 |
---|---|---|
committer | janus <janus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-12-13 18:55:20 +0000 |
commit | 789702cd748f1fc08531674567a331b161a88f7d (patch) | |
tree | 9d1e9d025f22b461e270aae2ebd39ebc4c5a4ffb /gcc/fortran/array.c | |
parent | 91eedfd7de6817b05da221d3cee669f080b4cb0a (diff) |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@243621 138bc75d-0d04-0410-961f-82ee72b054a4
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 e6917a538508..154b86068974 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; } |