https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119540
--- Comment #7 from anlauf at gcc dot gnu.org ---
(In reply to anlauf from comment #4)
> (In reply to anlauf from comment #3)
> > I might be missing to set some elem_len or span or ...
>
> Testcase:
The apparent string length issue with -fcheck=bounds can be suppressed
by inhibiting the check for artificial dummies of the wrapper using:
diff --git a/gcc/fortran/trans-decl.cc b/gcc/fortran/trans-decl.cc
index 8dd1c93dbdf..2bd741919b0 100644
--- a/gcc/fortran/trans-decl.cc
+++ b/gcc/fortran/trans-decl.cc
@@ -6548,6 +6548,8 @@ add_argument_checking (stmtblock_t *block, gfc_symbol
*sym)
}
else if (fsym->as && fsym->as->rank != 0)
continue;
+ else if (fsym->attr.artificial)
+ continue;
else
{
comparison = LT_EXPR;