This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH, committed]: Massive cleanup in gcc.target/i386 testsuite dir
- From: "Uros Bizjak" <ubizjak at gmail dot com>
- To: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 22 Aug 2007 12:09:03 +0200
- Subject: [PATCH, committed]: Massive cleanup in gcc.target/i386 testsuite dir
Hello!
Attached patch removes target selectors from dg-do directives in
gcc.target/i386 testsuite directory. Thre is no need for them, because
in i386.exp we have:
# Exit immediately if this isn't a x86 target.
if { ![istarget i?86*-*-*] && ![istarget x86_64-*-*] } then {
return
}
Tests, that require either ilp32 or lp64 target were changed to use
appropriate dg-require-effective-target dg directive. One test was
moved from i386 target directory to gcc.dg because it also runs on
sparc targets.
A quick and dirty perl script to remove taget selectors from dg-do
directives is pasted below. Slightly adapted script could probably be
of some interest to other target maintainers to remove target
selectors in their testfiles.
--cut here--
while( <*.c> ) {
push @InputFile, $_;
}
foreach $InputFile ( sort @InputFile ) {
open (FILE, "<$InputFile") or die "Error: Can't open $InputFile
for reading";
@Source = <FILE>;
close (FILE) or die "Couldn't close file properly";
$Mangled = 0;
foreach ( @Source ) {
if ( /dg-do/ ) {
s/\{ target i\?86-\*-\* x86_64-\*-\* \} //;
$Mangled = 1;
print $InputFile, " ", $_;
push @List, $InputFile.", ";
}
}
if ( $Mangled ) {
# Reopen file for writting and stuff mangled source into it.
open (FILE, ">$InputFile") or die "Error: Can't open $InputFile for writing";
print FILE @Source;
close (FILE) or die "Couldn't close file properly";
}
}
print @List;
--cut here--
The patch was checked by running the testsuite on i686-pc-linux-gnu
and is committed to mainline SVN.
2007-08-22 Uros Bizjak <ubizjak@gmail.com>
* gcc.target/i386/*.c: Remove target selectors from dg-do directives.
* gcc.target/i386/991129-1.c, gcc.target/i386/991209-1.c,
gcc.target/i386/991214-1.c, gcc.target/i386/pr26778.c,
gcc.target/i386/pr27827.c, gcc.target/i386/pr30505.c,
gcc.target/i386/pr32389.c, gcc.target/i386/sse-8.c,
gcc.target/i386/stack-realign.c,
gcc.target/i386/gcc-have-sync-compare-and-swap-1.c,
gcc.target/i386/gcc-have-sync-compare-and-swap-2.c,
gcc.target/i386/gcc-have-sync-compare-and-swap-3.c: Require ilp32
target using dg-require-effective-target directive.
* gcc.target/i386/amd64-abi-1.c, gcc.target/i386/amd64-abi-2.c,
gcc.target/i386/cleanup-2.c, gcc.target/i386/cmpxchg16b-1.c,
gcc.target/i386/gcc-have-sync-compare-and-swap-4.c,
gcc.target/i386/large-size-array-3.c, gcc.target/i386/pr25254.c,
gcc.target/i386/pr31167.c, gcc.target/i386/pr32268.c,
gcc.target/i386/pr32661-1.c, gcc.target/i386/pr32708-2.c,
gcc.target/i386/pr32708-3.c, gcc.target/i386/sse4_1-pextrq.c,
gcc.target/i386/sse4_1-pinsrq.c, gcc.target/i386/sse4_2-crc32q.c,
gcc.target/i386/sse4_2-popcntq.c, gcc.target/i386/stack-prot-kernel.c:
Require lp64 target using dg-require-effective-target directive.
* gcc.target/i386/cleanup-1.c, gcc.target/i386/cleanup-2.c,
gcc.target/i386/pr32268.c: Use *-*-linux* target selector in dg-do
directive.
* gcc.target/i386/20010202-1.c: Move from here ...
* gcc.dg/20010202-1.c: ... to here.
Uros.