> On Sun, Nov 30, 2025 at 01:57:38PM +0100, Jose E. Marchesi wrote:
>> A few Fortran tests that pass both Fortran and C programs in the same
>> compilation check for warnings like:
>>
>> { dg-warning "command-line option '-fcheck=all' is valid for Fortran but
>> not for C" "" { target *-*-* } 0 }
>>
>> The problem is that the warning may actually indicate the option is
>> valid for other languages other than Fortran. Like in:
>>
>> warning: command-line option ‘-fcheck=all’ is valid for Algol68/Fortran
>> but not for C
>>
>> This patch modifies the regexps used in the tests in order to match
>> the language list strings generated by opts-global.cc:write_langs.
>>
>> Tested in x86_64-linux-gnu with make check-gfortran.
>>
>> gcc/testsuite/ChangeLog
>>
>> PR fortran/122923
>> * gfortran.dg/ISO_Fortran_binding_17.f90: Recognize language
>> list in warning regexp.
>> * gfortran.dg/c-interop/allocate-errors.f90: Likewise.
>> * gfortran.dg/c-interop/establish-errors.f90: Likewise.
>> * gfortran.dg/c-interop/pr113338.f90: Likewise.
>> * gfortran.dg/c-interop/section-errors.f90: Likewise.
>> * gfortran.dg/c-interop/select-errors.f90: Likewise.
>> * gfortran.dg/c-interop/setpointer-errors.f90: Likewise.
>
> LGTM.
Committed to trunk.
Thank you!