msgs.exp: Delete.
authorZack Weinberg <zack@codesourcery.com>
Thu, 25 Oct 2001 17:38:14 +0000 (17:38 +0000)
committerZack Weinberg <zack@gcc.gnu.org>
Thu, 25 Oct 2001 17:38:14 +0000 (17:38 +0000)
* gcc.misc-tests/msgs.exp: Delete.
* gcc.misc-tests/m-un-1.c: Move to gcc.dg.
* gcc.misc-tests/m-un-2.c: Move to gcc.dg.  Update expected
error set to match recent changes.

From-SVN: r46491

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/m-un-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/m-un-2.c [new file with mode: 0644]
gcc/testsuite/gcc.misc-tests/m-un-1.c [deleted file]
gcc/testsuite/gcc.misc-tests/m-un-2.c [deleted file]
gcc/testsuite/gcc.misc-tests/msgs.exp [deleted file]

index a4701cfd900b65f86854d96c5945e33e6beaa219..a11905eba62998fc32ac237f2a2d9ca72def439f 100644 (file)
@@ -1,3 +1,10 @@
+2001-10-25  Zack Weinberg  <zack@codesourcery.com>
+
+       * gcc.misc-tests/msgs.exp: Delete.
+       * gcc.misc-tests/m-un-1.c: Move to gcc.dg.
+       * gcc.misc-tests/m-un-2.c: Move to gcc.dg.  Update expected
+       error set to match recent changes.
+
 2001-10-24  Zack Weinberg  <zack@codesourcery.com>
 
        * gcc.dg/20011021-1.c: New test.
diff --git a/gcc/testsuite/gcc.dg/m-un-1.c b/gcc/testsuite/gcc.dg/m-un-1.c
new file mode 100644 (file)
index 0000000..ad84d44
--- /dev/null
@@ -0,0 +1,37 @@
+/* m-un-1.c: "un" for "uninitialized" */
+
+/*
+From: Jim Wilson <wilson@cygnus.com>
+Date: Wed, 6 Jul 1994 13:11:47 -0700
+To: dje@cygnus.com
+Subject: Re: devo/gcc ChangeLog.fsf stmt.c
+Cc: cvs-gcc@cygnus.com, tege@cygnus.com
+
+       How about a test case?  :-)
+
+Compile with -O -Wall and the broken compiler gives you:
+tmp.c:6: warning: `k' might be used uninitialized in this function
+The fixed compiler (and gcc 2.5.8) gives no warning.
+
+This happens to fix a performance regression in the code generated for
+while loops, but that is presumably much much harder to test for.
+*/
+
+/* { dg-do compile } */
+/* { dg-options "-O -Wall" } */
+
+int
+sub ()
+{
+  int i = 0;
+  int j = 0;
+  int k;       /* { dg-bogus "`k' might be used uninitialized" "uninitialized warning regression" } */
+
+  while (i == 0 && j == 0)
+    {
+      k = 10;
+      i = sub ();
+    }
+
+  return k;
+}
diff --git a/gcc/testsuite/gcc.dg/m-un-2.c b/gcc/testsuite/gcc.dg/m-un-2.c
new file mode 100644 (file)
index 0000000..e31646b
--- /dev/null
@@ -0,0 +1,32 @@
+/* { dg-do compile } */
+/* { dg-options "-W -Wall" } */
+
+typedef unsigned long size_t;
+extern void* malloc (size_t);
+extern void free (void*);
+extern void* realloc (void*, size_t);
+
+struct vtable {
+  void* (* _malloc) (size_t);
+  void (* _free) (void*);
+  void* (* _realloc) (void*, size_t);
+};
+
+struct vtable mtable = {
+  malloc,
+  free
+}; /* { dg-warning "missing initializer" "warning regression" { target *-*-* } {18} } */
+   /* { dg-warning "initialization for `mtable._realloc'" "warning regression" { target *-*-* } {18} } */
+
+/* With designated initializers, we assume you meant to leave out the
+   initialization of any blank fields.  */
+struct vtable mtable2 = {
+  ._malloc = malloc,
+  ._realloc = realloc
+};
+
+struct vtable mtable3 = {
+  ._free = free,
+  ._malloc = malloc,
+  ._realloc = realloc
+};
diff --git a/gcc/testsuite/gcc.misc-tests/m-un-1.c b/gcc/testsuite/gcc.misc-tests/m-un-1.c
deleted file mode 100644 (file)
index ad84d44..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/* m-un-1.c: "un" for "uninitialized" */
-
-/*
-From: Jim Wilson <wilson@cygnus.com>
-Date: Wed, 6 Jul 1994 13:11:47 -0700
-To: dje@cygnus.com
-Subject: Re: devo/gcc ChangeLog.fsf stmt.c
-Cc: cvs-gcc@cygnus.com, tege@cygnus.com
-
-       How about a test case?  :-)
-
-Compile with -O -Wall and the broken compiler gives you:
-tmp.c:6: warning: `k' might be used uninitialized in this function
-The fixed compiler (and gcc 2.5.8) gives no warning.
-
-This happens to fix a performance regression in the code generated for
-while loops, but that is presumably much much harder to test for.
-*/
-
-/* { dg-do compile } */
-/* { dg-options "-O -Wall" } */
-
-int
-sub ()
-{
-  int i = 0;
-  int j = 0;
-  int k;       /* { dg-bogus "`k' might be used uninitialized" "uninitialized warning regression" } */
-
-  while (i == 0 && j == 0)
-    {
-      k = 10;
-      i = sub ();
-    }
-
-  return k;
-}
diff --git a/gcc/testsuite/gcc.misc-tests/m-un-2.c b/gcc/testsuite/gcc.misc-tests/m-un-2.c
deleted file mode 100644 (file)
index 06ff526..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/* { dg-do compile } */
-/* { dg-options "-W -Wall" } */
-
-typedef unsigned long size_t;
-extern void* malloc (size_t);
-extern void free (void*);
-extern void* realloc (void*, size_t);
-
-struct vtable {
-  void* (* _malloc) (size_t);
-  void (* _free) (void*);
-  void* (* _realloc) (void*, size_t);
-};
-
-struct vtable mtable = {
-  malloc,
-  free
-}; /* { dg-warning "missing initializer" "warning regression" { target *-*-* } {18} } */
-   /* { dg-warning "initialization for `mtable._realloc'" "warning regression" { target *-*-* } {18} } */
-
-struct vtable mtable2 = {
-  ._malloc = malloc,
-  ._realloc = realloc
-}; /* { dg-warning "missing initializer" "warning regression" { target *-*-* } {24} } */
-   /* { dg-warning "initialization for `mtable2._free'" "warning regression" { target *-*-* } {24} } */
-
-struct vtable mtable3 = {
-  ._free = free,
-  ._malloc = malloc,
-  ._realloc = realloc
-};
diff --git a/gcc/testsuite/gcc.misc-tests/msgs.exp b/gcc/testsuite/gcc.misc-tests/msgs.exp
deleted file mode 100644 (file)
index 219facd..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-#   Copyright (C) 1997 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-# 
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-# 
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
-
-# Test gcc warning and error messages.
-# Our testcases are named m-*.c ("m" and not "msg" to avoid DOS problems).
-
-# Load support procs.
-load_lib gcc-dg.exp
-
-# Initialize harness.
-dg-init
-
-# Main loop.
-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/m-*.c]] "" ""
-
-# All done.
-dg-finish