| 1 |
# Copyright (C) 2009-2025 Free Software Foundation, Inc. |
| 2 |
|
| 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. |
| 7 |
# |
| 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. |
| 12 |
# |
| 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/>. |
| 16 |
|
| 17 |
load_lib libgomp-dg.exp |
| 18 |
load_gcc_lib gcc-dg.exp |
| 19 |
|
| 20 |
if ![check_effective_target_pthread] { |
| 21 |
return |
| 22 |
} |
| 23 |
|
| 24 |
if ![check_effective_target_fgraphite] { |
| 25 |
return |
| 26 |
} |
| 27 |
|
| 28 |
lappend ALWAYS_CFLAGS "compiler=$GCC_UNDER_TEST" |
| 29 |
# Flags for force-parallel-*.c testcases. |
| 30 |
set PARALLEL_CFLAGS "-ansi -pedantic-errors -O2 \ |
| 31 |
-ftree-parallelize-loops=4 -floop-parallelize-all \ |
| 32 |
-fdump-tree-parloops-details -fdump-tree-optimized \ |
| 33 |
-fno-loop-strip-mine -fno-loop-block -fdump-tree-graphite-all" |
| 34 |
|
| 35 |
# Initialize `dg'. |
| 36 |
dg-init |
| 37 |
|
| 38 |
# Turn on OpenMP. |
| 39 |
lappend ALWAYS_CFLAGS "additional_flags=-fopenmp" |
| 40 |
|
| 41 |
# Gather a list of all tests. |
| 42 |
set tests [lsort [find $srcdir/$subdir *.c]] |
| 43 |
|
| 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 |
|
| 48 |
# Run the tests |
| 49 |
dg-runtest $tests "" $PARALLEL_CFLAGS |
| 50 |
|
| 51 |
# All done. |
| 52 |
dg-finish |