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  <ro@CeBiTec.Uni-Bielefeld.DE>

        PR fortran/64771
        * interface.c: Remove <algorithm>.
        (check_dummy_characteristics): Use MAX instead of std::max.

From-SVN: r220182
This commit is contained in:
Rainer Orth 2015-01-27 18:44:35 +00:00 committed by Tobias Burnus
parent 6e17947e9f
commit 47da0bf6fb
2 changed files with 7 additions and 3 deletions

View File

@ -1,3 +1,9 @@
2015-01-27 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
PR fortran/64771
* interface.c: Remove <algorithm>.
(check_dummy_characteristics): Use MAX instead of std::max.
2015-01-26 Paul Thomas <pault@gcc.gnu.org>
PR fortran/62044

View File

@ -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 <algorithm> /* 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]));