1if [info exists lang_library_path] then {
2    unset lang_library_path
3    unset lang_link_flags
4}
5if [info exists lang_test_file] then {
6    unset lang_test_file
7}
8if [info exists lang_include_flags] then {
9    unset lang_include_flags
10}
11
12load_lib libgomp-dg.exp
13load_gcc_lib gcc-dg.exp
14
15# If a testcase doesn't have special options, use these.
16if ![info exists DEFAULT_CFLAGS] then {
17    set DEFAULT_CFLAGS "-O2"
18}
19
20# Initialize dg.
21dg-init
22
23# Turn on OpenMP.
24lappend ALWAYS_CFLAGS "additional_flags=-fopenmp"
25
26# Gather a list of all tests.
27set tests [lsort [concat \
28		      [find $srcdir/$subdir *.c] \
29		      [find $srcdir/$subdir/../libgomp.c-c++-common *.c]]]
30
31set ld_library_path $always_ld_library_path
32append ld_library_path [gcc-set-multilib-library-path $GCC_UNDER_TEST]
33set_ld_library_path_env_vars
34
35# Main loop.
36dg-runtest $tests "" $DEFAULT_CFLAGS
37
38# All done.
39dg-finish
40