-# Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
set COMPAT_SKIPS [list {}]
}
-set skip_list $COMPAT_SKIPS
+global compat_skip_list
+set compat_skip_list $COMPAT_SKIPS
load_lib dg.exp
load_lib gcc-dg.exp
global testcase
global tool
global compiler_conditional_xfail_data
- global skip_list
+ global compat_skip_list
# Add the skip specifiers.
- foreach skip $skip_list {
+ foreach skip $compat_skip_list {
if { ![string match $skip ""] } {
lappend optall "-DSKIP_$skip"
}
}
# Set up the names of the other source files.
- regsub "_main.*" $src1 "" base
- regsub ".*/" $base "" base
- regsub "_main" $src1 "_x" src2
- regsub "_main" $src1 "_y" src3
+ set dir [file dirname $src1]
+ set ext [file extension $src1]
+ set base [file rootname $src1]
+ set base [string range $base [string length $dir] end]
+ regsub "_main" $base "" base
+ set src2 "${dir}/${base}_x${ext}"
+ set src3 "${dir}/${base}_y${ext}"
# Use the dg-options mechanism to specify extra flags for this test.
# The extra flags in each file are used to compile that file, and the