c.exp 886 B

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