https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122923
Bug ID: 122923
Summary: Too stringent regexp for "<option> is valid for
<langs> but not for <lang>" in some fortran tests
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: jemarch at gcc dot gnu.org
Target Milestone: ---
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
The regular expression should be adapted to that fact, by recognizing all
strings that could be generated by gcc/opts-global.cc:write_langs.