* g++.dg/compat/struct-layout-1_generate.c (DG_OPTIONS): New define.
authoruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 20 Feb 2008 07:01:34 +0000 (07:01 +0000)
committeruros <uros@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 20 Feb 2008 07:01:34 +0000 (07:01 +0000)
(switchfiles): Use DG_OPTIONS. Explicitly name arguments in fprintf
templates to reduce number of passed arguments.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@132471 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c

index a1d00c7..0bee6c9 100644 (file)
@@ -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
        (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
index c20caf9..1f728fd 100644 (file)
@@ -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
index ec4f28a..2ac0bd6 100644 (file)
@@ -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");