]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Add comment to indicate tail recursion
authorRichard Biener <rguenther@suse.de>
Tue, 30 Nov 2021 14:25:17 +0000 (15:25 +0100)
committerRichard Biener <rguenther@suse.de>
Tue, 30 Nov 2021 14:27:46 +0000 (15:27 +0100)
My previous change removed an unreachable break; there (an
unreachable continue; would have been more to the point).  The
following re-adds a comment explaining that WALK_SUBEXPR_TAIL
does not fall through but tail recurses.

2021-11-30  Richard Biener  <rguenther@suse.de>

gcc/fortran/
* frontend-passes.c (gfc_expr_walker): Add comment to
indicate tail recursion.

gcc/fortran/frontend-passes.c

index 16ee2afc9c0a51378b490b8a5bf71af066c5e4a7..4764c834f4f2cecb8126881d6aa934973ad400b6 100644 (file)
@@ -5229,6 +5229,7 @@ gfc_expr_walker (gfc_expr **e, walk_expr_fn_t exprfn, void *data)
          case EXPR_OP:
            WALK_SUBEXPR ((*e)->value.op.op1);
            WALK_SUBEXPR_TAIL ((*e)->value.op.op2);
+           /* No fallthru because of the tail recursion above.  */
          case EXPR_FUNCTION:
            for (a = (*e)->value.function.actual; a; a = a->next)
              WALK_SUBEXPR (a->expr);