diff options
Diffstat (limited to 'gcc/fortran/interface.c')
-rw-r--r-- | gcc/fortran/interface.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/gcc/fortran/interface.c b/gcc/fortran/interface.c index d011d846d31..9f55f0a19f9 100644 --- a/gcc/fortran/interface.c +++ b/gcc/fortran/interface.c @@ -2566,7 +2566,7 @@ static int compare_actual_formal (gfc_actual_arglist **ap, gfc_formal_arglist *formal, int ranks_must_agree, int is_elemental, locus *where) { - gfc_actual_arglist **new_arg, *a, *actual, temp; + gfc_actual_arglist **new_arg, *a, *actual; gfc_formal_arglist *f; int i, n, na; unsigned long actual_size, formal_size; @@ -3029,13 +3029,8 @@ compare_actual_formal (gfc_actual_arglist **ap, gfc_formal_arglist *formal, if (na != 0) { - temp = *new_arg[0]; - *new_arg[0] = *actual; - *actual = temp; - - a = new_arg[0]; - new_arg[0] = new_arg[na]; - new_arg[na] = a; + std::swap (*new_arg[0], *actual); + std::swap (new_arg[0], new_arg[na]); } for (i = 0; i < n - 1; i++) |