Commit d96d5d54 by Joseph Myers Committed by Joseph Myers

compat.exp, [...]: Use .exe extension for compat test executables.

	* lib/compat.exp, gcc.dg/compat/struct-layout-1.exp,
	g++.dg/compat/struct-layout-1.exp: Use .exe extension for compat
	test executables.
	* gcc.dg/compat/struct-layout-1_generate.c,
	g++.dg/compat/struct-layout-1_generate.c: Convert backslash to
	slash in srcdir for dg-options string.

From-SVN: r140299
parent 716588aa
2008-09-11 Joseph Myers <joseph@codesourcery.com> 2008-09-11 Joseph Myers <joseph@codesourcery.com>
* lib/compat.exp, gcc.dg/compat/struct-layout-1.exp,
g++.dg/compat/struct-layout-1.exp: Use .exe extension for compat
test executables.
* gcc.dg/compat/struct-layout-1_generate.c,
g++.dg/compat/struct-layout-1_generate.c: Convert backslash to
slash in srcdir for dg-options string.
2008-09-11 Joseph Myers <joseph@codesourcery.com>
* gcc.target/i386/sse5-haddX.c, gcc.target/i386/sse5-hsubX.c: * gcc.target/i386/sse5-haddX.c, gcc.target/i386/sse5-hsubX.c:
Avoid intN_t types. Avoid intN_t types.
......
...@@ -121,7 +121,7 @@ if [info exists ALT_CXX_UNDER_TEST] then { ...@@ -121,7 +121,7 @@ if [info exists ALT_CXX_UNDER_TEST] then {
} }
set tstobjdir "$tmpdir/g++.dg-struct-layout-1" set tstobjdir "$tmpdir/g++.dg-struct-layout-1"
set generator "$tmpdir/g++.dg-struct-layout-1_generate" set generator "$tmpdir/g++.dg-struct-layout-1_generate.exe"
set generator_src "$srcdir/$subdir/struct-layout-1_generate.c" set generator_src "$srcdir/$subdir/struct-layout-1_generate.c"
set generator_src "$generator_src $srcdir/$subdir/../../gcc.dg/compat/generate-random.c" set generator_src "$generator_src $srcdir/$subdir/../../gcc.dg/compat/generate-random.c"
......
...@@ -495,6 +495,7 @@ static struct entry *hash_table[HASH_SIZE]; ...@@ -495,6 +495,7 @@ static struct entry *hash_table[HASH_SIZE];
static int idx, limidx, output_one, short_enums; static int idx, limidx, output_one, short_enums;
static const char *destdir; static const char *destdir;
static const char *srcdir; static const char *srcdir;
static const char *srcdir_safe;
FILE *outfile; FILE *outfile;
void void
...@@ -532,7 +533,7 @@ switchfiles (int fields) ...@@ -532,7 +533,7 @@ switchfiles (int fields)
exit (1); exit (1);
} }
for (i = 0; i < NDG_OPTIONS; i++) for (i = 0; i < NDG_OPTIONS; i++)
fprintf (outfile, dg_options[i], "", srcdir); fprintf (outfile, dg_options[i], "", srcdir_safe);
fprintf (outfile, "\n\ fprintf (outfile, "\n\
#include \"struct-layout-1.h\"\n\ #include \"struct-layout-1.h\"\n\
\n\ \n\
...@@ -558,7 +559,7 @@ int main (void)\n\ ...@@ -558,7 +559,7 @@ int main (void)\n\
if (outfile == NULL) if (outfile == NULL)
goto fail; goto fail;
for (i = 0; i < NDG_OPTIONS; i++) for (i = 0; i < NDG_OPTIONS; i++)
fprintf (outfile, dg_options[i], "-w ", srcdir); fprintf (outfile, dg_options[i], "-w ", srcdir_safe);
fprintf (outfile, "\n\ fprintf (outfile, "\n\
#include \"struct-layout-1_x1.h\"\n\ #include \"struct-layout-1_x1.h\"\n\
#include \"t%03d_test.h\"\n\ #include \"t%03d_test.h\"\n\
...@@ -570,7 +571,7 @@ int main (void)\n\ ...@@ -570,7 +571,7 @@ int main (void)\n\
if (outfile == NULL) if (outfile == NULL)
goto fail; goto fail;
for (i = 0; i < NDG_OPTIONS; i++) for (i = 0; i < NDG_OPTIONS; i++)
fprintf (outfile, dg_options[i], "-w ", srcdir); fprintf (outfile, dg_options[i], "-w ", srcdir_safe);
fprintf (outfile, "\n\ fprintf (outfile, "\n\
#include \"struct-layout-1_y1.h\"\n\ #include \"struct-layout-1_y1.h\"\n\
#include \"t%03d_test.h\"\n\ #include \"t%03d_test.h\"\n\
...@@ -1589,6 +1590,22 @@ Either -s srcdir -d destdir or -i idx must be used\n", argv[0]); ...@@ -1589,6 +1590,22 @@ Either -s srcdir -d destdir or -i idx must be used\n", argv[0]);
if (srcdir == NULL && !output_one) if (srcdir == NULL && !output_one)
goto usage; goto usage;
if (srcdir != NULL)
{
const char *s = srcdir;
char *ss, *t;
t = ss = malloc (strlen (srcdir) + 1);
if (!ss)
abort ();
do {
if (*s == '\\')
*t++ = '/';
else
*t++ = *s;
} while (*s++);
srcdir_safe = ss;
}
for (i = 0; i < NTYPES2; ++i) for (i = 0; i < NTYPES2; ++i)
if (base_types[i].bitfld) if (base_types[i].bitfld)
bitfld_types[n_bitfld_types++] = base_types[i]; bitfld_types[n_bitfld_types++] = base_types[i];
......
...@@ -83,7 +83,7 @@ if { $compat_have_dfp == 0 } { ...@@ -83,7 +83,7 @@ if { $compat_have_dfp == 0 } {
} }
set tstobjdir "$tmpdir/gcc.dg-struct-layout-1" set tstobjdir "$tmpdir/gcc.dg-struct-layout-1"
set generator "$tmpdir/gcc.dg-struct-layout-1_generate" set generator "$tmpdir/gcc.dg-struct-layout-1_generate.exe"
set generator_src "$srcdir/$subdir/struct-layout-1_generate.c" set generator_src "$srcdir/$subdir/struct-layout-1_generate.c"
set generator_src "$generator_src $srcdir/$subdir/generate-random.c" set generator_src "$generator_src $srcdir/$subdir/generate-random.c"
......
...@@ -739,6 +739,7 @@ static struct entry *hash_table[HASH_SIZE]; ...@@ -739,6 +739,7 @@ static struct entry *hash_table[HASH_SIZE];
static int idx, limidx, output_one, short_enums; static int idx, limidx, output_one, short_enums;
static const char *destdir; static const char *destdir;
static const char *srcdir; static const char *srcdir;
static const char *srcdir_safe;
FILE *outfile; FILE *outfile;
void void
...@@ -795,7 +796,7 @@ int main (void)\n\ ...@@ -795,7 +796,7 @@ int main (void)\n\
abort ();\n\ abort ();\n\
}\n\ }\n\
exit (0);\n\ exit (0);\n\
}\n", srcdir, srcdir, srcdir, filecnt, filecnt); }\n", srcdir_safe, srcdir_safe, srcdir_safe, filecnt, filecnt);
fclose (outfile); fclose (outfile);
sprintf (destptr, "t%03d_x.c", filecnt); sprintf (destptr, "t%03d_x.c", filecnt);
outfile = fopen (destbuf, "w"); outfile = fopen (destbuf, "w");
...@@ -808,7 +809,7 @@ int main (void)\n\ ...@@ -808,7 +809,7 @@ int main (void)\n\
#include \"struct-layout-1_x1.h\"\n\ #include \"struct-layout-1_x1.h\"\n\
#include \"t%03d_test.h\"\n\ #include \"t%03d_test.h\"\n\
#include \"struct-layout-1_x2.h\"\n\ #include \"struct-layout-1_x2.h\"\n\
#include \"t%03d_test.h\"\n", srcdir, srcdir, srcdir, filecnt, filecnt); #include \"t%03d_test.h\"\n", srcdir_safe, srcdir_safe, srcdir_safe, filecnt, filecnt);
fclose (outfile); fclose (outfile);
sprintf (destptr, "t%03d_y.c", filecnt); sprintf (destptr, "t%03d_y.c", filecnt);
outfile = fopen (destbuf, "w"); outfile = fopen (destbuf, "w");
...@@ -821,7 +822,7 @@ int main (void)\n\ ...@@ -821,7 +822,7 @@ int main (void)\n\
#include \"struct-layout-1_y1.h\"\n\ #include \"struct-layout-1_y1.h\"\n\
#include \"t%03d_test.h\"\n\ #include \"t%03d_test.h\"\n\
#include \"struct-layout-1_y2.h\"\n\ #include \"struct-layout-1_y2.h\"\n\
#include \"t%03d_test.h\"\n", srcdir, srcdir, srcdir, filecnt, filecnt); #include \"t%03d_test.h\"\n", srcdir_safe, srcdir_safe, srcdir_safe, filecnt, filecnt);
fclose (outfile); fclose (outfile);
sprintf (destptr, "t%03d_test.h", filecnt); sprintf (destptr, "t%03d_test.h", filecnt);
outfile = fopen (destbuf, "w"); outfile = fopen (destbuf, "w");
...@@ -2000,6 +2001,22 @@ Either -s srcdir -d destdir or -i idx must be used\n", argv[0]); ...@@ -2000,6 +2001,22 @@ Either -s srcdir -d destdir or -i idx must be used\n", argv[0]);
if (srcdir == NULL && !output_one) if (srcdir == NULL && !output_one)
goto usage; goto usage;
if (srcdir != NULL)
{
const char *s = srcdir;
char *ss, *t;
t = ss = malloc (strlen (srcdir) + 1);
if (!ss)
abort ();
do {
if (*s == '\\')
*t++ = '/';
else
*t++ = *s;
} while (*s++);
srcdir_safe = ss;
}
for (i = 0; i < NTYPES2; ++i) for (i = 0; i < NTYPES2; ++i)
if (base_types[i].bitfld) if (base_types[i].bitfld)
bitfld_types[n_bitfld_types++] = base_types[i]; bitfld_types[n_bitfld_types++] = base_types[i];
......
...@@ -339,10 +339,10 @@ proc compat-execute { src1 sid use_alt } { ...@@ -339,10 +339,10 @@ proc compat-execute { src1 sid use_alt } {
# There's a unique name for each executable we generate, based on # There's a unique name for each executable we generate, based on
# the set of options and how the pieces of the tests are compiled. # the set of options and how the pieces of the tests are compiled.
set execname1 "${execbase}-${count}1" set execname1 "${execbase}-${count}1.exe"
set execname2 "${execbase}-${count}2" set execname2 "${execbase}-${count}2.exe"
set execname3 "${execbase}-${count}3" set execname3 "${execbase}-${count}3.exe"
set execname4 "${execbase}-${count}4" set execname4 "${execbase}-${count}4.exe"
incr count incr count
file_on_host delete $execname1 file_on_host delete $execname1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment