https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115271
--- Comment #6 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:6f3bca0db8645c2556e5a01669af4384bb230d87 commit r15-8067-g6f3bca0db8645c2556e5a01669af4384bb230d87 Author: Tobias Burnus <tbur...@baylibre.com> Date: Sat Mar 15 08:28:11 2025 +0100 Fortran: Store OpenMP's 'declare variant' in module file [PR115271] Write the 'omp declare variant' data into the .mod file: Base function, variant function(s), supporting the clauses match, append_args, and adjust_args. PR fortran/115271 gcc/fortran/ChangeLog: * module.cc (mio_omp_declare_simd_clauses): New, moved from ... (mio_omp_declare_simd): ... here. Update call, write empty '( )' if there is no declare simd but a declare variant. (mio_omp_declare_variant): New. (mio_symbol): Call it. * openmp.cc (gfc_match_omp_context_selector): Add comment about module.cc to TODO note. * trans-stmt.h (gfc_trans_omp_declare_variant): Take additional parent_ns argument. * trans-decl.cc (create_function_arglist, gfc_create_function_decl): Update call. * trans-openmp.cc (gfc_trans_omp_declare_variant): Take new argument, add some special case handling for attr.use_assoc. gcc/testsuite/ChangeLog: * gfortran.dg/gomp/declare-variant-mod-1-use.f90: New test. * gfortran.dg/gomp/declare-variant-mod-1.f90: New test. * gfortran.dg/gomp/declare-variant-mod-2-use.f90: New test. * gfortran.dg/gomp/declare-variant-mod-2.f90: New test.