Commit a8971bdb by Uros Bizjak

struct-layout-1_generate.c (DG_OPTIONS): New define.

	* g++.dg/compat/struct-layout-1_generate.c (DG_OPTIONS): New define.
	(switchfiles): Use DG_OPTIONS. Explicitly name arguments in fprintf
	templates to reduce number of passed arguments.

From-SVN: r132471
parent c951ae40
2008-02-19 Jan Hubicka <jh@suse.cz> 2008-02-19 Jan Hubicka <jh@suse.cz>
(tree_bb_level_predictions): Remove variable next mistakely introduced * predict.c (tree_bb_level_predictions): Remove variable next
by previous commit. mistakely introduced by previous commit.
2008-02-19 Jan Hubicka <jh@suse.cz> 2008-02-19 Jan Hubicka <jh@suse.cz>
...@@ -60,8 +60,7 @@ ...@@ -60,8 +60,7 @@
2008-02-19 Nick Clifton <nickc@redhat.com> 2008-02-19 Nick Clifton <nickc@redhat.com>
PR other/31349 PR other/31349
* opts.c (undocumented_msg): Leave blank unless checking is * opts.c (undocumented_msg): Leave blank unless checking is enabled.
enabled.
(handle_options): Fix indentation. (handle_options): Fix indentation.
(print_filtered_help): If no language-specific options were (print_filtered_help): If no language-specific options were
displayed tell the user how to list all the options supported by displayed tell the user how to list all the options supported by
...@@ -83,10 +82,10 @@ ...@@ -83,10 +82,10 @@
(print_partial_schedule): Rename CYCLE to ROW. (print_partial_schedule): Rename CYCLE to ROW.
2008-02-19 Christian Bruel <christian.bruel@st.com> 2008-02-19 Christian Bruel <christian.bruel@st.com>
Zdenek Dvorak <ook@ucw.cz> Zdenek Dvorak <ook@ucw.cz>
* tree-ssa-loop-ivopts.c (may_be_unaligned_p): Check step alignment. * tree-ssa-loop-ivopts.c (may_be_unaligned_p): Check step alignment.
2008-02-19 Uros Bizjak <ubizjak@gmail.com> 2008-02-19 Uros Bizjak <ubizjak@gmail.com>
PR target/33555 PR target/33555
......
2008-02-20 Uros Bizjak <ubizjak@gmail.com>
* g++.dg/compat/struct-layout-1_generate.c (DG_OPTIONS): New define.
(switchfiles): Use DG_OPTIONS. Explicitly name arguments in fprintf
templates to reduce number of passed arguments.
2008-02-19 Jason Merrill <jason@redhat.com> 2008-02-19 Jason Merrill <jason@redhat.com>
PR c++/34950 PR c++/34950
/* Structure layout test generator. /* Structure layout test generator.
Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
Contributed by Jakub Jelinek <jakub@redhat.com>. Contributed by Jakub Jelinek <jakub@redhat.com>.
This file is part of GCC. This file is part of GCC.
...@@ -42,6 +42,12 @@ along with GCC; see the file COPYING3. If not see ...@@ -42,6 +42,12 @@ along with GCC; see the file COPYING3. If not see
#define COMPAT_PRLL "ll" #define COMPAT_PRLL "ll"
#endif #endif
#define DG_OPTIONS "\
/* { dg-options \"%1$s-I%2$s\" } */\n\
/* { dg-options \"%1$s-I%2$s -fno-common\" { target hppa*-*-hpux* } } */\n\
/* { dg-options \"%1$s-I%2$s -mno-base-addresses\" { target mmix-*-* } } */\n\
\n"
typedef unsigned int hashval_t; typedef unsigned int hashval_t;
enum TYPE enum TYPE
...@@ -521,20 +527,17 @@ switchfiles (int fields) ...@@ -521,20 +527,17 @@ switchfiles (int fields)
fputs ("failed to create test files\n", stderr); fputs ("failed to create test files\n", stderr);
exit (1); exit (1);
} }
fprintf (outfile, "\ fprintf (outfile, DG_OPTIONS "\
/* { dg-options \"-I%s\" } */\n\
/* { dg-options \"-I%s -fno-common\" { target hppa*-*-hpux* } } */\n\
/* { dg-options \"-I%s -mno-base-addresses\" { target mmix-*-* } } */\n\
#include \"struct-layout-1.h\"\n\ #include \"struct-layout-1.h\"\n\
\n\ \n\
#define TX(n, type, attrs, fields, ops) extern void test##n (void);\n\ #define TX(n, type, attrs, fields, ops) extern void test##n (void);\n\
#include \"t%03d_test.h\"\n\ #include \"t%3$03d_test.h\"\n\
#undef TX\n\ #undef TX\n\
\n\ \n\
int main (void)\n\ int main (void)\n\
{\n\ {\n\
#define TX(n, type, attrs, fields, ops) test##n ();\n\ #define TX(n, type, attrs, fields, ops) test##n ();\n\
#include \"t%03d_test.h\"\n\ #include \"t%3$03d_test.h\"\n\
#undef TX\n\ #undef TX\n\
if (fails)\n\ if (fails)\n\
{\n\ {\n\
...@@ -542,33 +545,27 @@ int main (void)\n\ ...@@ -542,33 +545,27 @@ int main (void)\n\
abort ();\n\ abort ();\n\
}\n\ }\n\
exit (0);\n\ exit (0);\n\
}\n", srcdir, srcdir, srcdir, filecnt, filecnt); }\n", "", srcdir, 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");
if (outfile == NULL) if (outfile == NULL)
goto fail; goto fail;
fprintf (outfile, "\ fprintf (outfile, DG_OPTIONS "\
/* { dg-options \"-w -I%s\" } */\n\
/* { dg-options \"-w -I%s -fno-common\" { target hppa*-*-hpux* } } */\n\
/* { dg-options \"-w -I%s -mno-base-addresses\" { target mmix-*-* } } */\n\
#include \"struct-layout-1_x1.h\"\n\ #include \"struct-layout-1_x1.h\"\n\
#include \"t%03d_test.h\"\n\ #include \"t%3$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%3$03d_test.h\"\n", "-w ", srcdir, 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");
if (outfile == NULL) if (outfile == NULL)
goto fail; goto fail;
fprintf (outfile, "\ fprintf (outfile, DG_OPTIONS "\
/* { dg-options \"-w -I%s\" } */\n\
/* { dg-options \"-w -I%s -fno-common\" { target hppa*-*-hpux* } } */\n\
/* { dg-options \"-w -I%s -mno-base-addresses\" { target mmix-*-* } } */\n\
#include \"struct-layout-1_y1.h\"\n\ #include \"struct-layout-1_y1.h\"\n\
#include \"t%03d_test.h\"\n\ #include \"t%3$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%3$03d_test.h\"\n", "-w ", srcdir, 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");
......
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