_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:
Thomas Schwinge 2013-10-11 12:42:42 +02:00 committed by Thomas Schwinge
parent 1e723fd75e
commit 86a6016dcc
10 changed files with 77 additions and 0 deletions

View File

@ -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.

View File

@ -0,0 +1,6 @@
/* { dg-require-effective-target fopenmp } */
/* { dg-do preprocess } */
#ifdef _OPENMP
# error _OPENMP defined
#endif

View File

@ -0,0 +1,7 @@
/* { dg-require-effective-target fopenmp } */
/* { dg-options "-fno-openmp" } */
/* { dg-do preprocess } */
#ifdef _OPENMP
# error _OPENMP defined
#endif

View 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

View File

@ -0,0 +1,7 @@
! { dg-require-effective-target fopenmp }
! { dg-options "-cpp" }
! { dg-do preprocess }
#ifdef _OPENMP
# error _OPENMP defined
#endif

View File

@ -0,0 +1,7 @@
! { dg-require-effective-target fopenmp }
! { dg-options "-cpp -fno-openmp" }
! { dg-do preprocess }
#ifdef _OPENMP
# error _OPENMP defined
#endif

View 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

View File

@ -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>

View 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

View 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