mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-11-24 11:24:05 +08:00
_OPENMP pre-processor checks, openmp_version Fortran instrinsic checks.
gcc/testsuite/ * c-c++-common/cpp/openmp-define-1.c: New file. * c-c++-common/cpp/openmp-define-2.c: Likewise. * c-c++-common/cpp/openmp-define-3.c: Likewise. * gfortran.dg/openmp-define-1.f90: Likewise. * gfortran.dg/openmp-define-2.f90: Likewise. * gfortran.dg/openmp-define-3.f90: Likewise. libgomp/ * testsuite/libgomp.fortran/openmp_version-1.f: New file. * testsuite/libgomp.fortran/openmp_version-2.f90: Likewise. From-SVN: r203417
This commit is contained in:
parent
1e723fd75e
commit
86a6016dcc
@ -1,5 +1,12 @@
|
||||
2013-10-11 Thomas Schwinge <thomas@codesourcery.com>
|
||||
|
||||
* c-c++-common/cpp/openmp-define-1.c: New file.
|
||||
* c-c++-common/cpp/openmp-define-2.c: Likewise.
|
||||
* c-c++-common/cpp/openmp-define-3.c: Likewise.
|
||||
* gfortran.dg/openmp-define-1.f90: Likewise.
|
||||
* gfortran.dg/openmp-define-2.f90: Likewise.
|
||||
* gfortran.dg/openmp-define-3.f90: Likewise.
|
||||
|
||||
* g++.dg/gomp/gomp.exp: Recurse into subdirectories when looking
|
||||
for test source files.
|
||||
* gcc.dg/gomp/gomp.exp: Likewise.
|
||||
|
6
gcc/testsuite/c-c++-common/cpp/openmp-define-1.c
Normal file
6
gcc/testsuite/c-c++-common/cpp/openmp-define-1.c
Normal file
@ -0,0 +1,6 @@
|
||||
/* { dg-require-effective-target fopenmp } */
|
||||
/* { dg-do preprocess } */
|
||||
|
||||
#ifdef _OPENMP
|
||||
# error _OPENMP defined
|
||||
#endif
|
7
gcc/testsuite/c-c++-common/cpp/openmp-define-2.c
Normal file
7
gcc/testsuite/c-c++-common/cpp/openmp-define-2.c
Normal file
@ -0,0 +1,7 @@
|
||||
/* { dg-require-effective-target fopenmp } */
|
||||
/* { dg-options "-fno-openmp" } */
|
||||
/* { dg-do preprocess } */
|
||||
|
||||
#ifdef _OPENMP
|
||||
# error _OPENMP defined
|
||||
#endif
|
11
gcc/testsuite/c-c++-common/cpp/openmp-define-3.c
Normal file
11
gcc/testsuite/c-c++-common/cpp/openmp-define-3.c
Normal file
@ -0,0 +1,11 @@
|
||||
/* { dg-require-effective-target fopenmp } */
|
||||
/* { dg-options "-fopenmp" } */
|
||||
/* { dg-do preprocess } */
|
||||
|
||||
#ifndef _OPENMP
|
||||
# error _OPENMP not defined
|
||||
#endif
|
||||
|
||||
#if _OPENMP != 201307
|
||||
# error _OPENMP defined to wrong value
|
||||
#endif
|
7
gcc/testsuite/gfortran.dg/openmp-define-1.f90
Normal file
7
gcc/testsuite/gfortran.dg/openmp-define-1.f90
Normal file
@ -0,0 +1,7 @@
|
||||
! { dg-require-effective-target fopenmp }
|
||||
! { dg-options "-cpp" }
|
||||
! { dg-do preprocess }
|
||||
|
||||
#ifdef _OPENMP
|
||||
# error _OPENMP defined
|
||||
#endif
|
7
gcc/testsuite/gfortran.dg/openmp-define-2.f90
Normal file
7
gcc/testsuite/gfortran.dg/openmp-define-2.f90
Normal file
@ -0,0 +1,7 @@
|
||||
! { dg-require-effective-target fopenmp }
|
||||
! { dg-options "-cpp -fno-openmp" }
|
||||
! { dg-do preprocess }
|
||||
|
||||
#ifdef _OPENMP
|
||||
# error _OPENMP defined
|
||||
#endif
|
11
gcc/testsuite/gfortran.dg/openmp-define-3.f90
Normal file
11
gcc/testsuite/gfortran.dg/openmp-define-3.f90
Normal file
@ -0,0 +1,11 @@
|
||||
! { dg-require-effective-target fopenmp }
|
||||
! { dg-options "-cpp -fopenmp" }
|
||||
! { dg-do preprocess }
|
||||
|
||||
#ifndef _OPENMP
|
||||
# error _OPENMP not defined
|
||||
#endif
|
||||
|
||||
#if _OPENMP != 201107
|
||||
# error _OPENMP defined to wrong value
|
||||
#endif
|
@ -1,5 +1,8 @@
|
||||
2013-10-11 Thomas Schwinge <thomas@codesourcery.com>
|
||||
|
||||
* testsuite/libgomp.fortran/openmp_version-1.f: New file.
|
||||
* testsuite/libgomp.fortran/openmp_version-2.f90: Likewise.
|
||||
|
||||
* omp.h.in: Don't touch the user's namespace.
|
||||
|
||||
2013-10-11 Jakub Jelinek <jakub@redhat.com>
|
||||
|
9
libgomp/testsuite/libgomp.fortran/openmp_version-1.f
Normal file
9
libgomp/testsuite/libgomp.fortran/openmp_version-1.f
Normal file
@ -0,0 +1,9 @@
|
||||
! { dg-do run }
|
||||
|
||||
program main
|
||||
implicit none
|
||||
include "omp_lib.h"
|
||||
|
||||
if (openmp_version .ne. 201107) call abort;
|
||||
|
||||
end program main
|
9
libgomp/testsuite/libgomp.fortran/openmp_version-2.f90
Normal file
9
libgomp/testsuite/libgomp.fortran/openmp_version-2.f90
Normal file
@ -0,0 +1,9 @@
|
||||
! { dg-do run }
|
||||
|
||||
program main
|
||||
use omp_lib
|
||||
implicit none
|
||||
|
||||
if (openmp_version .ne. 201107) call abort;
|
||||
|
||||
end program main
|
Loading…
Reference in New Issue
Block a user