https://gcc.gnu.org/g:1f6c999f13194f3270c5b4c4d936169245269e6c
commit 1f6c999f13194f3270c5b4c4d936169245269e6c Author: Mikael Morin <[email protected]> Date: Mon Sep 28 13:17:33 2026 +0200 Suppression variables inutilisées Diff: --- gcc/fortran/primary.cc | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/gcc/fortran/primary.cc b/gcc/fortran/primary.cc index 918ad54c51f8..35f22da8ab39 100644 --- a/gcc/fortran/primary.cc +++ b/gcc/fortran/primary.cc @@ -3031,8 +3031,6 @@ gfc_variable_attr (gfc_expr *expr) gfc_symbol *sym; gfc_component *comp; gfc_typespec *current_ts; - bool has_inquiry_part; - bool has_substring_ref = false; if (expr->expr_type != EXPR_VARIABLE && expr->expr_type != EXPR_FUNCTION @@ -3079,16 +3077,11 @@ gfc_variable_attr (gfc_expr *expr) target = 0; } - has_inquiry_part = false; for (ref = expr->ref; ref; ref = ref->next) if (ref->type == REF_SUBSTRING) - { - has_substring_ref = true; - optional = false; - } + optional = false; else if (ref->type == REF_INQUIRY) { - has_inquiry_part = true; optional = false; break; }
