graphite.exp 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. # Copyright (C) 2009-2015 Free Software Foundation, Inc.
  2. # This program is free software; you can redistribute it and/or modify
  3. # it under the terms of the GNU General Public License as published by
  4. # the Free Software Foundation; either version 3 of the License, or
  5. # (at your option) any later version.
  6. #
  7. # This program is distributed in the hope that it will be useful,
  8. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. # GNU General Public License for more details.
  11. #
  12. # You should have received a copy of the GNU General Public License
  13. # along with GCC; see the file COPYING3. If not see
  14. # <http://www.gnu.org/licenses/>.
  15. if [info exists lang_library_path] then {
  16. unset lang_library_path
  17. unset lang_link_flags
  18. }
  19. if [info exists lang_test_file] then {
  20. unset lang_test_file
  21. }
  22. if [info exists lang_include_flags] then {
  23. unset lang_include_flags
  24. }
  25. load_lib libgomp-dg.exp
  26. load_gcc_lib gcc-dg.exp
  27. if ![check_effective_target_pthread] {
  28. return
  29. }
  30. if ![check_effective_target_fgraphite] {
  31. return
  32. }
  33. # Flags for force-parallel-*.c testcases.
  34. set PARALLEL_CFLAGS "-ansi -pedantic-errors -O2 \
  35. -ftree-parallelize-loops=4 -floop-parallelize-all \
  36. -fdump-tree-parloops-details -fdump-tree-optimized \
  37. -fno-loop-strip-mine -fno-loop-block -fdump-tree-graphite-all"
  38. # Initialize `dg'.
  39. dg-init
  40. # Turn on OpenMP.
  41. lappend ALWAYS_CFLAGS "additional_flags=-fopenmp"
  42. # Gather a list of all tests.
  43. set tests [lsort [find $srcdir/$subdir *.c]]
  44. set ld_library_path $always_ld_library_path
  45. append ld_library_path [gcc-set-multilib-library-path $GCC_UNDER_TEST]
  46. set_ld_library_path_env_vars
  47. # Run the tests
  48. dg-runtest $tests "" $PARALLEL_CFLAGS
  49. # All done.
  50. dg-finish