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