Add testcase for PR43423.
[official-gcc/graphite-test-results.git] / gcc / testsuite / gfortran.dg / graphite / graphite.exp
blob4ca881ded79acac5b4c270ecbf7dd4055f8553c5
1 # Copyright (C) 2008 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.
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.
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 # GCC testsuite that uses the `dg.exp' driver.
19 # Load support procs.
20 load_lib gfortran-dg.exp
22 if ![check_effective_target_fgraphite] {
23 return
26 # Remove VALUE from LIST_VARIABLE.
27 proc lremove {list_variable value} {
28 upvar 1 $list_variable var
29 set idx [lsearch -exact $var $value]
30 set var [lreplace $var $idx $idx]
33 # The default action for a test is 'compile'. Save current default.
34 global dg-do-what-default
35 set save-dg-do-what-default ${dg-do-what-default}
37 # Initialize `dg'.
38 dg-init
40 set wait_to_run_files [lsort [glob -nocomplain $srcdir/$subdir/*.\[fF\]{,90,95,03,08} ] ]
41 set block_files [lsort [glob -nocomplain $srcdir/$subdir/block-*.\[fF\]{,90,95,03,08} ] ]
42 set id_files [lsort [glob -nocomplain $srcdir/$subdir/id-*.\[fF\]{,90,95,03,08} ] ]
43 set interchange_files [lsort [glob -nocomplain $srcdir/$subdir/interchange-*.\[fF\]{,90,95,03,08} ] ]
44 set scop_files [lsort [glob -nocomplain $srcdir/$subdir/scop-*.\[fF\]{,90,95,03,08} ] ]
45 set run_id_files [lsort [glob -nocomplain $srcdir/$subdir/run-id-*.\[fF\]{,90,95,03,08} ] ]
46 set vect_files [lsort [glob -nocomplain $srcdir/$subdir/vect-*.\[fF\]{,90,95,03,08} ] ]
48 # Tests to be compiled.
49 set dg-do-what-default compile
50 gfortran-dg-runtest $scop_files "-O2 -fgraphite -fdump-tree-graphite-all"
51 gfortran-dg-runtest $id_files "-O2 -fgraphite-identity -ffast-math"
52 gfortran-dg-runtest $interchange_files "-O2 -floop-interchange -fno-loop-block -fno-loop-strip-mine -ffast-math -fdump-tree-graphite-all"
53 gfortran-dg-runtest $block_files "-O2 -floop-block -fno-loop-strip-mine -fno-loop-interchange -ffast-math -fdump-tree-graphite-all"
54 gfortran-dg-runtest $vect_files "-O2 -fgraphite-identity -ftree-vectorize -fno-vect-cost-model -fdump-tree-vect-details"
56 # Tests to be run.
57 set dg-do-what-default run
58 gfortran-dg-runtest $run_id_files "-O2 -fgraphite-identity"
60 # The default action for the rest of the files is 'compile'.
61 set dg-do-what-default compile
62 foreach f $block_files {lremove wait_to_run_files $f}
63 foreach f $id_files {lremove wait_to_run_files $f}
64 foreach f $interchange_files {lremove wait_to_run_files $f}
65 foreach f $scop_files {lremove wait_to_run_files $f}
66 foreach f $run_id_files {lremove wait_to_run_files $f}
67 foreach f $vect_files {lremove wait_to_run_files $f}
68 gfortran-dg-runtest $wait_to_run_files ""
70 # Clean up.
71 set dg-do-what-default ${save-dg-do-what-default}
73 # All done.
74 dg-finish