Message ID | 20170721142947.5654-1-amonakov@ispras.ru |
---|---|
State | New |
Headers | show |
Am 21.07.2017 um 16:29 schrieb Alexander Monakov: > Bootstrapped and regtested on x86-64, OK for trunk? > > * interface.c (pair_cmp): Fix gfc_symbol comparison. Adjust comment. OK. Thanks for the patch! Regards Thomas
diff --git a/gcc/fortran/interface.c b/gcc/fortran/interface.c index 6fe0647..13e2bdd 100644 --- a/gcc/fortran/interface.c +++ b/gcc/fortran/interface.c @@ -3294,7 +3294,7 @@ argpair; order: - p->a->expr == NULL - p->a->expr->expr_type != EXPR_VARIABLE - - growing p->a->expr->symbol. */ + - by gfc_symbol pointer value (larger first). */ static int pair_cmp (const void *p1, const void *p2) @@ -3320,6 +3320,8 @@ pair_cmp (const void *p1, const void *p2) } if (a2->expr->expr_type != EXPR_VARIABLE) return 1; + if (a1->expr->symtree->n.sym > a2->expr->symtree->n.sym) + return -1; return a1->expr->symtree->n.sym < a2->expr->symtree->n.sym; }