re PR fortran/64771 (ICE(segfault) when passing coarrays around; ICE in gfc_zero_size...
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Tue, 27 Jan 2015 18:44:35 +0000 (18:44 +0000)
committerTobias Burnus <burnus@gcc.gnu.org>
Tue, 27 Jan 2015 18:44:35 +0000 (19:44 +0100)
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

gcc/fortran/ChangeLog
gcc/fortran/interface.c

index 6a9b71da6718ae56a51c32aa352a93b701972889..820aad591e5a7c42a7c63828b4d5646a31e5961c 100644 (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
index 0463a58fa7f6fd9c841feac929252c1995a3e8c2..837dc8c42283e74d5a17754f91b1f94196ed0607 100644 (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]));