https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104428
--- Comment #7 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Kwok Yeung <k...@gcc.gnu.org>: https://gcc.gnu.org/g:a05c4f4ee48f76e518dbd2a96e5083f4df833df7 commit r16-2263-ga05c4f4ee48f76e518dbd2a96e5083f4df833df7 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.