summaryrefslogtreecommitdiff
path: root/libmudflap/testsuite/libmudflap.c++
diff options
context:
space:
mode:
Diffstat (limited to 'libmudflap/testsuite/libmudflap.c++')
-rw-r--r--libmudflap/testsuite/libmudflap.c++/c++frags.exp22
-rw-r--r--libmudflap/testsuite/libmudflap.c++/ctors-1.cxx20
-rw-r--r--libmudflap/testsuite/libmudflap.c++/ctors-2.cxx1
-rw-r--r--libmudflap/testsuite/libmudflap.c++/ctors.exp48
-rw-r--r--libmudflap/testsuite/libmudflap.c++/error1-frag.cxx5
-rw-r--r--libmudflap/testsuite/libmudflap.c++/error2-frag.cxx10
-rw-r--r--libmudflap/testsuite/libmudflap.c++/fail24-frag.cxx16
-rw-r--r--libmudflap/testsuite/libmudflap.c++/pass27-frag.cxx12
-rw-r--r--libmudflap/testsuite/libmudflap.c++/pass28-frag.cxx20
-rw-r--r--libmudflap/testsuite/libmudflap.c++/pass31-frag.cxx12
-rw-r--r--libmudflap/testsuite/libmudflap.c++/pass41-frag.cxx13
-rw-r--r--libmudflap/testsuite/libmudflap.c++/pass55-frag.cxx7
-rw-r--r--libmudflap/testsuite/libmudflap.c++/pass57-frag.cxx28
-rw-r--r--libmudflap/testsuite/libmudflap.c++/pass58-frag.cxx12
-rw-r--r--libmudflap/testsuite/libmudflap.c++/pass60-frag.cxx13
-rw-r--r--libmudflap/testsuite/libmudflap.c++/pass61-frag.cxx20
-rw-r--r--libmudflap/testsuite/libmudflap.c++/pass66-frag.cxx17
17 files changed, 0 insertions, 276 deletions
diff --git a/libmudflap/testsuite/libmudflap.c++/c++frags.exp b/libmudflap/testsuite/libmudflap.c++/c++frags.exp
deleted file mode 100644
index 4e3d244fd1a..00000000000
--- a/libmudflap/testsuite/libmudflap.c++/c++frags.exp
+++ /dev/null
@@ -1,22 +0,0 @@
-global MUDFLAP_FLAGS
-set MUDFLAP_FLAGS [list {-O0} {-static} { -O} {-O2} {-O3}]
-
-libmudflap-init c++
-if {$cxx == "g++"} then {
- unsupported "g++ not found"
- return
-}
-
-dg-init
-
-global srcdir
-
-foreach flags $MUDFLAP_FLAGS {
- foreach srcfile [lsort [glob -nocomplain ${srcdir}/libmudflap.c++/*frag.cxx]] {
- set bsrc [file tail $srcfile]
- setenv MUDFLAP_OPTIONS "-viol-segv"
- dg-runtest $srcfile $flags "-fmudflap -lmudflap"
- }
-}
-
-dg-finish
diff --git a/libmudflap/testsuite/libmudflap.c++/ctors-1.cxx b/libmudflap/testsuite/libmudflap.c++/ctors-1.cxx
deleted file mode 100644
index 7717c805ca5..00000000000
--- a/libmudflap/testsuite/libmudflap.c++/ctors-1.cxx
+++ /dev/null
@@ -1,20 +0,0 @@
-#include <iostream>
-
-
-extern char k [];
-
-class foo
-{
- public:
- foo (char *m) { m [40] = 20; }
-};
-
-
-foo f1 (k);
-foo f2 (k);
-foo f3 (k);
-
-int main ()
-{
- return 0;
-}
diff --git a/libmudflap/testsuite/libmudflap.c++/ctors-2.cxx b/libmudflap/testsuite/libmudflap.c++/ctors-2.cxx
deleted file mode 100644
index c1a501979bf..00000000000
--- a/libmudflap/testsuite/libmudflap.c++/ctors-2.cxx
+++ /dev/null
@@ -1 +0,0 @@
-char k [500];
diff --git a/libmudflap/testsuite/libmudflap.c++/ctors.exp b/libmudflap/testsuite/libmudflap.c++/ctors.exp
deleted file mode 100644
index df7293dc91c..00000000000
--- a/libmudflap/testsuite/libmudflap.c++/ctors.exp
+++ /dev/null
@@ -1,48 +0,0 @@
-global MUDFLAP_FLAGS
-set MUDFLAP_FLAGS [list {-O0} {-static} {-O2} {-O3}]
-
-libmudflap-init c++
-if {$cxx == "g++"} then {
- unsupported "g++ not found"
- return
-}
-
-dg-init
-
-global srcdir subdir
-
-foreach flags $MUDFLAP_FLAGS {
- set l1 [libmudflap_target_compile "$srcdir/$subdir/ctors-1.cxx" "ctors-1.o" object {additional_flags=-fmudflap}]
- set test "ctors-1 compilation ${flags}"
- if [string match "*mudflap cannot track unknown size extern *k*" $l1] { pass $test } { fail $test }
-
- set l2 [libmudflap_target_compile "$srcdir/$subdir/ctors-2.cxx" "ctors-2.o" object {additional_flags=-fmudflap}]
- set test "ctors-2 compilation ${flags}"
- if [string match "" $l2] { pass $test } { fail $test }
-
- set l3 [libmudflap_target_compile "ctors-1.o ctors-2.o" "ctors-12.exe" executable {additional_flags=-fmudflap additional_flags=-lmudflap additional_flags=-lstdc++}]
- set test "ctors-12 linkage ${flags}"
- if [string match "" $l3] { pass $test } { fail $test }
-
- set l4 [libmudflap_target_compile "ctors-2.o ctors-1.o" "ctors-21.exe" executable {additional_flags=-fmudflap additional_flags=-lmudflap additional_flags=-lstdc++}]
- set test "ctors-21 linkage ${flags}"
- if [string match "" $l3] { pass $test } { fail $test }
-
- setenv MUDFLAP_OPTIONS "-viol-segv"
-
- remote_spawn host "./ctors-12.exe"
- set l5 [remote_wait host 10]
- set test "ctors-12 execution ${flags}"
- if {[lindex $l5 0] == 0} { pass $test } { fail $test }
-
- remote_spawn host "./ctors-21.exe"
- set l6 [remote_wait host 10]
- set test "ctors-21 execution ${flags}"
- if {[lindex $l6 0] == 0} { pass $test } { fail $test }
-
- foreach f [glob -nocomplain "ctors-*"] {
- remote_file build delete $f
- }
-}
-
-dg-finish
diff --git a/libmudflap/testsuite/libmudflap.c++/error1-frag.cxx b/libmudflap/testsuite/libmudflap.c++/error1-frag.cxx
deleted file mode 100644
index 8bfe8532830..00000000000
--- a/libmudflap/testsuite/libmudflap.c++/error1-frag.cxx
+++ /dev/null
@@ -1,5 +0,0 @@
-// PR 26789
-// { dg-do compile }
-
-struct A;
-A a; // { dg-error "incomplete" }
diff --git a/libmudflap/testsuite/libmudflap.c++/error2-frag.cxx b/libmudflap/testsuite/libmudflap.c++/error2-frag.cxx
deleted file mode 100644
index 0e89e117fbf..00000000000
--- a/libmudflap/testsuite/libmudflap.c++/error2-frag.cxx
+++ /dev/null
@@ -1,10 +0,0 @@
-// PR 26790
-// { dg-do compile }
-
-struct A;
-
-A foo() // { dg-error "incomplete" }
-{
- A a; // { dg-error "incomplete" }
- return a;
-}
diff --git a/libmudflap/testsuite/libmudflap.c++/fail24-frag.cxx b/libmudflap/testsuite/libmudflap.c++/fail24-frag.cxx
deleted file mode 100644
index e3467ddaf1a..00000000000
--- a/libmudflap/testsuite/libmudflap.c++/fail24-frag.cxx
+++ /dev/null
@@ -1,16 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-char zoo [10];
-
-int main ()
-{
-int i = strlen ("twelve") + strlen ("zero") + strlen ("seventeen");
-zoo[i] = 'a';
-return 0;
-}
-/* { dg-output "mudflap violation 1.*" } */
-/* { dg-output "Nearby object.*" } */
-/* { dg-output "mudflap object.*zoo.*static.*" } */
-/* { dg-do run { xfail *-*-* } } */
diff --git a/libmudflap/testsuite/libmudflap.c++/pass27-frag.cxx b/libmudflap/testsuite/libmudflap.c++/pass27-frag.cxx
deleted file mode 100644
index aca2ea3a3b6..00000000000
--- a/libmudflap/testsuite/libmudflap.c++/pass27-frag.cxx
+++ /dev/null
@@ -1,12 +0,0 @@
-class foo {
- char z [10];
-public:
- char *get_z () { return & this->z[0]; }
-};
-
-int main ()
-{
-foo x;
-x.get_z()[9] = 'a';
-return 0;
-}
diff --git a/libmudflap/testsuite/libmudflap.c++/pass28-frag.cxx b/libmudflap/testsuite/libmudflap.c++/pass28-frag.cxx
deleted file mode 100644
index 75e14ba1460..00000000000
--- a/libmudflap/testsuite/libmudflap.c++/pass28-frag.cxx
+++ /dev/null
@@ -1,20 +0,0 @@
-class foo {
- char z [10];
-public:
- virtual char *get_z () { return & this->z[0]; }
-};
-
-class bar: public foo {
- char q [20];
-public:
- char *get_z () { return & this->q[0]; }
-};
-
-int main () {
-foo *x = new bar ();
-
-x->get_z()[9] = 'a';
-
-delete x;
-return 0;
-}
diff --git a/libmudflap/testsuite/libmudflap.c++/pass31-frag.cxx b/libmudflap/testsuite/libmudflap.c++/pass31-frag.cxx
deleted file mode 100644
index 6c4b9f9a7f8..00000000000
--- a/libmudflap/testsuite/libmudflap.c++/pass31-frag.cxx
+++ /dev/null
@@ -1,12 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-char zoo [10];
-
-int main ()
-{
-int i = strlen ("eight") + strlen ("one");
-zoo[i] = 'a';
-return 0;
-}
diff --git a/libmudflap/testsuite/libmudflap.c++/pass41-frag.cxx b/libmudflap/testsuite/libmudflap.c++/pass41-frag.cxx
deleted file mode 100644
index 06896c7f6e7..00000000000
--- a/libmudflap/testsuite/libmudflap.c++/pass41-frag.cxx
+++ /dev/null
@@ -1,13 +0,0 @@
-#include <string>
-#include <iostream>
-
-int
-main (int argc, char *argv[])
-{
- std::string myStr = "Hello, World!";
- std::cout << myStr << std::endl;
- return 0;
-}
-
-/* Ignore a warning that is irrelevant to the purpose of this test. */
-/* { dg-prune-output ".*mudflap cannot track unknown size extern.*" } */
diff --git a/libmudflap/testsuite/libmudflap.c++/pass55-frag.cxx b/libmudflap/testsuite/libmudflap.c++/pass55-frag.cxx
deleted file mode 100644
index e83c12461e2..00000000000
--- a/libmudflap/testsuite/libmudflap.c++/pass55-frag.cxx
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <vector>
-
-int main() {
- std::vector<int> v;
- v.push_back(1);
- return 0;
-}
diff --git a/libmudflap/testsuite/libmudflap.c++/pass57-frag.cxx b/libmudflap/testsuite/libmudflap.c++/pass57-frag.cxx
deleted file mode 100644
index 8be1a2d1113..00000000000
--- a/libmudflap/testsuite/libmudflap.c++/pass57-frag.cxx
+++ /dev/null
@@ -1,28 +0,0 @@
-#include <vector>
-#include <string>
-
-class fitscolumn
- {
- private:
- std::string name_, unit_;
- int i, t;
- public:
- fitscolumn (const std::string &nm, const std::string &un,int i1,int t1)
- : name_(nm), unit_(un), i(i1), t(t1){}
- };
-
-void init_bintab(std::vector<fitscolumn> & columns_)
-{
- char ttype[81], tunit[81], tform[81];
- long repc;
- int typecode;
- columns_.push_back (fitscolumn (ttype,tunit,1,typecode));
-}
-
-int main ()
-{
- return 0;
-}
-
-/* Ignore a warning that is irrelevant to the purpose of this test. */
-/* { dg-prune-output ".*mudflap cannot track unknown size extern.*" } */
diff --git a/libmudflap/testsuite/libmudflap.c++/pass58-frag.cxx b/libmudflap/testsuite/libmudflap.c++/pass58-frag.cxx
deleted file mode 100644
index 96da05fca07..00000000000
--- a/libmudflap/testsuite/libmudflap.c++/pass58-frag.cxx
+++ /dev/null
@@ -1,12 +0,0 @@
-// PR 19319
-struct k {
- int data;
- k(int j): data(j) {}
-};
-k make_k () { return k(1); }
-
-int main ()
-{
- k foo = make_k ();
- return 0;
-}
diff --git a/libmudflap/testsuite/libmudflap.c++/pass60-frag.cxx b/libmudflap/testsuite/libmudflap.c++/pass60-frag.cxx
deleted file mode 100644
index 35989d122b1..00000000000
--- a/libmudflap/testsuite/libmudflap.c++/pass60-frag.cxx
+++ /dev/null
@@ -1,13 +0,0 @@
-// PR 26442
-
-struct A
-{
- A();
-};
-
-int main()
-{
- if (0)
- A();
- return 0;
-}
diff --git a/libmudflap/testsuite/libmudflap.c++/pass61-frag.cxx b/libmudflap/testsuite/libmudflap.c++/pass61-frag.cxx
deleted file mode 100644
index 03046112c46..00000000000
--- a/libmudflap/testsuite/libmudflap.c++/pass61-frag.cxx
+++ /dev/null
@@ -1,20 +0,0 @@
-// PR c++/34619
-// { dg-do compile }
-
-template <typename> struct A
-{
- typedef int X;
- static const int N = 1;
-};
-
-template <typename T> struct B
-{
- typedef typename A <int [A <T>::N]>::X Y;
- template <typename U> B (Y, U) {}
-};
-
-int main ()
-{
-}
-
-B <int>b (0, 0);
diff --git a/libmudflap/testsuite/libmudflap.c++/pass66-frag.cxx b/libmudflap/testsuite/libmudflap.c++/pass66-frag.cxx
deleted file mode 100644
index 989c7ca6f1c..00000000000
--- a/libmudflap/testsuite/libmudflap.c++/pass66-frag.cxx
+++ /dev/null
@@ -1,17 +0,0 @@
-// PR c++/37568
-// { dg-do compile }
-// { dg-options "-fmudflap -O" }
-
-struct A
-{
- int i;
-};
-
-A
-foo ()
-{
- A a = { 1 };
- return a;
-}
-
-A a = foo ();