]> git.ipfire.org Git - thirdparty/gcc.git/commit
openmp, fortran: Fix ICE when the procedure name cannot be found in declare variant...
authorKwok Cheung Yeung <kcyeung@baylibre.com>
Tue, 15 Jul 2025 14:26:26 +0000 (15:26 +0100)
committerKwok Cheung Yeung <kcyeung@baylibre.com>
Tue, 15 Jul 2025 14:27:22 +0000 (15:27 +0100)
commita05c4f4ee48f76e518dbd2a96e5083f4df833df7
tree31d3621584695d8606187ec71660c90af23a99d3
parent60e99b5703051115220ef2b186979d4c416de530
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.
gcc/fortran/trans-openmp.cc
gcc/testsuite/gfortran.dg/gomp/pr104428.f90 [new file with mode: 0644]