]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
This commit was manufactured by cvs2svn to create branch
authorNo Author <no-author@gcc.gnu.org>
Sun, 1 May 2005 10:39:15 +0000 (10:39 +0000)
committerNo Author <no-author@gcc.gnu.org>
Sun, 1 May 2005 10:39:15 +0000 (10:39 +0000)
'gcc-3_4-branch'.

From-SVN: r99061

14 files changed:
gcc/testsuite/gcc.dg/format/asm_fprintf-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format/asm_fprintf-3.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format/asm_fprintf-4.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format/asm_fprintf-5.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format/gcc_diag-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format/gcc_diag-3.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format/gcc_diag-4.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format/gcc_diag-5.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format/gcc_diag-6.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format/gcc_diag-7.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format/gcc_diag-8.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/format/gcc_diag-9.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/transparent-union-3.c [new file with mode: 0644]
libstdc++-v3/testsuite/libstdc++-abi/abi.exp [new file with mode: 0644]

diff --git a/gcc/testsuite/gcc.dg/format/asm_fprintf-2.c b/gcc/testsuite/gcc.dg/format/asm_fprintf-2.c
new file mode 100644 (file)
index 0000000..847eeee
--- /dev/null
@@ -0,0 +1,9 @@
+/* Test for ICE handling internal formats: bug 20740.  The code did
+   not check that, if the required typedef names had been used as
+   identifiers, they were defined to suitable types.  Test
+   "__gcc_host_wide_int__", not used at all, asm_fprintf format.  */
+/* Origin: Joseph Myers <joseph@codesourcery.com> */
+/* { dg-do compile } */
+/* { dg-options "-Wformat" } */
+
+void bar (const char *, ...) __attribute__ ((__format__ (__asm_fprintf__, 1, 2))); /* { dg-error "error: '__gcc_host_wide_int__' is not defined as a type" } */
diff --git a/gcc/testsuite/gcc.dg/format/asm_fprintf-3.c b/gcc/testsuite/gcc.dg/format/asm_fprintf-3.c
new file mode 100644 (file)
index 0000000..f5fd5c0
--- /dev/null
@@ -0,0 +1,10 @@
+/* Test for ICE handling internal formats: bug 20740.  The code did
+   not check that, if the required typedef names had been used as
+   identifiers, they were defined to suitable types.  Test
+   "__gcc_host_wide_int__", not defined, asm_fprintf format.  */
+/* Origin: Joseph Myers <joseph@codesourcery.com> */
+/* { dg-do compile } */
+/* { dg-options "-Wformat" } */
+
+void foo (int __gcc_host_wide_int__);
+void bar (const char *, ...) __attribute__ ((__format__ (__asm_fprintf__, 1, 2))); /* { dg-error "error: '__gcc_host_wide_int__' is not defined as a type" } */
diff --git a/gcc/testsuite/gcc.dg/format/asm_fprintf-4.c b/gcc/testsuite/gcc.dg/format/asm_fprintf-4.c
new file mode 100644 (file)
index 0000000..9de0513
--- /dev/null
@@ -0,0 +1,10 @@
+/* Test for ICE handling internal formats: bug 20740.  The code did
+   not check that, if the required typedef names had been used as
+   identifiers, they were defined to suitable types.  Test
+   "__gcc_host_wide_int__", not a type, asm_fprintf.  */
+/* Origin: Joseph Myers <joseph@codesourcery.com> */
+/* { dg-do compile } */
+/* { dg-options "-Wformat" } */
+
+int __gcc_host_wide_int__;
+void bar (const char *, ...) __attribute__ ((__format__ (__asm_fprintf__, 1, 2))); /* { dg-error "error: '__gcc_host_wide_int__' is not defined as a type" } */
diff --git a/gcc/testsuite/gcc.dg/format/asm_fprintf-5.c b/gcc/testsuite/gcc.dg/format/asm_fprintf-5.c
new file mode 100644 (file)
index 0000000..14ffb60
--- /dev/null
@@ -0,0 +1,10 @@
+/* Test for ICE handling internal formats: bug 20740.  The code did
+   not check that, if the required typedef names had been used as
+   identifiers, they were defined to suitable types.  Test
+   "__gcc_host_wide_int__", bad type, asm_fprintf format.  */
+/* Origin: Joseph Myers <joseph@codesourcery.com> */
+/* { dg-do compile } */
+/* { dg-options "-Wformat" } */
+
+typedef int __gcc_host_wide_int__;
+void bar (const char *, ...) __attribute__ ((__format__ (__asm_fprintf__, 1, 2))); /* { dg-error "error: '__gcc_host_wide_int__' is not defined as 'long' or 'long long'" } */
diff --git a/gcc/testsuite/gcc.dg/format/gcc_diag-2.c b/gcc/testsuite/gcc.dg/format/gcc_diag-2.c
new file mode 100644 (file)
index 0000000..60c6835
--- /dev/null
@@ -0,0 +1,10 @@
+/* Test for ICE handling internal formats: bug 20740.  The code did
+   not check that, if the required typedef names had been used as
+   identifiers, they were defined to suitable types.  Test "tree", not
+   defined.  */
+/* Origin: Joseph Myers <joseph@codesourcery.com> */
+/* { dg-do compile } */
+/* { dg-options "-Wformat" } */
+
+void foo (int tree);
+void bar (const char *, ...) __attribute__ ((__format__ (__gcc_diag__, 1, 2)));
diff --git a/gcc/testsuite/gcc.dg/format/gcc_diag-3.c b/gcc/testsuite/gcc.dg/format/gcc_diag-3.c
new file mode 100644 (file)
index 0000000..1a7848e
--- /dev/null
@@ -0,0 +1,10 @@
+/* Test for ICE handling internal formats: bug 20740.  The code did
+   not check that, if the required typedef names had been used as
+   identifiers, they were defined to suitable types.  Test "tree", not
+   a type.  */
+/* Origin: Joseph Myers <joseph@codesourcery.com> */
+/* { dg-do compile } */
+/* { dg-options "-Wformat" } */
+
+int tree;
+void bar (const char *, ...) __attribute__ ((__format__ (__gcc_diag__, 1, 2))); /* { dg-error "error: 'tree' is not defined as a type" } */
diff --git a/gcc/testsuite/gcc.dg/format/gcc_diag-4.c b/gcc/testsuite/gcc.dg/format/gcc_diag-4.c
new file mode 100644 (file)
index 0000000..20661c4
--- /dev/null
@@ -0,0 +1,10 @@
+/* Test for ICE handling internal formats: bug 20740.  The code did
+   not check that, if the required typedef names had been used as
+   identifiers, they were defined to suitable types.  Test "tree", not
+   a pointer type.  */
+/* Origin: Joseph Myers <joseph@codesourcery.com> */
+/* { dg-do compile } */
+/* { dg-options "-Wformat" } */
+
+typedef int tree;
+void bar (const char *, ...) __attribute__ ((__format__ (__gcc_diag__, 1, 2))); /* { dg-error "error: 'tree' is not defined as a pointer type" } */
diff --git a/gcc/testsuite/gcc.dg/format/gcc_diag-5.c b/gcc/testsuite/gcc.dg/format/gcc_diag-5.c
new file mode 100644 (file)
index 0000000..f8f12d6
--- /dev/null
@@ -0,0 +1,10 @@
+/* Test for ICE handling internal formats: bug 20740.  The code did
+   not check that, if the required typedef names had been used as
+   identifiers, they were defined to suitable types.  Test
+   "location_t", not defined.  */
+/* Origin: Joseph Myers <joseph@codesourcery.com> */
+/* { dg-do compile } */
+/* { dg-options "-Wformat" } */
+
+void foo (int location_t);
+void bar (const char *, ...) __attribute__ ((__format__ (__gcc_diag__, 1, 2)));
diff --git a/gcc/testsuite/gcc.dg/format/gcc_diag-6.c b/gcc/testsuite/gcc.dg/format/gcc_diag-6.c
new file mode 100644 (file)
index 0000000..fdb493d
--- /dev/null
@@ -0,0 +1,10 @@
+/* Test for ICE handling internal formats: bug 20740.  The code did
+   not check that, if the required typedef names had been used as
+   identifiers, they were defined to suitable types.  Test
+   "location_t", not a type.  */
+/* Origin: Joseph Myers <joseph@codesourcery.com> */
+/* { dg-do compile } */
+/* { dg-options "-Wformat" } */
+
+int location_t;
+void bar (const char *, ...) __attribute__ ((__format__ (__gcc_diag__, 1, 2))); /* { dg-error "error: 'location_t' is not defined as a type" } */
diff --git a/gcc/testsuite/gcc.dg/format/gcc_diag-7.c b/gcc/testsuite/gcc.dg/format/gcc_diag-7.c
new file mode 100644 (file)
index 0000000..fccf5d2
--- /dev/null
@@ -0,0 +1,10 @@
+/* Test for ICE handling internal formats: bug 20740.  The code did
+   not check that, if the required typedef names had been used as
+   identifiers, they were defined to suitable types.  Test
+   "__gcc_host_wide_int__", not defined.  */
+/* Origin: Joseph Myers <joseph@codesourcery.com> */
+/* { dg-do compile } */
+/* { dg-options "-Wformat" } */
+
+void foo (int __gcc_host_wide_int__);
+void bar (const char *, ...) __attribute__ ((__format__ (__gcc_diag__, 1, 2)));
diff --git a/gcc/testsuite/gcc.dg/format/gcc_diag-8.c b/gcc/testsuite/gcc.dg/format/gcc_diag-8.c
new file mode 100644 (file)
index 0000000..835ec3f
--- /dev/null
@@ -0,0 +1,10 @@
+/* Test for ICE handling internal formats: bug 20740.  The code did
+   not check that, if the required typedef names had been used as
+   identifiers, they were defined to suitable types.  Test
+   "__gcc_host_wide_int__", not a type.  */
+/* Origin: Joseph Myers <joseph@codesourcery.com> */
+/* { dg-do compile } */
+/* { dg-options "-Wformat" } */
+
+int __gcc_host_wide_int__;
+void bar (const char *, ...) __attribute__ ((__format__ (__gcc_diag__, 1, 2))); /* { dg-error "error: '__gcc_host_wide_int__' is not defined as a type" } */
diff --git a/gcc/testsuite/gcc.dg/format/gcc_diag-9.c b/gcc/testsuite/gcc.dg/format/gcc_diag-9.c
new file mode 100644 (file)
index 0000000..6481c26
--- /dev/null
@@ -0,0 +1,10 @@
+/* Test for ICE handling internal formats: bug 20740.  The code did
+   not check that, if the required typedef names had been used as
+   identifiers, they were defined to suitable types.  Test
+   "__gcc_host_wide_int__", bad type.  */
+/* Origin: Joseph Myers <joseph@codesourcery.com> */
+/* { dg-do compile } */
+/* { dg-options "-Wformat" } */
+
+typedef int __gcc_host_wide_int__;
+void bar (const char *, ...) __attribute__ ((__format__ (__gcc_diag__, 1, 2))); /* { dg-error "error: '__gcc_host_wide_int__' is not defined as 'long' or 'long long'" } */
diff --git a/gcc/testsuite/gcc.dg/transparent-union-3.c b/gcc/testsuite/gcc.dg/transparent-union-3.c
new file mode 100644 (file)
index 0000000..cebd5f8
--- /dev/null
@@ -0,0 +1,22 @@
+/* Test for ICEs on invalid transparent unions (empty or no named
+   members).  Bug 21213.  */
+/* Origin: Joseph Myers <joseph@codesourcery.com> */
+/* { dg-do compile } */
+/* { dg-options "" } */
+
+enum e { A };
+
+union __attribute__((__transparent_union__)) ue1 { enum e; }; /* { dg-warning "warning: declaration does not declare anything" } */
+/* { dg-warning "warning: union cannot be made transparent" "" { target *-*-* } 9 } */
+union ue2 { enum e; } __attribute__((__transparent_union__)); /* { dg-warning "warning: declaration does not declare anything" } */
+/* { dg-warning "warning: union cannot be made transparent" "" { target *-*-* } 11 } */
+
+union __attribute__((__transparent_union__)) ui1 { int; }; /* { dg-warning "warning: declaration does not declare anything" } */
+/* { dg-warning "warning: union cannot be made transparent" "" { target *-*-* } 14 } */
+union ui2 { int; } __attribute__((__transparent_union__)); /* { dg-warning "warning: declaration does not declare anything" } */
+/* { dg-warning "warning: union cannot be made transparent" "" { target *-*-* } 16 } */
+
+union __attribute__((__transparent_union__)) u1 { };
+/* { dg-warning "warning: union cannot be made transparent" "" { target *-*-* } 19 } */
+union u2 { } __attribute__((__transparent_union__));
+/* { dg-warning "warning: union cannot be made transparent" "" { target *-*-* } 21 } */
diff --git a/libstdc++-v3/testsuite/libstdc++-abi/abi.exp b/libstdc++-v3/testsuite/libstdc++-abi/abi.exp
new file mode 100644 (file)
index 0000000..f226e0a
--- /dev/null
@@ -0,0 +1,43 @@
+# Copyright (C) 2005 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.  
+
+# If there is no baseline file, or we can't find the library, skip
+# this test.
+if { ![info exists baseline_file] \
+        || ![file exists $baseline_file] \
+        || ![file exists "../src/.libs/libstdc++.so"] } {
+    return
+}
+
+# Figure out what symbols are defined by the active build of the library.
+remote_exec "build" "$srcdir/../scripts/extract_symvers" \
+    [list "../src/.libs/libstdc++.so" "current_symbols.txt"]
+
+# Build the support objects.
+v3-build_support
+
+# Build the abi_check program.
+if { [v3_target_compile "$srcdir/testsuite_abi_check.cc" "abi_check" \
+      "executable" [list "additional_flags=-w"]] != "" } {
+    error "could not compile testsuite_abi_check.cc"
+}
+
+remote_download "target" $baseline_file "baseline_symbols.txt"
+remote_download "target" "current_symbols.txt" "current_symbols.txt"
+set result [${tool}_load "./abi_check" \
+               [list "--check-verbose" "current_symbols.txt" \
+                    "baseline_symbols.txt"]]
+[lindex $result 0] "abi_check"