plateform stringclasses 1
value | repo_name stringclasses 2
values | name stringlengths 1 78 | ext stringclasses 2
values | path stringlengths 15 1.11k | size int64 1 8.55M | source_encoding stringclasses 11
values | md5 stringlengths 32 32 | text stringlengths 0 8.49M |
|---|---|---|---|---|---|---|---|---|
google | android | pr43695 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/pr43695.C | 245 | utf_8 | 02f3704c0511b2d171c55dbf09c64325 | /* { 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);
}
|
google | android | devirt-10 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/devirt-10.C | 1,086 | utf_8 | 5bb0aafe90fddfc7156b7f61ae1e33a2 | /* { dg-do compile } */
/* { dg-options "-O3 -fdump-ipa-inline -fdump-ipa-cp -fno-early-inlining -fdevirtualize" } */
class wxPaintEvent { };
struct wxDCBase
{
wxDCBase ();
virtual int GetLayoutDirection() const{}
virtual void SetLayoutDirection(int){}
};
struct wxWindowDC : public wxDCBase {};
struct wxBuffer... |
google | android | pr61160-2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/pr61160-2.C | 656 | utf_8 | a4915f296a72bd543457d07dc50cfb77 | /* { dg-do run } */
/* { dg-options "-O3 --param ipa-cp-eval-threshold=1" } */
extern "C" void abort (void);
struct CBase {
virtual void BaseFunc () {}
};
struct MMixin {
virtual void * MixinFunc (int, void *) = 0;
};
struct CExample: CBase, public MMixin
{
int stuff, magic, more_stuff;
CExample ()
{
stu... |
google | android | devirt-24 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/devirt-24.C | 927 | utf_8 | 35ab14bb23df0ce7b775c4c3b95eb144 | /* { dg-do compile } */
/* { dg-options "-O3 -fno-ipa-sra -fdump-ipa-inline -fdump-ipa-cp --param=early-inlining-insns-comdat=0 -fdevirtualize" } */
void pad(void);
class A {};
class B {
public:
A &operator[](int);
};
class C : B {
public:
virtual int m_fn1() { return 0; }
inline A &operator[](int p1) {
int ... |
google | android | devirt-14 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/devirt-14.C | 637 | utf_8 | e77ba01d0b45af6e33ae2da5064f155e | /* No devirtualization happens here, but A::foo should not end up as reachable
because the constructor of A is unreachable and therefore the virtual
method table referring to A::foo is optimized out. */
/* { dg-do run } */
/* { dg-options "-O2 -fdump-tree-ssa -fdevirtualize" } */
class B {
public:
virtual int... |
google | android | pr63838 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/pr63838.C | 904 | utf_8 | aaf96a63c712e53d654620b1478b7cc8 | // PR ipa/63838
// { dg-do run }
// { dg-options "-O2 -fdump-ipa-pure-const" }
// { dg-final { scan-ipa-dump-not "Function found to be nothrow: void foo" "pure-const" } }
// { dg-final { scan-ipa-dump-not "Function found to be nothrow: void bar" "pure-const" } }
// { dg-final { cleanup-ipa-dump "pure-const" } }
__attr... |
google | android | devirt-22 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/devirt-22.C | 919 | utf_8 | 0cb7695408bb3f6e9b1847cda6e9ea75 | /* { dg-do compile } */
/* { dg-options "-O3 -fno-early-inlining -fno-ipa-sra -fdump-ipa-cp -fdevirtualize" } */
class A {};
class B {
public:
A &operator[](int);
};
class C : B {
public:
virtual int m_fn1() { return 0; }
A &operator[](int p1) {
int a;
a = m_fn1();
static_cast<void>(__builtin_expect(... |
google | android | 20090113-1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/20090113-1.C | 224 | utf_8 | 181d03bf17027cab97eb47736f11ff30 | /* { 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();
}
|
google | android | pr59176 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/pr59176.C | 587 | utf_8 | bd532642c33364f27cc5cdac3622c29b | /* { dg-do compile } */
/* { dg-options "-O3" } */
template <class> class A {
protected:
void m_fn2();
~A() { m_fn2(); }
virtual void m_fn1();
};
class D : A<int> {};
template <class Key> void A<Key>::m_fn2() {
m_fn1();
m_fn1();
m_fn1();
}
#pragma interface
class B {
D m_cellsAlreadyProcessed;
D m_ce... |
google | android | pr58371 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/pr58371.C | 4,996 | utf_8 | f287dc072a94999cab21c3790a8c651f | /* { dg-do compile } */
/* { dg-options "-O2" } */
typedef int size_t;
namespace {
template < typename > struct char_traits;
}
namespace __gnu_cxx {
template < typename > class new_allocator {
};
}
namespace std {
template < typename _Tp > class allocator:__gnu_cxx::new_allocator < _Tp > {
public:
size_t size_type;... |
google | android | type-inheritance-1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/type-inheritance-1.C | 566 | utf_8 | 6c1d87d994c4a006dec8c5b60ac7529d | /* Verify that callgraph construction keeps FOO for possible devirtualization
and removes BAR. */
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-ipa-visibility -fdevirtualize" } */
extern "C" void abort (void);
class A
{
public:
virtual int foo (void)
{
return 4;
}
virtual int bar (void)
... |
google | android | iinline-2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/iinline-2.C | 1,127 | utf_8 | e237de4e932633797dc4c7de8f8cd59b | /* 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:
... |
google | android | pr44372 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/pr44372.C | 561 | utf_8 | e4f8dcc7620cbae1961d6880134b1dd5 | /* { 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 (s... |
google | android | pr61654 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/pr61654.C | 458 | utf_8 | 438118cbb7d30bffc810662fe5da5b9c | /* { dg-do compile } */
/* { dg-options "-O3" } */
/* The bug only presented itself on a 32 bit i386 but in theory it might also
pop up elsewhere and we do not want to put -m32 options to testcase
options. */
struct A
{
virtual int a (int, int = 0) = 0;
void b ();
void c ();
int d;
};
struct B : virtu... |
google | android | devirt-d-1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/devirt-d-1.C | 910 | utf_8 | ab2d95d8655efb942d8cba212f95cdf3 | /* 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 -fdevirtualize" } */
extern "C" void abort (void);
class A
{
public:
int data;
~A();
virtual int foo (int i);
};
... |
google | android | pr45572-2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/pr45572-2.C | 1,083 | utf_8 | 0d4cd7a0dcc526799f7b4db021c2f68d | // { 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
{
... |
google | android | pr64068 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/pr64068.C | 888 | utf_8 | 04f8a0459bce64c0fd523bb0de9c9d28 | /* { dg-do compile } */
/* { dg-options "-O2" } */
typedef int PROV_ENUMALGS_EX, PCCRYPT_OID_INFO;
class A {
int m_fn2();
virtual bool m_fn1(PCCRYPT_OID_INFO);
};
int fn1();
void fn2();
int A::m_fn2() { m_fn1(0); }
bool fn3() {
for (;;) {
if (fn1()) {
if (fn1() != 259)
fn2();
break;
... |
google | android | pr60640-4 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/pr60640-4.C | 1,324 | utf_8 | 78d1f8dc1413f84ca172a240b6f7a921 | // { dg-do run }
// { dg-options "-O3 -fdump-ipa-cp -fdevirtualize" }
struct Distraction
{
char fc[8];
virtual Distraction * return_self ()
{ return this; }
};
namespace {
struct A;
static A * __attribute__ ((noinline, noclone)) get_an_A ();
static int go;
struct A
{
int fi;
A () : fi(777) {}
A (int p... |
google | android | devirt-28a | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/devirt-28a.C | 256 | utf_8 | a24a2e20ac0117edc4e2c9889e856e1d | // PR c++/58678
// { dg-options "-O3 -flto -shared -fPIC -Wl,--no-undefined" }
// { dg-do link { target { { gld && fpic } && shared } } }
struct A {
virtual ~A();
};
struct B : A {
virtual int m_fn1();
};
void fn1(B* b) {
delete b;
}
int main() {}
|
google | android | pr63306 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/pr63306.C | 186 | utf_8 | e24fb768f0a9cba7dfd73632a0e86880 | // PR c++/63306
// { dg-do compile { target c++11 } }
template <typename...>
class A;
class B
{
B (const int &, const A<int, int> &);
};
B::B (const int &, const A<int, int> &)
{
}
|
google | android | ivinline-2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/ivinline-2.C | 998 | utf_8 | 52f14e9aa01f583550757164fd7846a2 | /* 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 -fdevirtualize" } */
extern "C" void abort (void);
class A
{
public:
int data;
virtual int foo (int ... |
google | android | devirt-c-8 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/devirt-c-8.C | 1,339 | utf_8 | e5cfd1bea999c67e3e12e640f043bc70 | /* 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 -fdevirtualize" } */
extern "C" void abort (void);
class A
{
public:
int data;
... |
google | android | pr55264 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/pr55264.C | 181 | utf_8 | 31b6d18c1858b5f5148de832f3fb7915 | /* { dg-do compile } */
/* { dg-options "-O2 -fno-early-inlining -fno-weak" } */
struct S
{
S();
virtual inline void foo ()
{
foo();
}
};
void
B ()
{
S().foo ();
}
|
google | android | pr51929 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/pr51929.C | 559 | utf_8 | 20fcc05340e0948ba3a032b0f5f2bbe9 | // 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>
... |
google | android | devirt-27 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/devirt-27.C | 523 | utf_8 | 85a1dd8c7e9ca4bc3ddf0341bbc96b7c | /* { dg-do compile } */
/* { dg-options "-O3 -fdump-tree-optimized -fdevirtualize" } */
struct A
{
int a;
};
struct B
{
__attribute__ ((visibility("default")))
virtual int foo(void) {return 42;}
int b;
};
struct C: A,B
{
__attribute__ ((visibility("hidden")))
virtual int foo(void);
};
struct C c... |
google | android | pr46287-3 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/pr46287-3.C | 758 | utf_8 | e8c7134cc40956db0ba67738dbd45120 | // 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];
unsig... |
google | android | pr61540 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/pr61540.C | 513 | utf_8 | daceb1b2f3cf167fb6e78fc2d34f2778 | /* { dg-do compile } */
/* { dg-options "-O3 -fno-early-inlining" } */
struct data {
data(int) {}
};
struct top {
virtual int topf() {}
};
struct intermediate: top {
int topf() /* override */ { return 0; }
};
struct child1: top {
void childf()
{
data d(topf());
}
};
struct child2: intermedia... |
google | android | inline-2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/inline-2.C | 759 | utf_8 | 3ebd4112b48f7779048611a458e5a4b4 | /* { 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_... |
google | android | pr45565 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/pr45565.C | 533 | utf_8 | 34f01b9fc4157e35aef42fe4303714df | // { 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)
... |
google | android | devirt-c-7 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/devirt-c-7.C | 1,271 | utf_8 | 826d472f2265b66695a525e5351a728b | /* 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 -fdevirtualize" } */
extern "C" void abort (void);
namespace std {
... |
google | android | ivinline-3 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/ivinline-3.C | 1,012 | utf_8 | d38a1358079733305edc6314cd4d299c | /* 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 -fdevirtualize" } */
extern "C" void abort (void);
class A
{
public:
int data;
virtual int foo (in... |
google | android | devirt-13 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/devirt-13.C | 400 | utf_8 | de4621881ac488abc5e8c35b607a7a5a | /* { dg-do run } */
/* Call to foo should be devirtualized because there are no derived types of A. */
/* { dg-options "-O2 -fdump-tree-ssa -fdevirtualize" } */
namespace {
class A {
public:
virtual int foo(void)
{
return 0;
}
};
}
class A a, *b=&a;
main()
{
return b->foo();
}
/* { dg-final { scan-tree-dump-ti... |
google | android | pr46053 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/pr46053.C | 422 | utf_8 | 3b13da9b176812433b85dc81c337079d | /* { 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()... |
google | android | devirt-12 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/devirt-12.C | 385 | utf_8 | 1d3432d50a23eb1aabdd6d2dbc27647e | // { dg-do compile { target c++11 } }
// { dg-options "-O -fdump-ipa-inline -fdevirtualize" }
class Foo
{
public:
void Bar() const
{
__builtin_puts ("Howdy!");
}
};
int main()
{
Foo x;
auto y = &Foo::Bar;
(x.*y)();
return 0;
}
// { dg-final { scan-ipa-dump "Inlined 1 calls, eliminated 1 funct... |
google | android | devirt-29 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/devirt-29.C | 1,297 | utf_8 | 7e93f3bbb4e40f1da964f258277c51bb | /* { dg-do run { target c++11 } } */
/* There is a devirtualizable call. In PR60306 we deduced wrong target to cxa_pure_virtual.
For gcc 4.10 we temporarily disable the devirtualization. */
/* { dg-options "-O3 -fdevirtualize" } */
#include <vector>
using std::vector;
class Object
{
public:
virtual Object* ... |
google | android | iinline-1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/iinline-1.C | 960 | utf_8 | d190270f1bd1bec019768c3db19b8de2 | /* 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:
... |
google | android | devirt-20 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/devirt-20.C | 831 | utf_8 | 186228353a824ad53913f0f51bb9bc13 | #include <stdlib.h>
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-release_ssa -fdevirtualize" } */
namespace {
struct A
{ int a; virtual int foo() {return a;} void bar() {a=7;} };
struct B
{ int b; virtual int foo2() {return b;} void bar2() {b=9;} };
struct C : public virtual A, public virtual B { };
struct... |
google | android | devirt-c-3 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/devirt-c-3.C | 1,074 | utf_8 | 46bd1eabfabfc0b4843e9f6b2520f361 | /* 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 -fdevirtualize" } */
extern "C" void abort (void);
class Distraction
{
public:
float f;
double d;
Distraction ()
{
f = 8.3;
... |
google | android | pr61160-3 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/pr61160-3.C | 511 | utf_8 | a4862cb5f3f58316adc6e36c7d8eb036 | /* { dg-do run } */
/* { dg-options "-O3" } */
struct A {
void *p;
A (void *q) : p (q) {}
A (const A &) : p () {}
};
struct CBase {
virtual void BaseFunc () {}
};
struct MMixin {
virtual A MixinFunc (int, A) = 0;
};
struct CExample: CBase, public MMixin
{
A MixinFunc (int arg, A arg2)
{
if (arg != 1 ... |
google | android | devirt-30 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/devirt-30.C | 498 | utf_8 | 3258cdedb61780b30e6cdabe094f90a6 | // PR c++/58678
// { dg-options "-O3 -fdump-ipa-devirt -fdevirtualize" }
// We shouldn't speculatively devirtualize to ~B because B is an abstract
// class; any actual object passed to f will be of some derived class which
// has its own destructor.
struct A
{
virtual void f() = 0;
virtual ~A();
};
struct B : A
... |
google | android | pr57670 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/pr57670.C | 521 | utf_8 | dee7ba2e84e87c8e1991a1d3b02db130 | /* { dg-do run } */
/* { dg-options "-O3 -fno-early-inlining" } */
class H
{
public:
virtual unsigned bar() const { return 16; }
};
class A : public H
{
unsigned foo(unsigned (H::*func)(void) const) const;
public:
H *h;
virtual unsigned bar() const;
};
unsigned A::foo(unsigned (H::*func)(void) const) const
{... |
google | android | inline-3 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/inline-3.C | 650 | utf_8 | c4df4f3b1cdf853c3301e7075c3bb5df | /* { 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... |
google | android | imm-devirt-2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/imm-devirt-2.C | 1,437 | utf_8 | f18adf01e21717c04d740e4775db1f8b | /* Verify that virtual calls are folded even early inlining puts them into one
function with the definition. */
/* { dg-do run } */
/* { dg-options "-O2 -fdump-tree-fre1-details -fdevirtualize" } */
extern "C" void abort (void);
class Distraction
{
public:
float f;
double d;
Distraction ()
{
f = 8.3;... |
google | android | devirt-c-5 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/devirt-c-5.C | 949 | utf_8 | c59abb4392f955a251dc74867571ba27 | /* 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 -fdevirtualize" } */
extern "C" void abort (void);
class B;
class A
{
public:
int data;
A();
A(B *b);
virtual ... |
google | android | devirt-26 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/devirt-26.C | 712 | utf_8 | 2562f3a1ced8b5672db441de51764eef | /* { dg-do compile } */
/* { dg-options "-O3 -fdump-ipa-devirt -fdevirtualize" } */
struct A
{
int a;
virtual int bar(void) {return a;}
};
struct B
{
virtual int foo(void) {return b;}
int b;
};
struct C: A,B
{
virtual int foo(void) {return a;}
};
struct C c;
int test(void)
{
struct C *d=&c;
s... |
google | android | devirt-31 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/devirt-31.C | 557 | utf_8 | cf4376ec8426bc3947c3a293de2669a4 | /* { dg-options "-O2 -std=c++11 -fdump-ipa-inline -fdevirtualize" } */
#include <new>
class EmbeddedObject {
public:
virtual int val() { return 2; }
};
class Container {
alignas(EmbeddedObject) char buffer[sizeof(EmbeddedObject)];
public:
EmbeddedObject *obj() { return (EmbeddedObject*)buffer; }
Container() ... |
google | android | devirt-9 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/devirt-9.C | 693 | utf_8 | de10738b90364a5e3bdb78a0504e6857 | /* { dg-do compile } */
/* { dg-options "-O2 -fdump-ipa-whole-program --param=early-inlining-insns-comdat=0 -fdevirtualize" } */
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.b... |
google | android | pr46287-2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/pr46287-2.C | 810 | utf_8 | 65aea08882bab12228acc06c61c33a2b | // 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 ... |
google | android | devirt-18 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/devirt-18.C | 677 | utf_8 | 8622d698bf3b71625b68b86b0c491835 | /* We shall devirtualize to unreachable. No anonymous type method should surivve
reachability. */
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-ssa -fdevirtualize" } */
namespace {
class B {
public:
virtual int foo(void)
{
return 0;
}
};
class A : public B {
public:
virtual int foo(void)
{
retu... |
google | android | pr52939 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/pr52939.C | 830 | utf_8 | 5645876c592391b1a221e2bbadde0436 | /* 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
{
publi... |
google | android | devirt-c-1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/devirt-c-1.C | 1,214 | utf_8 | 7ea8d2f708413bc770d85dfcf09ae3f8 | /* 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 -fdevirtualize" } */
extern "C" void abort (void);
class A
{
public:
int data;
... |
google | android | ivinline-4 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/ivinline-4.C | 1,150 | utf_8 | 35d233a4dfa9caf2850672b96a62ba01 | /* 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 -fdevirtualize" } */
extern "C" void abort (void);
class A... |
google | android | devirt-16 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/devirt-16.C | 800 | utf_8 | bbaccf166b9f7199e9ea5bd4d8281bfd | /* We shall devirtualize to unreachable. No anonymous type method should surivve
reachability. */
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-ipa-whole-program -fdevirtualize" } */
namespace {
class B {
public:
virtual int foo(void)
{
return 0;
}
};
class A : public B {
public:
virtual int foo(void)... |
google | android | devirt-28 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/devirt-28.C | 391 | utf_8 | ef85dbae64fb6642b36c78553f4b3106 | // PR c++/58678
// { dg-options "-O3 -fdump-ipa-devirt -fdevirtualize" }
struct A {
virtual ~A();
};
struct B : A {
virtual int m_fn1();
};
void fn1(B* b) {
delete b;
}
// { dg-final { scan-assembler-not "_ZN1AD2Ev" } }
// { dg-final { scan-assembler-not "_ZN1BD0Ev" } }
// { dg-final { scan-ipa-dump "Target is ... |
google | android | pr60600 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/pr60600.C | 599 | utf_8 | d0758cedfcf8b540fb038c8ff65f5fe0 | /* { dg-do compile } */
/* { dg-options "-O3 -fdump-ipa-cp -fdevirtualize" } */
struct data {
data(int);
};
struct top {
virtual int topf();
};
struct intermediate: top {
int topf() /* override */ { return 0; }
};
struct child1: top {
__attribute__((noinline)) void childf()
{
data d(topf... |
google | android | pr46984 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/pr46984.C | 726 | utf_8 | 0a828f86c08497837f067c382a901c9f | // { 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];
un... |
google | android | ivinline-9 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/ivinline-9.C | 1,584 | utf_8 | 9e9e91c7ec5b5e0f52ce4f3238325850 | /* 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-inl... |
google | android | pr60457 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/pr60457.C | 143 | utf_8 | 19fe8d73bee48bb2e91c928907e2a11c | // PR ipa/60457
// { dg-do compile }
template <class T>
struct A
{
};
struct B : A <B>
{
B ();
};
B::B ()
{
const int c[] = { 1, 1 };
}
|
google | android | devirt-19 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/devirt-19.C | 764 | utf_8 | f5656de9eabc6c9997993be31d861424 | /* We should specialize for &b and devirtualize the call.
Previously we were failing by considering CLOBBER statement to be
a type change. */
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-ipa-cp -fdevirtualize" } */
struct A {
void operator==(const A &);
};
class B {
public:
A m_fn1();
A m_fn2();
};... |
google | android | pr59355 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/pr59355.C | 165 | utf_8 | 16e01d7c14ca47634024cefe29fb2085 | // PR tree-optimization/59355
// { dg-do compile }
// { dg-options "-O2 -fno-devirtualize" }
struct S
{
virtual void bar ();
};
void
foo (S *s)
{
s->bar ();
}
|
google | android | devirt-23 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/devirt-23.C | 1,072 | utf_8 | a2efda558bd84b9e92a6234f061d6de6 | /* { dg-do run } */
/* { dg-options "-O3 -fno-partial-inlining -fdump-ipa-cp -fno-devirtualize-speculatively -fdevirtualize" } */
/* Main purpose is to verify that we do not produce wrong devirtualization to
C::m_fn1. We currently devirtualize to B::m_fn1, so check that. */
#include <stdlib.h>
class A {
public:
... |
google | android | devirt-g-1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/devirt-g-1.C | 704 | utf_8 | 97043c88ca3fce55d807667d686d903e | // { dg-do compile }
// { dg-options "-O2 -fdump-ipa-cp -fdump-tree-optimized -fdevirtualize" }
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(); }
... |
google | android | pr56310 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/pr56310.C | 408 | utf_8 | 7c5981c91101d5d0b6e2a89e61d7a675 | /* { dg-do compile { target c++11 } } */
/* { dg-options "-O -fipa-cp -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)
... |
google | android | devirt-c-6 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/devirt-c-6.C | 955 | utf_8 | 16bcf8e8c2852c273d965ed951f6eb79 | /* 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 -fdevirtualize" } */
extern "C" void abort (void);
class A
{
public:
int data;
A();
virtual int foo (int i);
};
class B : public A
{... |
google | android | pr46287-1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/pr46287-1.C | 763 | utf_8 | 177b805c9038f9f21dc4bd1516592ade | // 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 ... |
google | android | devirt-7 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/devirt-7.C | 1,347 | utf_8 | 2c5fa541a3398db17ee9fca2d0d11d8d | /* 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 -fdevirtualize" } */
extern "C" void abort (void);
class Distraction
{
public:
float f;
double d;
Distraction (... |
google | android | devirt-1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/devirt-1.C | 1,075 | utf_8 | acb3083f56b7e482090e0ab4bf56b5b1 | /* 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 -fdevirtualize" } */
extern "C" void abort (void);
class A
{
public:
int data;
virtual int foo (int i);
};
class B : publi... |
google | android | pr50605 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/pr50605.C | 415 | utf_8 | b6207250e81c199b2860b99758c7c707 | /* { 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)... |
google | android | pr45572-1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/pr45572-1.C | 1,629 | utf_8 | fbe7a722c61f265b03ff0a5ed5ada369 | // { 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 ... |
google | android | remref-2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/remref-2.C | 582 | utf_8 | d26e3f0899c708e0f4b2ec8427502236 | /* Verify that we survive creation and deletion of references to facilitate
reference removal while also doing (unsuccessful) speculative
devirtualization. */
/* { dg-do link } */
/* { dg-options "-O3 -fno-early-inlining" } */
class A
{
public:
virtual void __attribute__ ((noinline)) foo(void (*)(void));
}... |
google | android | iinline-3 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/iinline-3.C | 1,057 | utf_8 | ed2ebadecdee89ff7f0834345b5ae2e8 | /* 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 cha... |
google | android | devirt-39 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/devirt-39.C | 382 | utf_8 | 509e57ebb95a707c09185568d2e59332 | // PR c++/61214
/* { dg-options "-O2 -fdump-tree-optimized -fdevirtualize" } */
struct Base
{
virtual ~Base();
virtual Base* clone() {
return 0;
}
};
struct Foo : Base
{
virtual ~Foo();
virtual Base* clone() {
return new Foo();
}
};
int main()
{
Base* f = new Foo();
f->clone();
return 0;
}... |
google | android | ivinline-8 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/ivinline-8.C | 1,286 | utf_8 | 616106ebfd03781a2e402ccf9afb721f | /* 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 -fdevirtualize" } */
extern "C" void abort (void);
class A
{
public:
int data;
... |
google | android | devirt-15 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/devirt-15.C | 766 | utf_8 | 0a82087f14f2d8c31205c337bb01333d | /* Check that we speculatively devirutalize call to FOO to B::foo becuase
A is noreturn. */
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-ipa-devirt -fdump-tree-optimized -fdevirtualize" } */
class A {
public:
virtual int foo(void)
{
throw (1);
return 0;
}
};
class B : public A {
publ... |
google | android | devirt-17 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/devirt-17.C | 879 | utf_8 | a5b844388b0aedc19681ecc10c061b59 | /* We shall devirtualize to B::foo since it is the only live candidate of an
anonymous type. */
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-ipa-whole-program -fdevirtualize" } */
namespace {
class B {
public:
virtual int foo(void)
{
return 0;
}
};
class A : public B {
public:
virtual int foo(void)
{
... |
google | android | remref-1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/remref-1.C | 511 | utf_8 | 65b30ac9d2b3a2244e49849aaad7dd78 | /* Verify that indirect-inlining induced removal of referenes will not remove
too many references in presence of speculative devirtualization. */
/* { dg-do link } */
/* { dg-options "-O3 -fno-early-inlining" } */
class A
{
public:
virtual void foo(void (*)(void));
};
static
void b(void)
{
}
void
A::foo(voi... |
google | android | devirt-21 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/devirt-21.C | 924 | utf_8 | 7f6a519b191b0301f0797e7ceb95df41 | /* { dg-do run } */
/* { dg-options "-O3 -fno-early-inlining -fno-ipa-sra -fdump-ipa-cp -fdevirtualize" } */
/* Main purpose is to verify that we do not produce wrong devirtualization to
C::m_fn1. We currently devirtualize to B::m_fn1, so check that. */
#include <stdlib.h>
class A {
public:
unsigned length;
};
c... |
google | android | devirt-11 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/devirt-11.C | 1,074 | utf_8 | b7466a6cb6ae69ea23acdf89ad0783fb | /* { dg-do compile } */
/* { dg-options "-O2 -fdump-ipa-inline --param=early-inlining-insns-comdat=0 -fno-devirtualize-speculatively -fdevirtualize" } */
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 (); ... |
google | android | devirt-5 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/devirt-5.C | 1,408 | utf_8 | 80fb8d75edf40afcb73b96477ba0594d | /* 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 -fde... |
google | android | pr61160-1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/pr61160-1.C | 447 | utf_8 | c906d5398c947bb6aef6e77537c9be6c | /* { dg-do compile } */
/* { dg-options "-O3" } */
struct CBase {
virtual void BaseFunc () {}
};
struct MMixin {
virtual void * MixinFunc (int, void *) = 0;
};
struct CExample: CBase, public MMixin
{
void *MixinFunc (int arg, void *arg2)
{
if (arg != 1 || arg2)
return 0;
return this;
}
};
void ... |
google | android | devirt-4 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/devirt-4.C | 1,212 | utf_8 | 783787cf4afb812083583deb4e0eecb7 | /* 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 -fdevirtualize" } */
extern "C" void abort (void);
class A
{
public:
int ... |
google | android | pr60419 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/pr60419.C | 628 | utf_8 | cc7882632634230561bec7316fae94c5 | // PR middle-end/60419
// { dg-do compile }
// { dg-options "-O2" }
struct C
{
};
struct I : C
{
I ();
};
struct J
{
void foo ();
J ();
virtual void foo (int &, int);
};
template <class>
struct D
{
virtual void foo (I &) const;
void bar ()
{
I p;
foo (p);
}
};
struct K : J, public D<int>
{
... |
google | android | devirt-40 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/devirt-40.C | 299 | utf_8 | 4cae373a87c9c4aaea0f0bb2445cece6 | // PR c++/62224
// { dg-options "-O2" }
// For 4.9, we don't want to devirtualize f and thus create a reference to g.
struct A
{
virtual void f () = 0;
};
class B : A
{
virtual void f () { g(); }
void g();
};
void h (A *a)
{
a->f ();
}
// { dg-final { scan-assembler-not "_ZN1B1gEv" } }
|
google | android | devirt-25 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/devirt-25.C | 561 | utf_8 | 43d01f56062d3b578d77b9503212fe82 | /* { dg-do compile } */
/* { dg-options "-O3 -fdump-ipa-cp -fdevirtualize" } */
class ert_RefCounter {
protected:
int refCounterE;
virtual ~ert_RefCounter() {}
};
class ebs_Object : virtual public ert_RefCounter {
};
class dpr_App : public ebs_Object {
public:
virtual void run();
};
class dpr_Job : public ... |
google | android | imm-devirt-1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/imm-devirt-1.C | 1,054 | utf_8 | d6b8c071531cf583fba7ff697d14ecda | /* Verify that virtual calls are folded even early inlining puts them into one
function with the definition. */
/* { dg-do run } */
/* { dg-options "-O2 -fdump-tree-fre1-details -fdevirtualize" } */
extern "C" void abort (void);
class A
{
public:
int data;
virtual int foo (int i);
};
class B : public A
{
p... |
google | android | devirt-3 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/devirt-3.C | 1,199 | utf_8 | a6f7eb1e4ac21778afe91d9c12848c6c | /* 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 -fdevirtualize" } */
extern "C" void abort (void);
class A
{
public:
int data;
virtual float distr... |
google | android | devirt-6 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/devirt-6.C | 717 | utf_8 | 12016e2e8654bd03ecef134876a9acb6 | /* 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 -fdevirtualize" } */
extern "C" void abort (void);
extern "C" void *malloc(__SIZE_TYPE__);
inline void* operator new(__SIZE_TYPE__, void* ... |
google | android | pr60640-2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/pr60640-2.C | 353 | utf_8 | b4277c2887fdb910bdca2a8dbf0de117 | // { dg-do compile }
// { dg-options "-O3" }
struct B { virtual unsigned f () const; };
struct C { virtual void f (); };
struct F { virtual unsigned f (bool) const; ~F (); };
struct J : C, F {};
struct G : J { unsigned f (bool) const { return 0; } };
struct H : B
{
H (int);
unsigned f () const { return ((const F &... |
google | android | pr60640-3 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/pr60640-3.C | 1,204 | utf_8 | 2b5d243c5137f370d06b3628cfde2864 | // { dg-do run }
// { dg-options "-O3" }
struct Distraction
{
char fc[8];
virtual Distraction * return_self ()
{ return this; }
};
namespace {
struct A;
static A * __attribute__ ((noinline, noclone)) get_an_A ();
static int go;
struct A
{
int fi;
A () : fi(777) {}
A (int pi) : fi (pi) {}
virtual A *... |
google | android | devirt-c-4 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/devirt-c-4.C | 1,407 | utf_8 | 4e9a5b0d5375e0b9a5f39ab754cd006c | /* 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 -fdevirtualize" } */
extern "C" void abort (void);
class Distraction
{
public:
float f;
double d;
Distraction ()
{
f = 8.3;
... |
google | android | pr43812 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/pr43812.C | 860 | utf_8 | 8f31add58ec72eb54693c3a9f4769173 | /* { 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 (-... |
google | android | inline-1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/inline-1.C | 768 | utf_8 | b3482572a54b0e05e99d38005f73065b | /* { 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);
}
voi... |
google | android | ivinline-1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/ivinline-1.C | 992 | utf_8 | 94203f217784f6260cdb57c0976de727 | /* 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 -fdevirtualize" } */
extern "C" void abort (void);
class A
{
public:
int data;
virtual int foo (int i);
};
class B : pu... |
google | android | pr45875 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/pr45875.C | 654 | utf_8 | 308bcf23bb271af4ffddb96f07a09beb | /* { 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;
}
... |
google | android | devirt-c-2 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/devirt-c-2.C | 1,333 | utf_8 | bb0f6e8bd99688a8f936688881a960a3 | /* 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 -fdevirtualize" } */
extern "C" void abort (void);
class Distraction
{
public:
fl... |
google | android | pr60640-1 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/pr60640-1.C | 729 | utf_8 | 190bb52be2caa70fd51cc2a735d45f1e | // { dg-do compile }
// { dg-options "-O3" }
class ASN1Object
{
public:
virtual ~ASN1Object ();
};
class A
{
virtual unsigned m_fn1 () const;
};
class B
{
public:
ASN1Object Element;
virtual unsigned m_fn1 (bool) const;
};
template <class BASE> class C : public BASE
{
};
class D : ASN1Object, public B
{
};
cl... |
google | android | pr61085 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/pr61085.C | 366 | utf_8 | 231677eaca7afc4bb98a3094c618e3f3 | /* { dg-do run } */
/* { dg-options "-O2 -fno-early-inlining" } */
struct A {};
struct B : virtual A {
unsigned m_i;
B() : m_i () {}
virtual A *m_virt ()
{
return 0;
}
~B ()
{
m_foo ();
while (m_i)
;
}
void m_foo ()
{
m_virt ();
}
};
class C : B {
A *m_virt () {
__bui... |
google | android | ivinline-7 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/ivinline-7.C | 1,453 | utf_8 | 036e5d48f737c5a33f4c55414fdecdef | /* 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... |
google | android | ivinline-5 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/ivinline-5.C | 1,079 | utf_8 | 86d74ea2a4dbce3589bf4703b0229df0 | /* 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 -fdevirtualize" } */
extern "C" void abort (void);
class A
{
public:
int data;
... |
google | android | pr51759 | .C | toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ipa/pr51759.C | 453 | utf_8 | 6b5972a83c02d489c1aab917516a43a3 | /* { 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;
unsigne... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.