https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119541
--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Tobias Burnus <bur...@gcc.gnu.org>: https://gcc.gnu.org/g:f3899e0fd3f9aa6b579a21e87b50c61ea5c448df commit r15-9063-gf3899e0fd3f9aa6b579a21e87b50c61ea5c448df Author: Tobias Burnus <tbur...@baylibre.com> Date: Mon Mar 31 11:44:26 2025 +0200 OpenMP: modify_call_for_omp_dispatch - fix invalid memory access after 'error' [PR119541] OpenMP requires that the number of dispatch 'interop' clauses (ninterop) is less or equal to the number of declare variant 'append_args' interop objects (nappend). While 'nappend < ninterop' was diagnosed as error, the processing continues, which lead to an invalid out-of-bounds memory access. Solution: only process the first nappend 'interop' clauses. gcc/ChangeLog: PR middle-end/119541 * gimplify.cc (modify_call_for_omp_dispatch): Limit interop claues processing by the number of append_args arguments.