diff options
author | Thomas Schwinge <thomas@codesourcery.com> | 2019-03-21 20:44:34 +0100 |
---|---|---|
committer | Thomas Schwinge <tschwinge@gcc.gnu.org> | 2019-03-21 20:44:34 +0100 |
commit | 33fc9dc962db960bde7473ef392ad3f9b4701ced (patch) | |
tree | e3369c2fa8a93745373a59608d210589549274a5 | |
parent | a77457430eb50bff3bb071e3eb0e7c88056d373f (diff) | |
download | gcc-33fc9dc962db960bde7473ef392ad3f9b4701ced.zip gcc-33fc9dc962db960bde7473ef392ad3f9b4701ced.tar.gz gcc-33fc9dc962db960bde7473ef392ad3f9b4701ced.tar.bz2 |
[testsuite, Fortran] Provide 'dg-compile-aux-modules' in 'gfortran.dg/goacc/goacc.exp'
..., as yet another copy from 'gfortran.dg/dg.exp', which there are a few
already.
gcc/testsuite/
* gfortran.dg/goacc/goacc.exp (dg-compile-aux-modules): New proc.
From-SVN: r269854
-rw-r--r-- | gcc/testsuite/ChangeLog | 2 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/goacc/goacc.exp | 25 |
2 files changed, 27 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a5211cc..1f2f3eb 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,7 @@ 2019-03-21 Thomas Schwinge <thomas@codesourcery.com> + * gfortran.dg/goacc/goacc.exp (dg-compile-aux-modules): New proc. + PR fortran/56408 * gcc.target/powerpc/ppc-fortran/ppc-fortran.exp (dg-compile-aux-modules): Fix diagnostic. diff --git a/gcc/testsuite/gfortran.dg/goacc/goacc.exp b/gcc/testsuite/gfortran.dg/goacc/goacc.exp index f1adb18..1b093f6 100644 --- a/gcc/testsuite/gfortran.dg/goacc/goacc.exp +++ b/gcc/testsuite/gfortran.dg/goacc/goacc.exp @@ -28,6 +28,31 @@ if ![check_effective_target_fopenacc] { # Initialize `dg'. dg-init +global gfortran_test_path +global gfortran_aux_module_flags +set gfortran_test_path $srcdir/$subdir +set gfortran_aux_module_flags "-fopenacc" +proc dg-compile-aux-modules { args } { + global gfortran_test_path + global gfortran_aux_module_flags + if { [llength $args] != 2 } { + error "dg-compile-aux-modules: needs one argument" + return + } + + set level [info level] + if { [info procs dg-save-unknown] != [list] } { + rename dg-save-unknown dg-save-unknown-level-$level + } + + dg-test $gfortran_test_path/[lindex $args 1] "" $gfortran_aux_module_flags + # cleanup-modules is intentionally not invoked here. + + if { [info procs dg-save-unknown-level-$level] != [list] } { + rename dg-save-unknown-level-$level dg-save-unknown + } +} + # Main loop. gfortran-dg-runtest [lsort \ [find $srcdir/$subdir *.\[fF\]{,90,95,03,08} ] ] "" "-fopenacc" |