Sandra Loosemore wrote:

It's not clear whether a metadirective in a loop nest is supposed to
be valid, but GCC certainly shouldn't be ICE'ing after diagnosing it
as an error.

gcc/c/ChangeLog
        PR c/120180
        * c-parser.cc (c_parser_omp_metadirective): Only consume the
        token if it is the expected ')'.

gcc/cp/ChangeLog
        PR c/120180
        * parser.cc (cp_parser_omp_metadirective): Only consume the
        token if it is the expected ')'.

gcc/testsuite/ChangeLog
        PR c/120180
        * c-c++-common/gomp/pr12180.c: New.

LGTM; it is IMHO worthwhile to cherry-pick the ICE fix to GCC 15 (as proposed by you).

Thanks,

Tobias

Reply via email to