[PR72741] Encode OpenACC 'routine' directive's level of parallelism inside Fortran...
authorThomas Schwinge <thomas@codesourcery.com>
Thu, 21 Mar 2019 19:44:45 +0000 (20:44 +0100)
committerThomas Schwinge <tschwinge@gcc.gnu.org>
Thu, 21 Mar 2019 19:44:45 +0000 (20:44 +0100)
commit64a40f1320c0edc160796266876958ffae8fdd96
treec6693f7c88b6234ff4e8278093dafbab7279e3c4
parent33fc9dc962db960bde7473ef392ad3f9b4701ced
[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.

From-SVN: r269855
gcc/fortran/ChangeLog
gcc/fortran/module.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/goacc/routine-module-1.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/goacc/routine-module-2.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/goacc/routine-module-mod-1.f90 [new file with mode: 0644]