diff options
Diffstat (limited to 'gcc-4.8.1/gcc/testsuite/g++.dg/ipa')
53 files changed, 0 insertions, 3019 deletions
diff --git a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/20090113-1.C b/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/20090113-1.C deleted file mode 100644 index 3f371257e..000000000 --- a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/20090113-1.C +++ /dev/null @@ -1,25 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-O3" } */ - -struct S1 { - S1() { } -}; - -struct S2 { - int n; - S1* p; - void f() { - p = new S1[n = 1]; - } -}; - -struct S3 { - S2 s2; - void g() { - s2.f(); - } -}; - -void h() { - S3().g(); -} diff --git a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/devirt-1.C b/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/devirt-1.C deleted file mode 100644 index de0f665c4..000000000 --- a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/devirt-1.C +++ /dev/null @@ -1,62 +0,0 @@ -/* Verify that simple virtual calls are converted to direct calls by ipa-cp. */ -/* { dg-do run } */ -/* { dg-options "-O3 -fno-early-inlining -fno-inline -fdump-ipa-cp -fdump-tree-optimized" } */ - -extern "C" void abort (void); - -class A -{ -public: - int data; - virtual int foo (int i); -}; - -class B : public A -{ -public: - virtual int foo (int i); -}; - -class C : public A -{ -public: - virtual int foo (int i); -}; - -int A::foo (int i) -{ - return i + 1; -} - -int B::foo (int i) -{ - return i + 2; -} - -int C::foo (int i) -{ - return i + 3; -} - -static int middleman (class A *obj, int i) -{ - return obj->foo (i); -} - -int __attribute__ ((noinline,noclone)) get_input(void) -{ - return 1; -} - -int main (int argc, char *argv[]) -{ - class B b; - if (middleman (&b, get_input ()) != 3) - abort (); - return 0; -} - -/* { dg-final { scan-ipa-dump "Discovered a virtual call to a known target.*B::foo" "cp" } } */ -/* { dg-final { scan-tree-dump-times "OBJ_TYPE_REF" 0 "optimized"} } */ -/* { dg-final { cleanup-ipa-dump "cp" } } */ -/* { dg-final { cleanup-tree-dump "optimized" } } */ diff --git a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/devirt-10.C b/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/devirt-10.C deleted file mode 100644 index 658442e34..000000000 --- a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/devirt-10.C +++ /dev/null @@ -1,34 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-O3 -fdump-ipa-inline -fdump-ipa-cp -fno-early-inlining" } */ -class wxPaintEvent { }; -struct wxDCBase -{ - wxDCBase (); - virtual int GetLayoutDirection() const{} - virtual void SetLayoutDirection(int){} -}; -struct wxWindowDC : public wxDCBase {}; -struct wxBufferedDC : public wxDCBase -{ - void Init(wxDCBase*dc) { - InitCommon(dc); - } - void InitCommon(wxDCBase*dc) { - if (dc) - SetLayoutDirection(dc->GetLayoutDirection()); - } -}; -struct wxBufferedPaintDC : public wxBufferedDC { - wxBufferedPaintDC() { - Init(&m_paintdc); - } - wxWindowDC m_paintdc; -}; -void OnPaint(wxPaintEvent & event) { - wxBufferedPaintDC dc; -} -/* IPA-CP should really discover both cases, but for time being the second is handled by inliner. */ -/* { dg-final { scan-ipa-dump-times "Discovered a virtual call to a known target" 1 "inline" } } */ -/* { dg-final { scan-ipa-dump-times "Discovered a virtual call to a known target" 1 "cp" } } */ -/* { dg-final { cleanup-ipa-dump "inline" } } */ -/* { dg-final { cleanup-ipa-dump "cp" } } */ diff --git a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/devirt-11.C b/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/devirt-11.C deleted file mode 100644 index c139f8f96..000000000 --- a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/devirt-11.C +++ /dev/null @@ -1,50 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-O2 -fdump-ipa-inline" } */ -int baz (); -struct A -{ - virtual int fn2 () = 0; - virtual int *fn3 (); - double *fn4 (); - int fn5 (int); - template <class T> - void fn1 (A &, T) { fn3 (); fn4 (); fn2 (); } -}; -struct B : A -{ - int fn2 () { return 6; } - void fn3 (int, double); - B (bool = true); - B (int, int); -}; -template <typename T> -void -foo (B &x, A &y, A &z) -{ - y.fn2 (); - z.fn2 (); - int i = baz (); - int j = (y.fn3 ())[i]; - x.fn3 (j, (y.fn4 ())[i] + (z.fn4 ())[z.fn5 (j)]); -} -inline B -operator+ (A &y, A &z) -{ - B x; - foo<int> (x, y, z); - return x; -} -void -bar () -{ - B a, b, c (4, 0), d; - a.fn1 (b, .6); - baz (); - c + d; -} -/* While inlining function called once we should devirtualize a new call to fn2 - and two to fn3. While doing so the new symbol for fn2 needs to be - introduced. */ -/* { dg-final { scan-ipa-dump-times "Discovered a virtual call to a known target" 3 "inline" } } */ -/* { dg-final { scan-ipa-dump-times "and turned into root of the clone tree" 1 "inline" } } */ -/* { dg-final { cleanup-ipa-dump "inline" } } */ diff --git a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/devirt-2.C b/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/devirt-2.C deleted file mode 100644 index d3181e4c0..000000000 --- a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/devirt-2.C +++ /dev/null @@ -1,62 +0,0 @@ -/* Verify that simple virtual calls using this pointer are converted - to direct calls by ipa-cp. */ -/* { dg-do run } */ -/* { dg-options "-O3 -fno-early-inlining -fno-inline -fdump-ipa-cp" } */ - -extern "C" void abort (void); - -class A -{ -public: - int data; - virtual int foo (int i); - int middleman (int i) - { - return foo (i); - } -}; - -class B : public A -{ -public: - virtual int foo (int i); -}; - -class C : public A -{ -public: - virtual int foo (int i); -}; - -int A::foo (int i) -{ - return i + 1; -} - -int B::foo (int i) -{ - return i + 2; -} - -int C::foo (int i) -{ - return i + 3; -} - -int __attribute__ ((noinline,noclone)) get_input(void) -{ - return 1; -} - -int main (int argc, char *argv[]) -{ - class B b; - int i; - for (i = 0; i < get_input(); i++) - if (b.middleman (get_input ()) != 3) - abort (); - return 0; -} - -/* { dg-final { scan-ipa-dump "Discovered a virtual call to a known target.*B::foo" "cp" } } */ -/* { dg-final { cleanup-ipa-dump "cp" } } */ diff --git a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/devirt-3.C b/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/devirt-3.C deleted file mode 100644 index a68eb024f..000000000 --- a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/devirt-3.C +++ /dev/null @@ -1,70 +0,0 @@ -/* Verify that simple virtual calls on an object refrence are - converted to simple calls by ipa-cp. */ -/* { dg-do run } */ -/* { dg-options "-O3 -fno-early-inlining -fno-inline -fdump-ipa-cp -fdump-tree-optimized" } */ - -extern "C" void abort (void); - -class A -{ -public: - int data; - virtual float distraction (float f); - virtual int foo (int i); -}; - -class B : public A -{ -public: - virtual int foo (int i); -}; - -class C : public A -{ -public: - virtual int foo (int i); -}; - -float A::distraction (float f) -{ - f += 6.2; - return f/2; -} - -int A::foo (int i) -{ - return i + 1; -} - -int B::foo (int i) -{ - return i + 2; -} - -int C::foo (int i) -{ - return i + 3; -} - -static int middleman (class A &obj, int i) -{ - return obj.foo (i); -} - -int __attribute__ ((noinline,noclone)) get_input(void) -{ - return 1; -} - -int main (int argc, char *argv[]) -{ - class B b; - if (middleman (b, get_input ()) != 3) - abort (); - return 0; -} - -/* { dg-final { scan-ipa-dump "Discovered a virtual call to a known target.*B::foo" "cp" } } */ -/* { dg-final { scan-tree-dump-times "OBJ_TYPE_REF" 0 "optimized"} } */ -/* { dg-final { cleanup-ipa-dump "cp" } } */ -/* { dg-final { cleanup-tree-dump "optimized" } } */ diff --git a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/devirt-4.C b/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/devirt-4.C deleted file mode 100644 index 72c883b3f..000000000 --- a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/devirt-4.C +++ /dev/null @@ -1,68 +0,0 @@ -/* Verify that ipa-co can convert virtual calls to direct ones even - when a typecast to an ancestor is involved along the way. */ -/* { dg-do run } */ -/* { dg-options "-O3 -fno-early-inlining -fno-inline -fdump-ipa-cp -fdump-tree-optimized" } */ - -extern "C" void abort (void); - -class A -{ -public: - int data; - virtual int foo (int i); -}; - -class B : public A -{ -public: - virtual int foo (int i); -}; - -class C : public A -{ -public: - virtual int foo (int i); -}; - -int A::foo (int i) -{ - return i + 1; -} - -int B::foo (int i) -{ - return i + 2; -} - -int C::foo (int i) -{ - return i + 3; -} - -int __attribute__ ((noinline,noclone)) get_input(void) -{ - return 1; -} - -static int middleman_1 (class A *obj, int i) -{ - return obj->foo (i); -} - -static int middleman_2 (class B *obj, int i) -{ - return middleman_1 (obj, i); -} - -int main (int argc, char *argv[]) -{ - class B b; - if (middleman_2 (&b, get_input ()) != 3) - abort (); - return 0; -} - -/* { dg-final { scan-ipa-dump "Discovered a virtual call to a known target.*B::foo" "cp" } } */ -/* { dg-final { scan-tree-dump-times "OBJ_TYPE_REF" 0 "optimized"} } */ -/* { dg-final { cleanup-ipa-dump "cp" } } */ -/* { dg-final { cleanup-tree-dump "optimized" } } */ diff --git a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/devirt-5.C b/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/devirt-5.C deleted file mode 100644 index 575bc0271..000000000 --- a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/devirt-5.C +++ /dev/null @@ -1,79 +0,0 @@ -/* Verify that ipa-cp can convert simple virtual calls to a direct - ones even when a typecast to an ancestor is involved along the way - and that ancestor is not the first one with virtual functions. */ -/* { dg-do run } */ -/* { dg-options "-O3 -fno-early-inlining -fno-inline -fdump-ipa-cp -fdump-tree-optimized" } */ - -extern "C" void abort (void); - -class Distraction -{ -public: - float f; - double d; - Distraction () - { - f = 8.3; - d = 10.2; - } - virtual float bar (float z); -}; - -class A -{ -public: - int data; - virtual int foo (int i); -}; - - -class B : public Distraction, public A -{ -public: - virtual int foo (int i); -}; - -float Distraction::bar (float z) -{ - f += z; - return f/2; -} - -int A::foo (int i) -{ - return i + 1; -} - -int B::foo (int i) -{ - return i + 2; -} - -int __attribute__ ((noinline,noclone)) get_input(void) -{ - return 1; -} - -static int middleman_1 (class A *obj, int i) -{ - return obj->foo (i); -} - -static int middleman_2 (class B *obj, int i) -{ - return middleman_1 (obj, i); -} - -int main (int argc, char *argv[]) -{ - class B b; - - if (middleman_2 (&b, get_input ()) != 3) - abort (); - return 0; -} - -/* { dg-final { scan-ipa-dump "Discovered a virtual call to a known target.*B::foo" "cp" } } */ -/* { dg-final { scan-tree-dump-times "OBJ_TYPE_REF" 0 "optimized"} } */ -/* { dg-final { cleanup-ipa-dump "cp" } } */ -/* { dg-final { cleanup-tree-dump "optimized" } } */ diff --git a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/devirt-6.C b/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/devirt-6.C deleted file mode 100644 index e9a5d7093..000000000 --- a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/devirt-6.C +++ /dev/null @@ -1,38 +0,0 @@ -/* Verify that we either do not do any devirtualization or correctly - spot that foo changes the dynamic type of the passed object. */ - -/* { dg-do run } */ -/* { dg-options "-O3" } */ - -extern "C" void abort (void); -extern "C" void *malloc(__SIZE_TYPE__); - -inline void* operator new(__SIZE_TYPE__, void* __p) throw() { return __p;} - -int x; - -class A { -public: - virtual ~A() { } -}; - -class B : public A { -public: - virtual ~B() { if (x == 1) abort (); x = 1; } -}; - -void __attribute__((noinline,noclone)) foo (void *p) -{ - B *b = reinterpret_cast<B *>(p); - b->~B(); - new (p) A; -} - -int main() -{ - void *p = __builtin_malloc (sizeof (B)); - new (p) B; - foo(p); - reinterpret_cast<A *>(p)->~A(); - return 0; -} diff --git a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/devirt-7.C b/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/devirt-7.C deleted file mode 100644 index 1c5912230..000000000 --- a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/devirt-7.C +++ /dev/null @@ -1,87 +0,0 @@ -/* Verify that IPA-CP can do devirtualization even if the virtual call - comes from a method that has been early-inlined into a descendant. */ -/* { dg-do run } */ -/* { dg-options "-O3 -fdump-ipa-cp" } */ - -extern "C" void abort (void); - -class Distraction -{ -public: - float f; - double d; - Distraction () - { - f = 8.3; - d = 10.2; - } - virtual float bar (float z); -}; - -class A -{ -public: - int data; - virtual int foo (int i); - int middleman_1 (int i); -}; - - -class B : public Distraction, public A -{ -public: - virtual int foo (int i); - int middleman_2 (int i); - __attribute__ ((noinline)) B(); -}; - -float Distraction::bar (float z) -{ - f += z; - return f/2; -} - -int A::foo (int i) -{ - return i + 1; -} - -int B::foo (int i) -{ - return i + 2; -} - -int __attribute__ ((noinline,noclone)) get_input(void) -{ - return 1; -} - -int inline __attribute__ ((always_inline)) -A::middleman_1 (int i) -{ - return this->foo (i); -} - -int __attribute__ ((noinline)) -B::middleman_2 (int i) -{ - return this->middleman_1 (i); -} - -B::B () -{ -} - -int main (int argc, char *argv[]) -{ - class B b; - int i; - - for (i = 0; i < get_input(); i++) - if (b.middleman_2 (get_input ()) != 3) - abort (); - return 0; -} - -/* { dg-final { scan-ipa-dump "Discovered a virtual call to a known target.*B::foo" "cp" } } */ -/* { dg-final { cleanup-ipa-dump "cp" } } */ diff --git a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/devirt-9.C b/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/devirt-9.C deleted file mode 100644 index 5be458cbb..000000000 --- a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/devirt-9.C +++ /dev/null @@ -1,31 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-O2 -fdump-ipa-inline" } */ -double foo (); -struct B -{ - bool b1 () { return b3 (); } - void b2 (); - virtual bool b3 (); -}; -struct C -{ - C () {} - bool - c1 (float x, float y) - { - if (x != c3 || y != c4) - c2.b2 (); - return c2.b1 (); - } - B c2; - float c3, c4; -}; - -void -bar () -{ - static C c; - c.c1 (60, (int) foo ()); -} -/* { dg-final { scan-ipa-dump "Discovered a virtual call to a known target" "inline" } } */ -/* { dg-final { cleanup-ipa-dump "inline" } } */ diff --git a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/devirt-c-1.C b/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/devirt-c-1.C deleted file mode 100644 index dcd804659..000000000 --- a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/devirt-c-1.C +++ /dev/null @@ -1,76 +0,0 @@ -/* Verify that ipa-cp correctly detects the dynamic type of an object - under construction when doing devirtualization. */ -/* { dg-do run } */ -/* { dg-options "-O3 -fno-early-inlining -fno-inline -fdump-ipa-cp -fdump-tree-optimized" } */ - -extern "C" void abort (void); - -class A -{ -public: - int data; - A(); - virtual int foo (int i); -}; - -class B : public A -{ -public: - virtual int foo (int i); -}; - -class C : public A -{ -public: - virtual int foo (int i); -}; - -int A::foo (int i) -{ - return i + 1; -} - -int B::foo (int i) -{ - return i + 2; -} - -int C::foo (int i) -{ - return i + 3; -} - -static int middleman (class A *obj, int i) -{ - return obj->foo (i); -} - -int __attribute__ ((noinline,noclone)) get_input(void) -{ - return 1; -} - -A::A () -{ - if (middleman (this, get_input ()) != 2) - abort (); -} - -static void bah () -{ - class B b; -} - -int main (int argc, char *argv[]) -{ - int i; - - for (i = 0; i < 10; i++) - bah (); - return 0; -} - -/* { dg-final { scan-ipa-dump "Discovered a virtual call to a known target.*A::foo" "cp" } } */ -/* { dg-final { scan-tree-dump-times "OBJ_TYPE_REF" 0 "optimized"} } */ -/* { dg-final { cleanup-ipa-dump "cp" } } */ -/* { dg-final { cleanup-tree-dump "optimized" } } */ diff --git a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/devirt-c-2.C b/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/devirt-c-2.C deleted file mode 100644 index b9a36e29f..000000000 --- a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/devirt-c-2.C +++ /dev/null @@ -1,84 +0,0 @@ -/* Verify that ipa-cp correctly detects the dynamic type of an object - under construction when doing devirtualization. */ -/* { dg-do run } */ -/* { dg-options "-O3 -fno-early-inlining -fno-inline -fdump-ipa-cp -fdump-tree-optimized" } */ - -extern "C" void abort (void); - -class Distraction -{ -public: - float f; - double d; - Distraction () - { - f = 8.3; - d = 10.2; - } - virtual float bar (float z); -}; - -class A -{ -public: - int data; - A(); - virtual int foo (int i); -}; - -class B : public Distraction, public A -{ -public: - virtual int foo (int i); -}; - -float Distraction::bar (float z) -{ - f += z; - return f/2; -} - -int A::foo (int i) -{ - return i + 1; -} - -int B::foo (int i) -{ - return i + 2; -} - -int __attribute__ ((noinline,noclone)) get_input(void) -{ - return 1; -} - -static int middleman (class A *obj, int i) -{ - return obj->foo (i); -} - -A::A() -{ - if (middleman (this, get_input ()) != 2) - abort (); -} - -static void bah () -{ - class B b; -} - -int main (int argc, char *argv[]) -{ - int i; - - for (i = 0; i < 10; i++) - bah (); - return 0; -} - -/* { dg-final { scan-ipa-dump "Discovered a virtual call to a known target.*A::foo" "cp" } } */ -/* { dg-final { scan-tree-dump-times "OBJ_TYPE_REF" 0 "optimized"} } */ -/* { dg-final { cleanup-ipa-dump "cp" } } */ -/* { dg-final { cleanup-tree-dump "optimized" } } */ diff --git a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/devirt-c-3.C b/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/devirt-c-3.C deleted file mode 100644 index c8791f79e..000000000 --- a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/devirt-c-3.C +++ /dev/null @@ -1,80 +0,0 @@ -/* Verify that ipa-cp correctly detects the dynamic type of an object - under construction when doing devirtualization. */ -/* { dg-do run } */ -/* { dg-options "-O3 -fno-inline" } */ - -extern "C" void abort (void); - -class Distraction -{ -public: - float f; - double d; - Distraction () - { - f = 8.3; - d = 10.2; - } - virtual float bar (float z); -}; - -class A -{ -public: - int data; - A(); - virtual int foo (int i); -}; - -class B : public Distraction, public A -{ -public: - virtual int foo (int i); -}; - -float Distraction::bar (float z) -{ - f += z; - return f/2; -} - -int A::foo (int i) -{ - return i + 1; -} - -int B::foo (int i) -{ - return i + 2; -} - -int __attribute__ ((noinline,noclone)) get_input(void) -{ - return 1; -} - -static int __attribute__ ((noinline)) -middleman (class A *obj, int i) -{ - return obj->foo (i); -} - -inline __attribute__ ((always_inline)) A::A() -{ - if (middleman (this, get_input ()) != 2) - abort (); -} - -static void bah () -{ - class B b; -} - -int main (int argc, char *argv[]) -{ - int i; - - for (i = 0; i < 10; i++) - bah (); - return 0; -} diff --git a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/devirt-c-4.C b/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/devirt-c-4.C deleted file mode 100644 index 56d41e496..000000000 --- a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/devirt-c-4.C +++ /dev/null @@ -1,110 +0,0 @@ -/* Verify that ipa-cp correctly detects the dynamic type of an object - under construction when doing devirtualization. */ -/* { dg-do run } */ -/* { dg-options "-O3 -fno-inline" } */ - -extern "C" void abort (void); - -class Distraction -{ -public: - float f; - double d; - Distraction () - { - f = 8.3; - d = 10.2; - } - virtual float bar (float z); -}; - -class A -{ -public: - int data; - A(); - virtual int foo (int i); -}; - -class B : public Distraction, public A -{ -public: - B(); - virtual int foo (int i); -}; - -class C : public B -{ -public: - virtual int foo (int i); -}; - - -float Distraction::bar (float z) -{ - f += z; - return f/2; -} - -int A::foo (int i) -{ - return i + 1; -} - -int B::foo (int i) -{ - return i + 2; -} - -int C::foo (int i) -{ - return i + 3; -} - -int __attribute__ ((noinline,noclone)) get_input(void) -{ - return 1; -} - -static int __attribute__ ((noinline)) -middleman (class A *obj, int i) -{ - return obj->foo (i); -} - -static void __attribute__ ((noinline)) -sth2 (A *a) -{ - if (a->foo (get_input ()) != 3) - abort (); -} - -inline void __attribute__ ((always_inline)) sth1 (B *b) -{ - sth2 (b); -} - -inline __attribute__ ((always_inline)) A::A() -{ - if (middleman (this, get_input ()) != 2) - abort (); -} - -B::B() : Distraction(), A() -{ - sth1 (this); -} - -static void bah () -{ - class C c; -} - -int main (int argc, char *argv[]) -{ - int i; - - for (i = 0; i < 10; i++) - bah (); - return 0; -} diff --git a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/devirt-c-5.C b/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/devirt-c-5.C deleted file mode 100644 index 637d7d4be..000000000 --- a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/devirt-c-5.C +++ /dev/null @@ -1,79 +0,0 @@ -/* Verify that ipa-cp correctly detects the dynamic type of an object - under construction when doing devirtualization. */ -/* { dg-do run } */ -/* { dg-options "-O3 -fno-early-inlining -fno-inline" } */ - -extern "C" void abort (void); - -class B; - -class A -{ -public: - int data; - A(); - A(B *b); - virtual int foo (int i); -}; - -class B : public A -{ -public: - virtual int foo (int i); -}; - -class C : public A -{ -public: - virtual int foo (int i); -}; - -int A::foo (int i) -{ - return i + 1; -} - -int B::foo (int i) -{ - return i + 2; -} - -int C::foo (int i) -{ - return i + 3; -} - -static int middleman (class A *obj, int i) -{ - return obj->foo (i); -} - -int __attribute__ ((noinline,noclone)) get_input(void) -{ - return 1; -} - -A::A () -{ -} - -A::A (B *b) -{ - if (middleman (b, get_input ()) != 3) - abort (); -} - -static void bah () -{ - B b; - A a(&b); -} - -int main (int argc, char *argv[]) -{ - int i; - - for (i = 0; i < 10; i++) - bah (); - return 0; -} diff --git a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/devirt-c-6.C b/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/devirt-c-6.C deleted file mode 100644 index f9b8b6954..000000000 --- a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/devirt-c-6.C +++ /dev/null @@ -1,72 +0,0 @@ -/* Verify that ipa-cp correctly detects the dynamic type of an object - under construction when doing devirtualization. */ -/* { dg-do run } */ -/* { dg-options "-O3 -fno-inline" } */ - -extern "C" void abort (void); - -class A -{ -public: - int data; - A(); - virtual int foo (int i); -}; - -class B : public A -{ -public: - virtual int foo (int i); -}; - -class C : public A -{ -public: - virtual int foo (int i); -}; - -int A::foo (int i) -{ - return i + 1; -} - -int B::foo (int i) -{ - return i + 2; -} - -int C::foo (int i) -{ - return i + 3; -} - -static inline int __attribute__ ((always_inline)) -middleman (class A *obj, int i) -{ - return obj->foo (i); -} - -int __attribute__ ((noinline,noclone)) get_input(void) -{ - return 1; -} - -__attribute__ ((noinline)) A::A () -{ - if (middleman (this, get_input ()) != 2) - abort (); -} - -static void bah () -{ - class B b; -} - -int main (int argc, char *argv[]) -{ - int i; - - for (i = 0; i < 10; i++) - bah (); - return 0; -} diff --git a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/devirt-c-7.C b/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/devirt-c-7.C deleted file mode 100644 index 2e76cbe40..000000000 --- a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/devirt-c-7.C +++ /dev/null @@ -1,88 +0,0 @@ -/* Verify that ipa-cp will not get confused by placement new constructing an - object within another one when looking for dynamic type change . */ -/* { dg-do run } */ -/* { dg-require-effective-target nonpic } */ -/* { dg-options "-O3 -Wno-attributes" } */ - -extern "C" void abort (void); -namespace std { - typedef __SIZE_TYPE__ size_t; -} -inline void* __attribute__ ((always_inline)) -operator new(std::size_t, void* __p) throw() -{ - return __p; -} - -class A -{ -public: - char data[256]; - A(); - virtual int foo (int i); -}; - -class B : public A -{ -public: - virtual int foo (int i); -}; - -class C -{ -public: - C(); - virtual double foo (double i); -}; - -int A::foo (int i) -{ - return i + 1; -} - -int B::foo (int i) -{ - return i + 2; -} - -double C::foo (double i) -{ - return i + 3.5; -} - -static int __attribute__ ((noinline)) middleman (class A *obj, int i) -{ - return obj->foo (i); -} - -int __attribute__ ((noinline,noclone)) get_input(void) -{ - return 1; -} - -__attribute__ ((always_inline)) C::C () -{ -} - -A::A () -{ -} - -static __attribute__ ((noinline)) void bah () -{ - class B b; - - C *c = new ((void *) &b.data) C; - - if (middleman (&b, get_input ()) != 3) - abort (); -} - -int main (int argc, char *argv[]) -{ - int i; - - for (i = 0; i < 10; i++) - bah (); - return 0; -} diff --git a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/devirt-c-8.C b/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/devirt-c-8.C deleted file mode 100644 index 309644d92..000000000 --- a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/devirt-c-8.C +++ /dev/null @@ -1,82 +0,0 @@ -/* Verify that ipa-cp correctly detects the dynamic type of an object - under construction when doing devirtualization. */ -/* { dg-do run } */ -/* { dg-options "-O3 -fno-early-inlining -fno-inline -fdump-ipa-cp -fdump-tree-optimized" } */ - -extern "C" void abort (void); - -class A -{ -public: - int data; - A(); - virtual int foo (int i); -}; - -class B : public A -{ -public: - B(); - virtual int foo (int i); -}; - -class C : public A -{ -public: - virtual int foo (int i); -}; - -int A::foo (int i) -{ - return i + 1; -} - -int B::foo (int i) -{ - return i + 2; -} - -int C::foo (int i) -{ - return i + 3; -} - -static int __attribute__ ((noinline)) -middleman (class A *obj, int i) -{ - return obj->foo (i); -} - -int __attribute__ ((noinline,noclone)) get_input(void) -{ - return 1; -} - -inline __attribute__ ((always_inline)) A::A () -{ - if (middleman (this, get_input ()) != 2) - abort (); -} - -inline __attribute__ ((always_inline)) B::B () -{ -} - -static void bah () -{ - class B b; -} - -int main (int argc, char *argv[]) -{ - int i; - - for (i = 0; i < 10; i++) - bah (); - return 0; -} - -/* { dg-final { scan-ipa-dump "Discovered a virtual call to a known target.*A::foo" "cp" } } */ -/* { dg-final { scan-tree-dump-times "OBJ_TYPE_REF" 0 "optimized"} } */ -/* { dg-final { cleanup-ipa-dump "cp" } } */ -/* { dg-final { cleanup-tree-dump "optimized" } } */ diff --git a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/devirt-d-1.C b/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/devirt-d-1.C deleted file mode 100644 index 3897a7782..000000000 --- a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/devirt-d-1.C +++ /dev/null @@ -1,71 +0,0 @@ -/* Verify that ipa-cp correctly detects the dynamic type of an object - under destruction when doing devirtualization. */ -/* { dg-do run } */ -/* { dg-options "-O3 -fno-early-inlining -fno-inline" } */ - -extern "C" void abort (void); - -class A -{ -public: - int data; - ~A(); - virtual int foo (int i); -}; - -class B : public A -{ -public: - virtual int foo (int i); -}; - -class C : public A -{ -public: - virtual int foo (int i); -}; - -int A::foo (int i) -{ - return i + 1; -} - -int B::foo (int i) -{ - return i + 2; -} - -int C::foo (int i) -{ - return i + 3; -} - -static int middleman (class A *obj, int i) -{ - return obj->foo (i); -} - -int __attribute__ ((noinline,noclone)) get_input(void) -{ - return 1; -} - -A::~A () -{ - if (middleman (this, get_input ()) != 2) - abort (); -} - -static void bah () -{ - class B b; -} - -int main (int argc, char *argv[]) -{ - int i; - - for (i = 0; i < 10; i++) - bah (); - return 0; -} diff --git a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/devirt-g-1.C b/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/devirt-g-1.C deleted file mode 100644 index 175f24efb..000000000 --- a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/devirt-g-1.C +++ /dev/null @@ -1,24 +0,0 @@ -// { dg-do compile } -// { dg-options "-O2 -fdump-ipa-cp -fdump-tree-optimized" } - -struct S { S(); virtual void xyzzy(); void otherstuff(); }; -struct R { int a; S s; R(); }; -S s; -R r; - -void S::xyzzy () -{ - otherstuff (); - otherstuff (); -} - -static void __attribute__ ((noinline)) foo(S *p) { p->xyzzy(); } -void bar() {foo(&s); } - -static void __attribute__ ((noinline)) foh(S *p) { p->xyzzy(); } -void bah() {foh(&r.s); } - -/* { dg-final { scan-ipa-dump "Discovered a virtual call to a known target.*S::xyzzy" "cp" } } */ -/* { dg-final { scan-tree-dump-times "OBJ_TYPE_REF" 0 "optimized"} } */ -/* { dg-final { cleanup-ipa-dump "cp" } } */ -/* { dg-final { cleanup-tree-dump "optimized" } } */ diff --git a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/iinline-1.C b/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/iinline-1.C deleted file mode 100644 index 9f9989322..000000000 --- a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/iinline-1.C +++ /dev/null @@ -1,49 +0,0 @@ -/* Verify that simple indirect calls are inlined even without early - inlining.. */ -/* { dg-do compile } */ -/* { dg-options "-O3 -fdump-ipa-inline -fno-early-inlining" } */ -/* { dg-add-options bind_pic_locally } */ - -extern void non_existent (const char *, int); - -class String -{ -private: - const char *data; - -public: - String (const char *d) : data(d) - {} - - int funcOne (int delim) const; - int printStuffTwice (int delim) const; -}; - - -int String::funcOne (int delim) const -{ - int i; - for (i = 0; i < delim; i++) - non_existent(data, i); - - return 1; -} - -int docalling (int (String::* f)(int delim) const) -{ - String S ("muhehehe"); - - return (S.*f)(4); -} - -int main (int argc, char *argv[]) -{ - int i = 0; - while (i < 1000) - i += docalling (&String::funcOne); - non_existent ("done", i); - return 0; -} - -/* { dg-final { scan-ipa-dump "String::funcOne\[^\\n\]*inline copy in int main" "inline" } } */ -/* { dg-final { cleanup-ipa-dump "inline" } } */ diff --git a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/iinline-2.C b/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/iinline-2.C deleted file mode 100644 index 670a5dd95..000000000 --- a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/iinline-2.C +++ /dev/null @@ -1,61 +0,0 @@ -/* Verify that simple indirect calls are inlined even without early - inlining.. */ -/* { dg-do compile } */ -/* { dg-options "-O3 -fdump-ipa-inline -fno-early-inlining" } */ -/* { dg-add-options bind_pic_locally } */ - -extern void non_existent (const char *, int); - -class String -{ -private: - const char *data; - -public: - String (const char *d) : data(d) - {} - - int funcOne (int delim) const; - int printStuffTwice (int delim) const; -}; - - -int String::funcOne (int delim) const -{ - int i; - for (i = 0; i < delim; i++) - non_existent(data, i); - - return 1; -} - -extern int global; - -int docalling (int c, int (String::* f)(int delim) const) -{ - String S ("muhehehe"); - - if (c > 2) - global = 3; - else - global = 5; - - return (S.*f)(4); -} - -int __attribute__ ((noinline,noclone)) get_input (void) -{ - return 1; -} - -int main (int argc, char *argv[]) -{ - int i = 0; - while (i < 1000) - i += docalling (get_input (), &String::funcOne); - non_existent ("done", i); - return 0; -} - -/* { dg-final { scan-ipa-dump "String::funcOne\[^\\n\]*inline copy in int main" "inline" } } */ -/* { dg-final { cleanup-ipa-dump "inline" } } */ diff --git a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/iinline-3.C b/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/iinline-3.C deleted file mode 100644 index 3daee9a86..000000000 --- a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/iinline-3.C +++ /dev/null @@ -1,64 +0,0 @@ -/* Verify that we do not indirect-inline using member pointer - parameters which have been modified. */ -/* { dg-do run } */ -/* { dg-options "-O3 -fno-early-inlining" } */ -/* { dg-add-options bind_pic_locally } */ - -extern "C" void abort (void); - -class String -{ -private: - const char *data; - -public: - String (const char *d) : data(d) - {} - - int funcOne (int stuff) const; - int funcTwo (int stuff) const; -}; - - -int String::funcOne (int stuff) const -{ - return stuff + 1; -} - -int String::funcTwo (int stuff) const -{ - return stuff + 100; -} - -int (String::* gmp)(int stuff) const = &String::funcTwo; - -int docalling_1 (int (String::* f)(int stuff) const) -{ - String S ("muhehehe"); - - return (S.*f)(4); -} - -int docalling (int a, int (String::* f)(int stuff) const) -{ - if (a < 200) - f = gmp; - - return docalling_1 (f); -} - -int __attribute__ ((noinline,noclone)) get_input (void) -{ - return 1; -} - -int main (int argc, char *argv[]) -{ - int i = 0; - while (i < 10) - i += docalling (get_input (), &String::funcOne); - - if (i != 104) - abort(); - return 0; -} diff --git a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/inline-1.C b/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/inline-1.C deleted file mode 100644 index dbbfb4e33..000000000 --- a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/inline-1.C +++ /dev/null @@ -1,36 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-O2 -fdump-ipa-inline --param max-early-inliner-iterations=1" } */ -/* { dg-add-options bind_pic_locally } */ - -namespace std { - extern "C" void puts(const char *s); -} - -template <class T, class E> void -foreach (T b, T e, void (*ptr)(E)) -{ - for (; b != e; b++) - ptr(*b); -} - -void -inline_me (char *x) -{ - std::puts(x); -} - -static void -inline_me_too (char *x) -{ - std::puts(x); -} - -int main(int argc, char **argv) -{ - foreach (argv, argv + argc, inline_me); - foreach (argv, argv + argc, inline_me_too); -} - -/* { dg-final { scan-ipa-dump-times "Considering void inline_me\\(" 1 "inline"} } */ -/* { dg-final { scan-ipa-dump-times "Considering void inline_me_too\\(" 1 "inline"} } */ -/* { dg-final { cleanup-ipa-dump "inline" } } */ diff --git a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/inline-2.C b/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/inline-2.C deleted file mode 100644 index fd284a1e2..000000000 --- a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/inline-2.C +++ /dev/null @@ -1,36 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-O2 -fdump-ipa-inline --param max-early-inliner-iterations=1" } */ -/* { dg-add-options bind_pic_locally } */ - -namespace std { - extern "C" void puts(const char *s); -} - -template <class T, class E> void -foreach (T b, T e, E ptr) -{ - for (; b != e; b++) - ptr(*b); -} - -void -inline_me (char *x) -{ - std::puts(x); -} - -static void -inline_me_too (char *x) -{ - std::puts(x); -} - -int main(int argc, char **argv) -{ - foreach (argv, argv + argc, inline_me); - foreach (argv, argv + argc, inline_me_too); -} - -/* { dg-final { scan-ipa-dump-times "Considering void inline_me\\(" 1 "inline"} } */ -/* { dg-final { scan-ipa-dump-times "Considering void inline_me_too\\(" 1 "inline"} } */ -/* { dg-final { cleanup-ipa-dump "inline" } } */ diff --git a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/inline-3.C b/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/inline-3.C deleted file mode 100644 index 8d5f905cf..000000000 --- a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/inline-3.C +++ /dev/null @@ -1,29 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-O2 -fdump-ipa-inline --param max-early-inliner-iterations=1" } */ -/* { dg-add-options bind_pic_locally } */ - -#include <algorithm> - -void foo(const char *s); - -void -inline_me (char *x) -{ - foo(x); -} - -static void -inline_me_too (char *x) -{ - foo(x); -} - -int main(int argc, char **argv) -{ - std::for_each (argv, argv + argc, inline_me); - std::for_each (argv, argv + argc, inline_me_too); -} - -/* { dg-final { scan-ipa-dump-times "Considering void inline_me\\(" 1 "inline"} } */ -/* { dg-final { scan-ipa-dump-times "Considering void inline_me_too\\(" 1 "inline"} } */ -/* { dg-final { cleanup-ipa-dump "inline" } } */ diff --git a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/ivinline-1.C b/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/ivinline-1.C deleted file mode 100644 index bc4dfea5c..000000000 --- a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/ivinline-1.C +++ /dev/null @@ -1,64 +0,0 @@ -/* Verify that simple virtual calls are inlined even without early - inlining. */ -/* { dg-do run { target nonpic } } */ -/* { dg-options "-O3 -fdump-ipa-inline -fno-early-inlining -fno-ipa-cp" } */ - -extern "C" void abort (void); - -class A -{ -public: - int data; - virtual int foo (int i); -}; - -class B : public A -{ -public: - virtual int foo (int i); -}; - -class C : public A -{ -public: - virtual int foo (int i); -}; - -int A::foo (int i) -{ - return i + 1; -} - -int B::foo (int i) -{ - return i + 2; -} - -int C::foo (int i) -{ - return i + 3; -} - -int middleman (class A *obj, int i) -{ - return obj->foo (i); -} - -int __attribute__ ((noinline,noclone)) get_input(void) -{ - return 1; -} - -int main (int argc, char *argv[]) -{ - class B b; - int i; - - for (i = 0; i < get_input (); i++) - if (middleman (&b, get_input ()) != 3) - abort (); - return 0; -} - -/* { dg-final { scan-ipa-dump "B::foo\[^\\n\]*inline copy in int main" "inline" } } */ -/* { dg-final { cleanup-ipa-dump "inline" } } */ diff --git a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/ivinline-2.C b/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/ivinline-2.C deleted file mode 100644 index 001cff204..000000000 --- a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/ivinline-2.C +++ /dev/null @@ -1,63 +0,0 @@ -/* Verify that simple virtual calls using this pointer are inlined - even without early inlining.. */ -/* { dg-do run { target nonpic } } */ -/* { dg-options "-O3 -fdump-ipa-inline -fno-early-inlining -fno-ipa-cp" } */ - -extern "C" void abort (void); - -class A -{ -public: - int data; - virtual int foo (int i); - int middleman (int i) - { - return foo (i); - } -}; - -class B : public A -{ -public: - virtual int foo (int i); -}; - -class C : public A -{ -public: - virtual int foo (int i); -}; - -int A::foo (int i) -{ - return i + 1; -} - -int B::foo (int i) -{ - return i + 2; -} - -int C::foo (int i) -{ - return i + 3; -} - -int __attribute__ ((noinline,noclone)) get_input(void) -{ - return 1; -} - -int main (int argc, char *argv[]) -{ - class B b; - int i; - - for (i = 0; i < get_input (); i++) - if (b.middleman (get_input ()) != 3) - abort (); - return 0; -} - -/* { dg-final { scan-ipa-dump "B::foo\[^\\n\]*inline copy in int main" "inline" } } */ -/* { dg-final { cleanup-ipa-dump "inline" } } */ diff --git a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/ivinline-3.C b/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/ivinline-3.C deleted file mode 100644 index 637a6aecc..000000000 --- a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/ivinline-3.C +++ /dev/null @@ -1,64 +0,0 @@ -/* Verify that simple virtual calls on an object refrence are inlined - even without early inlining. */ -/* { dg-do run { target nonpic } } */ -/* { dg-options "-O3 -fdump-ipa-inline -fno-early-inlining -fno-ipa-cp" } */ - -extern "C" void abort (void); - -class A -{ -public: - int data; - virtual int foo (int i); -}; - -class B : public A -{ -public: - virtual int foo (int i); -}; - -class C : public A -{ -public: - virtual int foo (int i); -}; - -int A::foo (int i) -{ - return i + 1; -} - -int B::foo (int i) -{ - return i + 2; -} - -int C::foo (int i) -{ - return i + 3; -} - -int middleman (class A &obj, int i) -{ - return obj.foo (i); -} - -int __attribute__ ((noinline,noclone)) get_input(void) -{ - return 1; -} - -int main (int argc, char *argv[]) -{ - class B b; - int i; - - for (i = 0; i < get_input (); i++) - if (middleman (b, get_input ()) != 3) - abort (); - return 0; -} - -/* { dg-final { scan-ipa-dump "B::foo\[^\\n\]*inline copy in int main" "inline" } } */ -/* { dg-final { cleanup-ipa-dump "inline" } } */ diff --git a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/ivinline-4.C b/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/ivinline-4.C deleted file mode 100644 index f5b8f8e5d..000000000 --- a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/ivinline-4.C +++ /dev/null @@ -1,70 +0,0 @@ -/* Verify that simple virtual calls are inlined even without early - inlining, even when a typecast to an ancestor is involved along the - way. */ -/* { dg-do run { target nonpic } } */ -/* { dg-options "-O3 -fdump-ipa-inline -fno-early-inlining -fno-ipa-cp" } */ - -extern "C" void abort (void); - -class A -{ -public: - int data; - virtual int foo (int i); -}; - -class B : public A -{ -public: - virtual int foo (int i); -}; - -class C : public A -{ -public: - virtual int foo (int i); -}; - -int A::foo (int i) -{ - return i + 1; -} - -int B::foo (int i) -{ - return i + 2; -} - -int C::foo (int i) -{ - return i + 3; -} - -int __attribute__ ((noinline,noclone)) get_input(void) -{ - return 1; -} - -static int middleman_1 (class A *obj, int i) -{ - return obj->foo (i); -} - -static int middleman_2 (class B *obj, int i) -{ - return middleman_1 (obj, i); -} - -int main (int argc, char *argv[]) -{ - class B b; - int i; - - for (i = 0; i < get_input (); i++) - if (middleman_2 (&b, get_input ()) != 3) - abort (); - return 0; -} - -/* { dg-final { scan-ipa-dump "B::foo\[^\\n\]*inline copy in int main" "inline" } } */ -/* { dg-final { cleanup-ipa-dump "inline" } } */ diff --git a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/ivinline-5.C b/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/ivinline-5.C deleted file mode 100644 index d78173d69..000000000 --- a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/ivinline-5.C +++ /dev/null @@ -1,55 +0,0 @@ -/* Verify that virtual call inlining does not pick a wrong method when - there is a user defined ancestor in an object. */ -/* { dg-do run { target nonpic } } */ -/* { dg-options "-O3 -fdump-ipa-inline -fno-early-inlining -fno-ipa-cp" } */ - -extern "C" void abort (void); - -class A -{ -public: - int data; - virtual int foo (int i); -}; - -class B : public A -{ -public: - class A confusion; - virtual int foo (int i); -}; - -int A::foo (int i) -{ - return i + 1; -} - -int B::foo (int i) -{ - return i + 2; -} - -int middleman (class A *obj, int i) -{ - return obj->foo (i); -} - -int __attribute__ ((noinline,noclone)) get_input(void) -{ - return 1; -} - -int main (int argc, char *argv[]) -{ - class B b; - int i, j = get_input (); - - for (i = 0; i < j; i++) - if ((middleman (&b, j) + 100 * middleman (&b.confusion, j)) != 203) - abort (); - return 0; -} - -/* { dg-final { scan-ipa-dump "A::foo\[^\\n\]*inline copy in int main" "inline" } } */ -/* { dg-final { scan-ipa-dump "B::foo\[^\\n\]*inline copy in int main" "inline" } } */ -/* { dg-final { cleanup-ipa-dump "inline" } } */ diff --git a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/ivinline-7.C b/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/ivinline-7.C deleted file mode 100644 index 9d725a508..000000000 --- a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/ivinline-7.C +++ /dev/null @@ -1,80 +0,0 @@ -/* Verify that simple virtual calls are inlined even without early - inlining, even when a typecast to an ancestor is involved along the - way and that ancestor is not the first one with virtual functions. */ -/* { dg-do run { target nonpic } } */ -/* { dg-options "-O3 -fdump-ipa-inline -fno-early-inlining -fno-ipa-cp" } */ - -extern "C" void abort (void); - -class Distraction -{ -public: - float f; - double d; - Distraction () - { - f = 8.3; - d = 10.2; - } - virtual float bar (float z); -}; - -class A -{ -public: - int data; - virtual int foo (int i); -}; - - -class B : public Distraction, public A -{ -public: - virtual int foo (int i); -}; - -float Distraction::bar (float z) -{ - f += z; - return f/2; -} - -int A::foo (int i) -{ - return i + 1; -} - -int B::foo (int i) -{ - return i + 2; -} - -int __attribute__ ((noinline,noclone)) get_input(void) -{ - return 1; -} - -static int middleman_1 (class A *obj, int i) -{ - return obj->foo (i); -} - -static int middleman_2 (class B *obj, int i) -{ - return middleman_1 (obj, i); -} - -int main (int argc, char *argv[]) -{ - class B b; - int i; - - for (i = 0; i < get_input (); i++) - if (middleman_2 (&b, get_input ()) != 3) - abort (); - return 0; -} - -/* { dg-final { scan-ipa-dump "Discovered a virtual call to a known target.*B::.*foo" "inline" } } */ -/* { dg-final { scan-ipa-dump "B::foo\[^\\n\]*inline copy in int main" "inline" { xfail *-*-* } } } */ -/* { dg-final { cleanup-ipa-dump "inline" } } */ diff --git a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/ivinline-8.C b/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/ivinline-8.C deleted file mode 100644 index eebfc6af1..000000000 --- a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/ivinline-8.C +++ /dev/null @@ -1,77 +0,0 @@ -/* Verify that virtual calls are inlined (ithout early inlining) even - when their caller is itself indirectly inlined. */ -/* { dg-do run { target nonpic } } */ -/* { dg-options "-O3 -fdump-ipa-inline -fno-early-inlining -fno-ipa-cp" } */ - -extern "C" void abort (void); - -class A -{ -public: - int data; - virtual int bar (int i); - virtual int foo (int i); -}; - -class B : public A -{ -public: - virtual int bar (int i); - virtual int foo (int i); -}; - -class C : public A -{ -public: - virtual int foo (int i); -}; - -int A::bar (int i) -{ - return i + 100 * i; -} - -int A::foo (int i) -{ - return bar (i) + 1; -} - -int B::bar (int i) -{ - return i + 100 * (i + 2); -} - -int B::foo (int i) -{ - return bar (i) + 2; -} - -int C::foo (int i) -{ - return i + 3; -} - -int middleman (class A *obj, int i) -{ - return obj->foo (i); -} - -int __attribute__ ((noinline,noclone)) get_input(void) -{ - return 1; -} - -int main (int argc, char *argv[]) -{ - class B b; - int i; - - for (i = 0; i < get_input (); i++) - if (middleman (&b, get_input ()) != 303) - abort (); - return 0; -} - -/* { dg-final { scan-ipa-dump "B::foo\[^\\n\]*inline copy in int main" "inline" } } */ -/* { dg-final { scan-ipa-dump "B::bar\[^\\n\]*inline copy in int main" "inline" } } */ -/* { dg-final { cleanup-ipa-dump "inline" } } */ diff --git a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/ivinline-9.C b/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/ivinline-9.C deleted file mode 100644 index 586c3af30..000000000 --- a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/ivinline-9.C +++ /dev/null @@ -1,94 +0,0 @@ -/* Verify that simple virtual calls are inlined even without early - inlining, even when a typecast to an ancestor is involved along the - way and that ancestor itself has an ancestor wich is not the - primary base class. */ -/* { dg-do run { target nonpic } } */ -/* { dg-options "-O3 -fdump-ipa-inline -fno-early-inlining -fno-ipa-cp" } */ - -extern "C" void abort (void); - -class Distraction -{ -public: - float f; - double d; - Distraction () - { - f = 8.3; - d = 10.2; - } - virtual float bar (float z); -}; - -class A -{ -public: - int data; - virtual int foo (int i); -}; -/* -class D2 -{ -public: - virtual float baz (float z) - { - abort(); - } -}; -*/ -class A2 : public Distraction, public A -{ - int i2; -}; - -class B : public A2 -{ -public: - virtual int foo (int i); -}; - -float Distraction::bar (float z) -{ - f += z; - return f/2; -} - -int A::foo (int i) -{ - return i + 1; -} - -int B::foo (int i) -{ - return i + 2; -} - -int __attribute__ ((noinline,noclone)) get_input(void) -{ - return 1; -} - -static int middleman_1 (class A *obj, int i) -{ - return obj->foo (i); -} - -static int middleman_2 (class B *obj, int i) -{ - return middleman_1 (obj, i); -} - -int main (int argc, char *argv[]) -{ - class B b; - int i; - - for (i = 0; i < get_input (); i++) - if (middleman_2 (&b, get_input ()) != 3) - abort (); - return 0; -} - -/* { dg-final { scan-ipa-dump "Discovered a virtual call to a known target.*B::.*foo" "inline" } } */ -/* { dg-final { scan-ipa-dump "B::foo\[^\\n\]*inline copy in int main" "inline" { xfail *-*-* } } } */ -/* { dg-final { cleanup-ipa-dump "inline" } } */ diff --git a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/pr43695.C b/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/pr43695.C deleted file mode 100644 index a01478324..000000000 --- a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/pr43695.C +++ /dev/null @@ -1,20 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-fipa-cp -fipa-cp-clone" } */ - -extern void baz(int) __attribute__ ((noreturn)); - -struct S { - ~S(); -}; - -__attribute__ ((noreturn, noinline)) -void bar(int i) -{ - baz(i); -} - -void foo() -{ - S s; - bar(0); -} diff --git a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/pr43812.C b/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/pr43812.C deleted file mode 100644 index cc46eed65..000000000 --- a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/pr43812.C +++ /dev/null @@ -1,38 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-O -fwhole-program -fipa-cp" } */ - -typedef float scoord_t; -typedef scoord_t sdist_t; -typedef sdist_t dist_t; -template<typename T> class TRay { }; -typedef TRay<dist_t> Ray; -class BBox { }; -class RenderContext { }; -class RefCounted { -public: - void deref () const { - if (--ref_count <= 0) { - delete this; - } - } - mutable int ref_count; -}; -template<class T> class Ref { -public: - ~Ref () { - if (obj) obj->deref (); - } - T *obj; -}; -class Material : public RefCounted { }; -class Surface { -public: - virtual ~Surface () { } - class IsecInfo { }; - virtual const IsecInfo *intersect (Ray &ray, RenderContext &context) const; - Ref<const Material> material; -}; -class LocalSurface : public Surface { - virtual BBox bbox () const; -}; -BBox LocalSurface::bbox () const { } diff --git a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/pr44372.C b/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/pr44372.C deleted file mode 100644 index 22aa747e4..000000000 --- a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/pr44372.C +++ /dev/null @@ -1,48 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-O -fipa-cp -fipa-cp-clone" } */ - -template < typename > class S3; - -struct S1 -{ - struct - { - int i[10]; - } s0; - S1 () : s0 () - { } - template < typename T > S1 (S3 < T > s3, int) - { - f (s3); - } -}; - -struct S2 -{ - template < typename T > S2 s (S3 < T > s3) - { - S1 (s3, 0); - } - S2 (int i) : j (i) - { } - int j; - S1 s1[10]; -}; - -template < typename > struct S3 -{ - S3 () - { - S2 (0).s (*this); - } -}; - -static inline void -f (S3 < int > s3) -{ - extern bool m; - if (m) - S2 (0).s (s3); -} - -S3 < int >s3; diff --git a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/pr45565.C b/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/pr45565.C deleted file mode 100644 index c04de12e2..000000000 --- a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/pr45565.C +++ /dev/null @@ -1,29 +0,0 @@ -// { dg-do compile } -// { dg-options "-O -fno-toplevel-reorder -fno-inline -fipa-cp -fipa-cp-clone -fkeep-inline-functions" } - -template < typename Derived > struct AnyMatrixBase -{ -}; - -struct Matrix Random (); - -struct Matrix:AnyMatrixBase < Matrix > -{ - void bar () - { - throw; - } - void foo (Matrix other) - { - bar (); - Matrix (AnyMatrixBase < Matrix > (Random ())); - } - template - < typename OtherDerived > Matrix (AnyMatrixBase < OtherDerived > other) - { - foo (other); - } -}; - -Matrix x (Random ()); - diff --git a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/pr45572-1.C b/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/pr45572-1.C deleted file mode 100644 index 82f347052..000000000 --- a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/pr45572-1.C +++ /dev/null @@ -1,64 +0,0 @@ -// { dg-do compile } -// { dg-options "-finline-small-functions -findirect-inlining -finline-functions -O" } - -extern "C" { -typedef long unsigned int size_t; -typedef long int __ssize_t; -typedef struct _IO_FILE FILE; -typedef struct -{ -} __mbstate_t; -extern __inline __attribute__ ((__gnu_inline__)) int -fgetc_unlocked (FILE *__fp) -{ -} -extern __inline __attribute__ ((__gnu_inline__)) int -putc_unlocked (int __c, FILE *__stream) -{ -} -extern __inline __attribute__ ((__gnu_inline__)) __ssize_t -getline (char **__lineptr, size_t *__n, FILE *__stream) -{ -} -extern __inline __attribute__ ((__gnu_inline__)) int -ferror_unlocked (FILE *__stream) throw () -{ -} -} -typedef struct -{} __mpf_struct; -typedef __mpf_struct mpf_t[1]; -typedef const __mpf_struct *mpf_srcptr; -typedef __mpf_struct *mpf_ptr; -extern "C" { - void __gmpf_add (mpf_ptr, mpf_srcptr, mpf_srcptr); -} -class _knumber -{ - public: - enum NumType {SpecialType, IntegerType, FractionType, FloatType}; - virtual NumType type(void) const = 0; - virtual _knumber * add(_knumber const & arg2) const = 0; - virtual operator long int(void) const = 0; -}; -class _knumfloat : public _knumber -{ - _knumfloat(double num = 1.0) - ; - virtual NumType type(void) const ; - virtual _knumber * add(_knumber const & arg2) const; - virtual operator long int (void) const; - mpf_t _mpf; -}; -_knumber *_knumfloat::add(_knumber const & arg2) const -{ - if (arg2.type() == SpecialType) - return arg2.add(*this); -{ - _knumfloat tmp_num(arg2); - return tmp_num.add(*this); - } - _knumfloat * tmp_num = new _knumfloat(); - __gmpf_add(tmp_num->_mpf, _mpf, - dynamic_cast<_knumfloat const &>(arg2)._mpf); -} diff --git a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/pr45572-2.C b/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/pr45572-2.C deleted file mode 100644 index 8b583d9c5..000000000 --- a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/pr45572-2.C +++ /dev/null @@ -1,39 +0,0 @@ -// { dg-do compile } -// { dg-options "-finline-small-functions -findirect-inlining -finline-function+ -typedef struct -{} __mpf_struct; -typedef __mpf_struct mpf_t[1]; -typedef const __mpf_struct *mpf_srcptr; -typedef __mpf_struct *mpf_ptr; -extern "C" { - void __gmpf_add (mpf_ptr, mpf_srcptr, mpf_srcptr); -} -class _knumber -{ - public: - enum NumType {SpecialType, IntegerType, FractionType, FloatType}; - virtual NumType type(void) const = 0; - virtual _knumber * add(_knumber const & arg2) const = 0; - virtual operator long int(void) const = 0; -}; -class _knumfloat : public _knumber -{ - _knumfloat(double num = 1.0) - ; - virtual NumType type(void) const ; - virtual _knumber * add(_knumber const & arg2) const; - virtual operator long int (void) const; - mpf_t _mpf; -}; -_knumber *_knumfloat::add(_knumber const & arg2) const -{ - if (arg2.type() == SpecialType) - return arg2.add(*this); -{ - _knumfloat tmp_num(arg2); - return tmp_num.add(*this); - } - _knumfloat * tmp_num = new _knumfloat(); - __gmpf_add(tmp_num->_mpf, _mpf, - dynamic_cast<_knumfloat const &>(arg2)._mpf); -} diff --git a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/pr45875.C b/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/pr45875.C deleted file mode 100644 index 34f02e300..000000000 --- a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/pr45875.C +++ /dev/null @@ -1,48 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-O3 -fno-early-inlining -fno-ipa-cp" } */ - -extern "C" void abort (void); - -class A -{ -public: - virtual int foo (int i); -}; - -class B -{ -public: - class A confusion; -}; - -int A::foo (int i) -{ - return i + 1; -} - -int __attribute__ ((noinline,noclone)) get_input(void) -{ - return 1; -} - -static int middleman_a (class A *obj, int i) -{ - return obj->foo (i); -} - -static int middleman_b (class B *obj, int i) -{ - return middleman_a (&obj->confusion, i); -} - - -int main (int argc, char *argv[]) -{ - class B b; - int i, j = get_input (); - - for (i = 0; i < j; i++) - if (middleman_b (&b, j) != 2) - abort (); - return 0; -} diff --git a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/pr46053.C b/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/pr46053.C deleted file mode 100644 index 7be6fc3a0..000000000 --- a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/pr46053.C +++ /dev/null @@ -1,41 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-O -fipa-cp -fno-early-inlining" } */ - -extern "C" void abort (); - -struct A -{ - virtual void foo () = 0; -}; - -struct B : A -{ - virtual void foo () = 0; -}; - -struct C : A -{ -}; - -struct D : C, B -{ - int i; - D () : i(0xaaaa) {} - virtual void foo () - { - if (i != 0xaaaa) - abort(); - } -}; - -static inline void bar (B &b) -{ - b.foo (); -} - -int main() -{ - D d; - bar (d); - return 0; -} diff --git a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/pr46287-1.C b/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/pr46287-1.C deleted file mode 100644 index 0755529bd..000000000 --- a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/pr46287-1.C +++ /dev/null @@ -1,67 +0,0 @@ -// Check that indirect calls to thunks do not lead to errors. -// { dg-do run } -// { dg-options "-O" } - -extern "C" void abort (); - -class A -{ -public: - virtual void foo () {abort();} -}; - -class B : public A -{ -public: - int z; - virtual void foo () {abort();} -}; - -class C : public A -{ -public: - void *a[32]; - unsigned long b; - long c[32]; - - virtual void foo () {abort();} -}; - -class D : public C, public B -{ -public: - D () : C(), B() - { - int i; - for (i = 0; i < 32; i++) - { - a[i] = (void *) 0; - c[i] = 0; - } - b = 0xaaaa; - } - - virtual void foo (); -}; - -inline void D::foo() -{ - if (b != 0xaaaa) - abort(); -} - -static inline void bar (B &b) -{ - - b.foo (); -} - -int main() -{ - int i; - D d; - - for (i = 0; i < 5000; i++) - bar (d); - return 0; -} diff --git a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/pr46287-2.C b/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/pr46287-2.C deleted file mode 100644 index 272852bad..000000000 --- a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/pr46287-2.C +++ /dev/null @@ -1,68 +0,0 @@ -// Check that indirect calls to thunks do not lead to errors. -// { dg-do run } -// { dg-options "-O -finline -finline-small-functions -finline-functions" } - - -extern "C" void abort (); - -class A -{ -public: - virtual void foo () {abort();} -}; - -class B : public A -{ -public: - int z; - virtual void foo () {abort();} -}; - -class C : public A -{ -public: - void *a[32]; - unsigned long b; - long c[32]; - - virtual void foo () {abort();} -}; - -class D : public C, public B -{ -public: - D () : C(), B() - { - int i; - for (i = 0; i < 32; i++) - { - a[i] = (void *) 0; - c[i] = 0; - } - b = 0xaaaa; - } - - virtual void foo (); -}; - -void D::foo() -{ - if (b != 0xaaaa) - abort(); -} - -static inline void bar (B &b) -{ - - b.foo (); -} - -int main() -{ - int i; - D d; - - for (i = 0; i < 5000; i++) - bar (d); - return 0; -} diff --git a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/pr46287-3.C b/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/pr46287-3.C deleted file mode 100644 index 5f291ce1f..000000000 --- a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/pr46287-3.C +++ /dev/null @@ -1,67 +0,0 @@ -// Check that indirect calls to thunks do not lead to errors. -// { dg-do run } -// { dg-options "-O -fipa-cp" } - -extern "C" void abort (); - -class A -{ -public: - virtual void foo () {abort();} -}; - -class B : public A -{ -public: - int z; - virtual void foo () {abort();} -}; - -class C : public A -{ -public: - void *a[32]; - unsigned long b; - long c[32]; - - virtual void foo () {abort();} -}; - -class D : public C, public B -{ -public: - D () : C(), B() - { - int i; - for (i = 0; i < 32; i++) - { - a[i] = (void *) 0; - c[i] = 0; - } - b = 0xaaaa; - } - - virtual void foo (); -}; - -void D::foo() -{ - if (b != 0xaaaa) - abort(); -} - -static void bar (B &b) -{ - - b.foo (); -} - -int main() -{ - int i; - D d; - - for (i = 0; i < 5000; i++) - bar (d); - return 0; -} diff --git a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/pr46984.C b/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/pr46984.C deleted file mode 100644 index 464ceb14a..000000000 --- a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/pr46984.C +++ /dev/null @@ -1,63 +0,0 @@ -// { dg-options "-O -fipa-cp -fno-early-inlining -flto" } -// { dg-do run } -// { dg-require-effective-target lto } - -extern "C" void abort (); - -class A -{ -public: - virtual void foo () {abort();} -}; - -class B : public A -{ -public: - int z; - virtual void foo () {abort();} -}; - -class C : public A -{ -public: - void *a[32]; - unsigned long b; - long c[32]; - - virtual void foo () {abort();} -}; - -class D : public C, public B -{ -public: - D () : C(), B() - { - int i; - for (i = 0; i < 32; i++) - { - a[i] = (void *) 0; - c[i] = 0; - } - b = 0xaaaa; - } - - virtual void foo (); -}; - -void D::foo() -{ - if (b != 0xaaaa) - abort(); -} - -static inline void bar (B &b) -{ - b.foo (); -} - -int main() -{ - D d; - bar (d); - return 0; -} diff --git a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/pr50605.C b/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/pr50605.C deleted file mode 100644 index 4910a37f8..000000000 --- a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/pr50605.C +++ /dev/null @@ -1,40 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-O3 -fno-early-inlining" } */ - -class A -{ -public: - int a; - void *stuff; -}; - -class B -{ -public: - int b; - void *other_stuff; - A array[50]; -}; - -extern B gb; - -int process_A (A *a) -{ - return a->a; -} - -int process_A_complex (A *a) -{ - return process_A (a+3); -} - -int process_B (B *b) -{ - return process_A_complex (&b->array[0]); -} - -int foo (void) -{ - return process_B (&gb); -} - diff --git a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/pr51759.C b/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/pr51759.C deleted file mode 100644 index 1acb7cf1f..000000000 --- a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/pr51759.C +++ /dev/null @@ -1,30 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-O2" } */ - -#if __SIZEOF_INT__ == 2 && __SIZEOF_LONG__ == 4 -#define unsigned unsigned long -#endif - -extern "C" void abort (void); -struct S -{ - void __attribute__((noinline)) set(unsigned val) - { - data = val; - if (data != val) - abort (); - } - int pad0; - unsigned pad1 : 8; - unsigned data : 24; - int pad2; -}; -int main() -{ - S s; - s.pad2 = -1; - s.set(0); - if (s.pad2 != -1) - abort (); -} - diff --git a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/pr51929.C b/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/pr51929.C deleted file mode 100644 index cfc3df212..000000000 --- a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/pr51929.C +++ /dev/null @@ -1,32 +0,0 @@ -// PR middle-end/51929 -// { dg-do compile } -// { dg-options "-O -fno-guess-branch-probability -fipa-cp -fipa-cp-clone --param=max-inline-insns-single=25" } - -struct A -{ - A (A, unsigned); - A (const char *); - ~A () { a1 (a4 ()); } - void a1 (int); - unsigned a2 (); - char *a3 (); - int a4 (); -}; - -template <typename T> -struct B -{ - A b; - B (A x, int y = 1) : b (x.a3 (), x.a2 ()) { if (y & 1) b.a2 (); } -}; - -extern template struct B <char>; -A a1 ("foo"), a2 ("bar"); -B<char> b1 (a1), b2 (a2, 8); - -void -foo () -{ - A a3 ("baz"); - B<char> b3 (a1), b4 (a3); -} diff --git a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/pr52939.C b/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/pr52939.C deleted file mode 100644 index e120827bd..000000000 --- a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/pr52939.C +++ /dev/null @@ -1,58 +0,0 @@ -/* Verify that we do not ICE on invalid devirtualizations (which might - be OK at run-time because never executed). */ -/* { dg-do run } */ -/* { dg-options "-O3 -fno-early-inlining -fno-inline" } */ - -extern "C" void abort (void); - -class A -{ -public: - int data; - virtual int foo (int i); -}; - -class B : public A -{ -public: - virtual int foo (int i); - virtual int bar (int i); -}; - -int A::foo (int i) -{ - return i + 1; -} - -int B::foo (int i) -{ - return i + 2; -} - -int B::bar (int i) -{ - return i + 3; -} - -static int middleman (class A *obj, int i) -{ - class B *b = (class B *) obj; - - if (i != 1) - return b->bar (i); - else - return i; -} - -int __attribute__ ((noinline,noclone)) get_input(void) -{ - return 1; -} - -int main (int argc, char *argv[]) -{ - class A o; - if (middleman (&o, get_input ()) != 1) - abort (); - return 0; -} diff --git a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/pr55264.C b/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/pr55264.C deleted file mode 100644 index cf54d6ae2..000000000 --- a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/pr55264.C +++ /dev/null @@ -1,17 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-O2 -fno-early-inlining -fno-weak" } */ - -struct S -{ - S(); - virtual inline void foo () - { - foo(); - } -}; - -void -B () -{ - S().foo (); -} diff --git a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/pr56310.C b/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/pr56310.C deleted file mode 100644 index af6979c8f..000000000 --- a/gcc-4.8.1/gcc/testsuite/g++.dg/ipa/pr56310.C +++ /dev/null @@ -1,36 +0,0 @@ -/* { dg-do compile } */ -/* { dg-options "-O -fipa-cp -std=gnu++0x -fno-early-inlining -fipa-cp-clone --param=ipa-cp-eval-threshold=1" } */ - -void bar (void *, void *); - -struct C -{ - constexpr C ():p (0) - { - } - void *get () - { - return p; - } - void *p; -}; - -struct B:C -{ -}; - -struct A -{ - void f (B * x, B * y) - { - bar (x->get (), y->get ()); - } -}; - -void -foo () -{ - A a; - B b; - a.f (&b, &b); -} |