aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUros Bizjak <uros@gcc.gnu.org>2008-02-20 08:01:34 +0100
committerUros Bizjak <uros@gcc.gnu.org>2008-02-20 08:01:34 +0100
commita8971bdb014f33727ad39d9cfe43afc2af60ac4b (patch)
treeeb3fcb5a45f931ff24a3eca1e8e42bea09416d4f
parentc951ae4036cf5b878b68bea3f65d29f7f9414ae1 (diff)
downloadgcc-a8971bdb014f33727ad39d9cfe43afc2af60ac4b.zip
gcc-a8971bdb014f33727ad39d9cfe43afc2af60ac4b.tar.gz
gcc-a8971bdb014f33727ad39d9cfe43afc2af60ac4b.tar.bz2
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
-rw-r--r--gcc/ChangeLog15
-rw-r--r--gcc/testsuite/ChangeLog6
-rw-r--r--gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c37
3 files changed, 30 insertions, 28 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index a1d00c7..0bee6c9 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,7 +1,7 @@
2008-02-19 Jan Hubicka <jh@suse.cz>
- (tree_bb_level_predictions): Remove variable next mistakely introduced
- by previous commit.
+ * predict.c (tree_bb_level_predictions): Remove variable next
+ mistakely introduced by previous commit.
2008-02-19 Jan Hubicka <jh@suse.cz>
@@ -60,8 +60,7 @@
2008-02-19 Nick Clifton <nickc@redhat.com>
PR other/31349
- * opts.c (undocumented_msg): Leave blank unless checking is
- enabled.
+ * opts.c (undocumented_msg): Leave blank unless checking is enabled.
(handle_options): Fix indentation.
(print_filtered_help): If no language-specific options were
displayed tell the user how to list all the options supported by
@@ -83,10 +82,10 @@
(print_partial_schedule): Rename CYCLE to ROW.
2008-02-19 Christian Bruel <christian.bruel@st.com>
- Zdenek Dvorak <ook@ucw.cz>
-
- * tree-ssa-loop-ivopts.c (may_be_unaligned_p): Check step alignment.
-
+ Zdenek Dvorak <ook@ucw.cz>
+
+ * tree-ssa-loop-ivopts.c (may_be_unaligned_p): Check step alignment.
+
2008-02-19 Uros Bizjak <ubizjak@gmail.com>
PR target/33555
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index c20caf9..1f728fd 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+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>
PR c++/34950
diff --git a/gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c b/gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c
index ec4f28a..2ac0bd6 100644
--- a/gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c
+++ b/gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c
@@ -1,5 +1,5 @@
/* 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>.
This file is part of GCC.
@@ -42,6 +42,12 @@ along with GCC; see the file COPYING3. If not see
#define COMPAT_PRLL "ll"
#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;
enum TYPE
@@ -521,20 +527,17 @@ switchfiles (int fields)
fputs ("failed to create test files\n", stderr);
exit (1);
}
- fprintf (outfile, "\
-/* { 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\
+ fprintf (outfile, DG_OPTIONS "\
#include \"struct-layout-1.h\"\n\
\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\
\n\
int main (void)\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\
if (fails)\n\
{\n\
@@ -542,33 +545,27 @@ int main (void)\n\
abort ();\n\
}\n\
exit (0);\n\
-}\n", srcdir, srcdir, srcdir, filecnt, filecnt);
+}\n", "", srcdir, filecnt);
fclose (outfile);
sprintf (destptr, "t%03d_x.C", filecnt);
outfile = fopen (destbuf, "w");
if (outfile == NULL)
goto fail;
- fprintf (outfile, "\
-/* { 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\
+ fprintf (outfile, DG_OPTIONS "\
#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 \"t%03d_test.h\"\n", srcdir, srcdir, srcdir, filecnt, filecnt);
+#include \"t%3$03d_test.h\"\n", "-w ", srcdir, filecnt);
fclose (outfile);
sprintf (destptr, "t%03d_y.C", filecnt);
outfile = fopen (destbuf, "w");
if (outfile == NULL)
goto fail;
- fprintf (outfile, "\
-/* { 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\
+ fprintf (outfile, DG_OPTIONS "\
#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 \"t%03d_test.h\"\n", srcdir, srcdir, srcdir, filecnt, filecnt);
+#include \"t%3$03d_test.h\"\n", "-w ", srcdir, filecnt);
fclose (outfile);
sprintf (destptr, "t%03d_test.h", filecnt);
outfile = fopen (destbuf, "w");