Commit 47da0bf6 by Rainer Orth Committed by Tobias Burnus

re PR fortran/64771 (ICE(segfault) when passing coarrays around; ICE in…

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
parent 6e17947e
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> 2015-01-26 Paul Thomas <pault@gcc.gnu.org>
PR fortran/62044 PR fortran/62044
......
...@@ -63,8 +63,6 @@ along with GCC; see the file COPYING3. If not see ...@@ -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 formal argument list points to symbols within the same namespace as
the program unit name. */ the program unit name. */
#include <algorithm> /* For std::max. */
#include "config.h" #include "config.h"
#include "system.h" #include "system.h"
#include "coretypes.h" #include "coretypes.h"
...@@ -1215,7 +1213,7 @@ check_dummy_characteristics (gfc_symbol *s1, gfc_symbol *s2, ...@@ -1215,7 +1213,7 @@ check_dummy_characteristics (gfc_symbol *s1, gfc_symbol *s2,
} }
if (s1->as->type == AS_EXPLICIT) 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]), shape1 = gfc_subtract (gfc_copy_expr (s1->as->upper[i]),
gfc_copy_expr (s1->as->lower[i])); gfc_copy_expr (s1->as->lower[i]));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment