https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104428
--- Comment #8 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-15 branch has been updated by Kwok Yeung <k...@gcc.gnu.org>: https://gcc.gnu.org/g:c9965c37cd153b7764f147a77489db9827071ad0 commit r15-9979-gc9965c37cd153b7764f147a77489db9827071ad0 Author: Kwok Cheung Yeung <kcye...@baylibre.com> Date: Tue Jul 15 15:26:26 2025 +0100 openmp, fortran: Fix ICE when the procedure name cannot be found in declare variant directives [PR104428] The result of searching for the procedure name symbol should be checked in case the symbol cannot be found to avoid a null dereference. gcc/fortran/ PR fortran/104428 * trans-openmp.cc (gfc_trans_omp_declare_variant): Check that proc_st is non-NULL before dereferencing. Add line number to error message. gcc/testsuite/ PR fortran/104428 * gfortran.dg/gomp/pr104428.f90: New. (cherry picked from commit a05c4f4ee48f76e518dbd2a96e5083f4df833df7)