https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72741
--- Comment #12 from Thomas Schwinge <tschwinge at gcc dot gnu.org> --- Author: tschwinge Date: Thu Mar 21 19:44:45 2019 New Revision: 269855 URL: https://gcc.gnu.org/viewcvs?rev=269855&root=gcc&view=rev Log: [PR72741] Encode OpenACC 'routine' directive's level of parallelism inside Fortran module files If 'use'ing with an old GCC a new module file (with OpenACC 'routine' directive's level of parallelism encoded), then that expectedly fails as follows: f951: Fatal Error: Reading module 'routine_module_mod_1' at line 27 column 21: find_enum(): Enum not found If 'use'ing with a new GCC an old module file (without OpenACC 'routine' directive's level of parallelism encoded), then that (silently) continues to accept the module file, and will proceed with the previous, erroneous behavior. These seem to be acceptable compromises, instead of incrementing 'MOD_VERSION'. gcc/fortran/ PR fortran/72741 * module.c (verify_OACC_ROUTINE_LOP_NONE): New function. (enum ab_attribute): Add AB_OACC_ROUTINE_LOP_GANG, AB_OACC_ROUTINE_LOP_WORKER, AB_OACC_ROUTINE_LOP_VECTOR, AB_OACC_ROUTINE_LOP_SEQ. (attr_bits): Add these. (mio_symbol_attribute): Handle these. gcc/testsuite/ PR fortran/72741 * gfortran.dg/goacc/routine-module-1.f90: New file. * gfortran.dg/goacc/routine-module-2.f90: Likewise. * gfortran.dg/goacc/routine-module-mod-1.f90: Likewise. Added: trunk/gcc/testsuite/gfortran.dg/goacc/routine-module-1.f90 trunk/gcc/testsuite/gfortran.dg/goacc/routine-module-2.f90 trunk/gcc/testsuite/gfortran.dg/goacc/routine-module-mod-1.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/module.c trunk/gcc/testsuite/ChangeLog