From: Rainer Orth Date: Tue, 27 Jan 2015 18:44:35 +0000 (+0000) Subject: re PR fortran/64771 (ICE(segfault) when passing coarrays around; ICE in gfc_zero_size... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=47da0bf6fbf3ca60bfd8a44a557dcf69bd4c053b;p=gcc.git re PR fortran/64771 (ICE(segfault) when passing coarrays around; ICE in gfc_zero_size_array in arith.c:1637) 2015-01-27 Rainer Orth PR fortran/64771 * interface.c: Remove . (check_dummy_characteristics): Use MAX instead of std::max. From-SVN: r220182 --- diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 6a9b71da671..820aad591e5 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2015-01-27 Rainer Orth + + PR fortran/64771 + * interface.c: Remove . + (check_dummy_characteristics): Use MAX instead of std::max. + 2015-01-26 Paul Thomas PR fortran/62044 diff --git a/gcc/fortran/interface.c b/gcc/fortran/interface.c index 0463a58fa7f..837dc8c4228 100644 --- a/gcc/fortran/interface.c +++ b/gcc/fortran/interface.c @@ -63,8 +63,6 @@ along with GCC; see the file COPYING3. If not see formal argument list points to symbols within the same namespace as the program unit name. */ -#include /* For std::max. */ - #include "config.h" #include "system.h" #include "coretypes.h" @@ -1215,7 +1213,7 @@ check_dummy_characteristics (gfc_symbol *s1, gfc_symbol *s2, } if (s1->as->type == AS_EXPLICIT) - for (i = 0; i < s1->as->rank + std::max(0, s1->as->corank-1); i++) + for (i = 0; i < s1->as->rank + MAX (0, s1->as->corank-1); i++) { shape1 = gfc_subtract (gfc_copy_expr (s1->as->upper[i]), gfc_copy_expr (s1->as->lower[i]));