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 | chromium | pr27291 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr27291.C | 8,740 | utf_8 | b70fdde5abd17c5811c3303beb4c4a27 | /* { dg-do compile } */
/* { dg-options "-O2" } */
namespace std
{
template < class _T1, class _T2 > struct pair
{
};
}
extern "C"
{
extern "C"
{
typedef int int32_t __attribute__ ((__mode__ (__SI__)));
struct _pthread_fastlock
{
}
pthread_mutexattr_t;
}
}
namespace std
{
struct __num... |
google | chromium | pr31146 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr31146.C | 365 | utf_8 | f45a266299d65393b311b6763aae7ab7 | /* { dg-do compile } */
/* { dg-options "-O -fdump-tree-forwprop" } */
/* We should be able to optimize this to i[j] = 1 during
early optimizations. */
int i[5];
void foo (int j)
{
void *p = &i[j];
int *q = (int *)p;
*q = 1;
}
/* { dg-final { scan-tree-dump "i\\\[j.*\\\] =.* 1;" "forwprop1" } } */
/* { dg-... |
google | chromium | pr31146-2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr31146-2.C | 392 | utf_8 | ee86dfeab34434a360bcab30db46fa8a | /* { dg-do compile } */
/* { dg-options "-O -fdump-tree-forwprop1" } */
#include <new>
template <class T>
struct Vec
{
Vec()
{
for (int i=0; i<3; ++i)
new (&a[i]) T(0);
}
T a[3];
};
double foo (void)
{
Vec<double> v;
return v.a[2];
}
/* { dg-final { scan-tree-dump "Replaced .* != 0B. with .1" ... |
google | chromium | pr20280 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr20280.C | 1,501 | utf_8 | a9d7f4347bccd1e6029d7c844680a5b4 | // PR c++/20280
// { dg-do compile }
// Gimplification of the COND_EXPR used to fail because it had an
// addressable type, and create_tmp_var rejected that.
struct A
{
~A();
};
struct B : A {};
A& foo();
void bar(bool b)
{
(B&) (b ? foo() : foo());
}
// Make sure bit-fields and addressable types don't cause cr... |
google | chromium | pr28238 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr28238.C | 360 | utf_8 | 8aea640c13c12833067fe21f2796f0ab | /* { dg-do compile } */
/* { dg-options "-O" } */
struct iterator{};
struct ByteIterator : iterator
{
ByteIterator (){}
int a[1024];
};
inline ByteIterator f ()
{
return ByteIterator ();
}
class ConfLexerCore
{
ConfLexerCore ();
ByteIterator m_matchStart;
};
ConfLexerCore::Conf... |
google | chromium | sra-1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/sra-1.C | 578 | utf_8 | 4b409387c124f6c52a3b106d015e09fa | /* https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=223576 */
/* SRA failed to canonicalize bit-field types, introducing type
mismatches. */
/* { dg-do compile } */
/* { dg-options "-O2" } */
struct A
{
int a:16;
/* These dummy bit-fields are here to prevent GCC 4.2+ from merging
the bit-field compa... |
google | chromium | pr24351-3 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr24351-3.C | 5,388 | utf_8 | 374559cef47a384e5add68ead511bef5 | /* { dg-do compile } */
/* { dg-options "-O2" } */
namespace sigc {
template <class T_type> struct type_trait {
typedef T_type& pass;
typedef const T_type& take;
typedef T_type* pointer;
};
template <class T_type> struct type_trait<T_type&> {
typedef T_type& pass;
};
... |
google | chromium | pr26757 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr26757.C | 367 | utf_8 | f08282d681d172ebc2a1c9dc4cc201ec | // PR c++/26757
// { dg-do run }
// { dg-options "-O" }
extern "C" void abort ();
typedef struct A
{
int c;
int d;
} A;
A *b;
void
foo ()
{
b->c++;
extern A *b;
b->d++;
}
void
bar ()
{
if (b->d)
b->c++;
}
int
main ()
{
A a = { 0, 0 };
b = &a;
foo ();
bar ();
if (b->c != 2)
abort ()... |
google | chromium | pr41905 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr41905.C | 116 | utf_8 | 9fa7c9a1677573428aaa46e9bd0f12e7 | /* { dg-do compile } */
/* { dg-options "-O2" } */
int foo() __attribute__((noreturn));
int bar() { return foo(); }
|
google | chromium | pr37393 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr37393.C | 409 | utf_8 | 33497c20b479b289e6e9a28d4cb6ed0f | // PR middle-end/37393
// { dg-do compile }
// { dg-options "-O2" }
struct A
{
~A ();
bool foo () const;
};
extern "C"
{
extern void bar (const char *, ...) __attribute__ ((noreturn));
extern inline __attribute__ ((always_inline, gnu_inline, artificial)) void
baz (const char *fmt, ...)
{
bar (fmt, __b... |
google | chromium | pr27548 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr27548.C | 1,416 | utf_8 | 8068c5970209523958d75e5cd5284d28 | // PR tree-optimization/27548
// { dg-do compile }
// { dg-options "-O1" }
namespace Gambit
{
template < class T > class Array
{
protected:int mindex, maxdex;
T *data;
int InsertAt (const T & t, int n)
{
T *new_data = new T[++this->maxdex - this->mindex + 1] - this->mindex;
int i;
f... |
google | chromium | pr18178 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr18178.C | 771 | utf_8 | af0b096ca2ad7437a484c26de4dec069 | /* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-vrp1" } */
// Define this to see it work.
// #define WORK_WORK_WORK
#define THIRD
#ifdef THIRD
#define FIRST i < 0 ||
#define ORIG int
#define CAST
#else
#define FIRST
#ifdef WORK_WORK_WORK
#define ORIG unsigned int
#define CAST
#else
#define ORIG int
#defi... |
google | chromium | pr15791-5 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr15791-5.C | 265 | utf_8 | 5c84d01e2380defec463c6de4c81154b | /* { dg-do compile } */
/* { dg-options "-fdump-tree-gimple" } */
int foo(int i, int j)
{
char g[16];
if (&g[i] == &g[j])
return 1;
return 0;
}
/* { dg-final { scan-tree-dump-times "i == j" 1 "gimple" } } */
/* { dg-final { cleanup-tree-dump "gimple" } } */
|
google | chromium | pr19952 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr19952.C | 239 | utf_8 | 36bc4e744d6fb50060ca8b029be1905c | /* PR 19952 */
/* { dg-compile } */
/* { dg-options "-ftree-vectorize -O2" } */
int i;
struct A
{
~A() { ++i; }
};
struct B
{
A a;
};
void foo()
{
for (int i=0; i<2; ++i)
{
B *p;
if (p) p->~B();
}
}
|
google | chromium | pr22488 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr22488.C | 510 | utf_8 | 48e06b851bf1784a8edda8606ba10d99 | // PR tree-optimization/22488
// This testcase is really a C++ FE bug in represnting virtual inheritance
// It gives the appearance to the middle end that the fields exist twice
// which resulted in a very confused structure analyzer
// { dg-do compile }
// { dg-options "-O" }
struct X
{
int i0, i1;
char c;
}... |
google | chromium | pr19807 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr19807.C | 521 | utf_8 | 14455c2fd715b2c5a98bb15887f0cb91 | /* { dg-do compile } */
/* { dg-options "-O -fdump-tree-optimized" } */
int a[4];
int *x, *y, *z;
void foo(void)
{
x = &a[3] - 1;
y = &a[1] + 1;
z = 1 + &a[1];
}
void bar(int i)
{
x = &a[i] - 1;
y = &a[i] + 1;
z = 1 + &a[i];
}
/* { dg-final { scan-tree-dump-times "&a\\\[2\\\]" 3 "optimized" } } */
/* { dg-fin... |
google | chromium | pr37084 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr37084.C | 154 | utf_8 | 7bc2202a0f82103a8b65611ca356c6a5 | // PR tree-optimization/37084
// { dg-do compile }
// { dg-options "-O" }
struct A
{
A ();
};
inline A
foo ()
{
return A ();
}
const A a (foo ());
|
google | chromium | pr24231-1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr24231-1.C | 503 | utf_8 | 44148757e03cea49e851edb978cc91a5 | /* { dg-do compile } */
/* { dg-options "-O2" } */
/* FRE testcase for PR 24231, problem with PRE coalescing abnormal phis. */
struct f
{
int i;
};
struct h{h();};
int g(void);
int g1(void) throw();
int h2222(f*);
void ghh(int);
int main(void)
{
int i;
f t;
try
{
i = g1();
try
{
i = g();
... |
google | chromium | pr31307 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr31307.C | 808 | utf_8 | 7dada0a2246480857f3189289122784e | /* { dg-do compile } */
/* { dg-options "-O -fdump-tree-optimized" } */
union MY_M128
{
double i;
};
struct RegFile
{
MY_M128 dst[4];
};
__inline__ __attribute__((always_inline)) static void
MEM_OPT_LOAD(MY_M128* reg, double* mem)
{
reg[0].i = *mem;
}
void _ia32_movntdq (double *, double);
__inline__ __attri... |
google | chromium | pr23624 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr23624.C | 86 | utf_8 | 31fb06e70a65b02820509d29892e2f1c | /* { dg-do compile } */
template <int>
void f()
{
int *t, i;
t[i ? 0 : i];
}
|
google | chromium | pr25771 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr25771.C | 568 | utf_8 | 106c9716380acfba412f6534beaba23b | /* { dg-do compile } */
int ggggg();
struct string {
static int _S_empty_rep_storage[];
void _M_destroy();
char* _M_rep;
~string()
{
if (_M_rep != (char*)&_S_empty_rep_storage )
if (ggggg() <= 0)
_M_destroy();
}
};
extern void SDL_FreeSurface(int surface);
struct scoped_resource {
~sco... |
google | chromium | pr24351-1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr24351-1.C | 575 | utf_8 | c7d08277c75dad45e79a0f43ab257c4c | /* { dg-do compile } */
/* { dg-options "-O2" } */
struct adaptor_base {
};
struct bound_argument {
bound_argument();
};
template <class T_functor> struct adaptor_functor : public adaptor_base {
explicit adaptor_functor(const T_functor& _A_functor) : functor_(_A_functor)
{
}
T_functor functor_;
bound_argument... |
google | chromium | pr27283 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr27283.C | 1,356 | utf_8 | af26e0d1ce1be8b1c0a5623561e1b719 | /* { dg-do compile } */
/* { dg-options "-O2" } */
namespace Gambit
{
template < class T > class Array
{
protected:int mindex, maxdex;
T *data;
int InsertAt (const T & t, int n)
{
T *new_data = new T[++this->maxdex - this->mindex + 1] - this->mindex;
int i;
for (i = this->mindex; i ... |
google | chromium | pr22071 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr22071.C | 361 | utf_8 | 941b942a95d741f6184e06a6436ab545 | /* { dg-do compile } */
/* { dg-options "-O2" } */
/* This code ends up taking the address of part of the structure that is padding,
and because there is no real field there, the structure alias analyzer would
abort. */
struct empty_class {};
struct class1 : empty_class
{
class1() {}
empty_class value_;
}... |
google | chromium | pr41275 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr41275.C | 279 | utf_8 | 88c743ef9121547a2080de9e32812c79 | // PR middle-end/41275
// { dg-do compile }
// { dg-options "-O2" }
// this used to ICE
struct ErrmsgWindow
{
virtual ~ErrmsgWindow()
{
extern int _switch_mode_errorstr;
_switch_mode_errorstr = 42;
}
};
void ShowErrorMessage(void)
{
ErrmsgWindow w;
}
|
google | chromium | pr20963 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr20963.C | 676 | utf_8 | c6f234d3623212f40d78fad6b87310ad | /* { dg-do compile } */
/* { dg-options "-O2" } */
/* This was causing PRE to insert the value of the ADDR variable, to
remove the invariant cast but in doing so, it was creating a
non-invariant expression out of the invariant one, causing a later
failure in PRE. */
struct sMCB {
unsigned char type;
... |
google | chromium | dom-invalid | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/dom-invalid.C | 805 | utf_8 | e6a767be59130f79677faa96e068cef1 | // PR tree-optimization/39557
// invalid post-dom info leads to infinite loop
// { dg-do run }
// { dg-options "-Wall -fno-exceptions -O2 -fprofile-use -fno-rtti" }
struct C
{
virtual const char *bar () const;
};
struct D
{
D () : d1 (0) { }
C *d2[4];
int d1;
inline const C & baz (int i) const { return *d2[i]; }... |
google | chromium | pr22279 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr22279.C | 744 | utf_8 | 7c4b92ce09c59b2004e7746f2b1bd386 | /* { dg-do compile } */
/* { dg-options "-O2" } */
struct string
{
long long _M_p;
long long i;
string();
int begin();
int end();
string(int, int);
};
struct symbol
{
int type;
string name;
long long raw_name;
long long demangled_name;
long long version_name;
int version_status;
int status;
... |
google | chromium | tmmti-2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/tmmti-2.C | 461 | utf_8 | e7cafd368b42eae2493b3b71e9150752 | /* { dg-do compile } */
/* { dg-options { -O -fdump-tree-optimized } } */
int a[4][8];
int foo(int i)
{
return *(&a[0][0] + i*8); // a[i][0]
}
struct Foo { double x, y; };
Foo b[4];
double bar(int i)
{
return *(&b[0].x + i*2); // b[i].x
}
/* { dg-final { scan-tree-dump "a\\\[.*i.*\\\]\\\[0\\\]" "optimized" { xf... |
google | chromium | ivopts-1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/ivopts-1.C | 429 | utf_8 | 1a68a606ab899ac20dc0fb911f3edf25 | /* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-ivopts" } */
struct Foo {
Foo() : s(1) {}
int s;
};
void foo(Foo&);
void bar(void)
{
Foo x[4];
foo(x[0]);
}
/* { dg-final { scan-tree-dump-not "-&x" "ivopts" } } */
/* { dg-final { scan-tree-dump-not "offset: (4294967292|0x0f+fc)" "ivopts" } } */
/* { d... |
google | chromium | pr20458 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr20458.C | 413 | utf_8 | 41846b62265c3bb2f5a736155a172f33 | /* { dg-do run } */
/* { dg-options "-O2" } */
/* The tail call optimization would inapproriately tail call the
destructors due to not recognizing a call clobbered variable */
namespace std
{
class locale
{
public:
locale();
~locale();
};
}
struct B
{
std::locale _M_buf_locale;
virtual ~B() {}
};
st... |
google | chromium | pr23948 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr23948.C | 451 | utf_8 | 2943090c17900350d5466b1ecb1f011f | /* { dg-options "-O1 -ffast-math -fdump-tree-recip" } */
/* { dg-do compile } */
struct MIOFILE {
~MIOFILE();
};
double potentially_runnable_resource_share();
void f1(double);
int make_scheduler_request(double a, double b)
{
MIOFILE mf;
double prrs = potentially_runnable_resource_share();
f1(a/prrs);
f1(1/pr... |
google | chromium | pr35144 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr35144.C | 299 | utf_8 | 0fc8cb45517696ad7a137d07f7a59d5f | // PR c++/35144
// { dg-do compile }
// { dg-options "-O2" }
struct A
{
int baz ();
};
typedef int (A::*P) ();
struct B
{
B ();
int foo (P x, int y = 0);
};
struct C
{
typedef int (B::*Q) (P, int);
void bar (Q x) { c = x; }
Q c;
};
extern C c;
B::B ()
{
c.bar ((C::Q) &B::foo);
}
|
google | chromium | ptrmemfield | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/ptrmemfield.C | 530 | utf_8 | 901d1d30e514d3da55d461c1ba6f00b3 | /* { dg-do compile } */
// { dg-options "-O2 -fdump-tree-final_cleanup" }
struct f
{
char m;
char m1;
};
static inline char f:: *g(int a)
{
return a?0:&f::m;
}
int h(void)
{
char f:: *a = g(0);
return a == 0;
}
/* We should have no cast to offset_type. */
/* { dg-final { scan-tree-dump-times "offset_type... |
google | chromium | empty-1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/empty-1.C | 314 | utf_8 | ebffc2389dbbf739ae120d2beb15bf62 | /* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-optimized" } */
struct S {};
S bar (const S &a)
{
S s;
s = a;
return s;
}
/* Test whether memcpy call has been optimized out. */
/* { dg-final { scan-tree-dump-times "memcpy" 0 "optimized"} } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
|
google | chromium | pr24439 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr24439.C | 177 | utf_8 | 9a08ef02da783cd1df3302f368440d82 | /* { dg-do compile } */
/* We used to ICE in invert_truthvalue on the void type
2nd argument of the COND_EXPR. */
void foo(void)
{
int value=1;
!(value?true:throw);
}
|
google | chromium | pr19786 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr19786.C | 707 | utf_8 | a425019d3ee630ab12baac6d527c530b | // { dg-do run }
/* { dg-options "-O2" } */
// We used to get alias grouping wrong on this one, hoisting accesses
// to the vector's end out of the loop.
#include <vector>
#include <cassert>
struct A
{
double unused; // If I remove it => it works.
std::vector<int> v;
A() : v(1) {}
};
inline // If not in... |
google | chromium | pr24231-2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr24231-2.C | 506 | utf_8 | fc23f194bae9c81c5e59ce474597bd1c | /* { dg-do compile } */
/* { dg-options "-O2" } */
/* FRE testcase for PR 24231, problem with PRE coalescing abnormal phis. */
struct f
{
int i;
};
struct h{h();};
int g(void);
int g1(void) throw();
int h2222(f*);
void ghh(int);
int main(void)
{
int i;
f t;
try
{
i = g1();
try
{
i = g();
... |
google | chromium | pr24231-3 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr24231-3.C | 803 | utf_8 | 673c806c4a52af61e84671cf0de44ae3 | /* { dg-do compile } */
/* { dg-options "-O2" } */
/* PRE testcase for PR 24231, problem with PRE coalescing abnormal phis. */
struct MemoryManager {
virtual void deallocate() = 0;
};
struct XalanVector {
~XalanVector() {
m_memoryManager->deallocate();
}
void swap(XalanVector& the... |
google | chromium | pr38572 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr38572.C | 633 | utf_8 | 02b5ab6fcca95cd2ee0233b9c2227460 | // PR tree-optimization/38572
// { dg-do compile }
// { dg-options "-O2" }
// Crash caused by the out-of-bounds enum values (all the remaining cruft
// is needed only to trigger the appropriate code path in tree-vrp.c).
enum JSOp
{
JSOP_GETELEM = 5,
};
extern void g ();
void f (char *pc, char *endpc, int format, char... |
google | chromium | pr34355 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr34355.C | 520 | utf_8 | 070e8ded8a9dcc9c7e2b6d5878d21565 | // { dg-do compile }
// { dg-require-effective-target pthread }
// { dg-options "-O3 -ftree-parallelize-loops=4" }
typedef double EXPRESS[5];
extern int Terms;
void Parse_Rel_Factor (EXPRESS Express, int *Terms)
{
EXPRESS Local_Express = {5.0, 4.0, 3.0, 2.0, 1.0};
int Local_Terms = 5;
int i;
for (i = (*Te... |
google | chromium | nothrow-1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/nothrow-1.C | 399 | utf_8 | 72aa1ce70988a1e23f13c8cfdbaaf7a6 | /* { dg-do compile } */
/* { dg-options "-O1 -fdump-tree-cfg" } */
/* { dg-skip-if "" { "*-*-*" } { "-fpic" "-fPIC" } { "" } } */
double a;
void t()
{
a=1;
}
void t1(void);
void abort(void);
void q()
{
try {
t();
}
catch (...) {abort();}
}
/* We shouldnotice nothrow attribute. */
/* { dg-final { scan-tree-dump-... |
google | chromium | ssa-sra-1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/ssa-sra-1.C | 1,042 | utf_8 | 7b1430776e05b9bf2917d27e8cccefbc | /* { dg-do compile } */
/* { dg-options "-O1 -fdump-tree-optimized" } */
void link_error();
struct State {
int p0, p1, p2;
inline State(){p0=0;p1=0;p2=0;}
inline State(const State &s) {
p0 = s.p0;
p1 = s.p1;
p2 = s.p2;
}
inline void operator =(const State &s) {
p0 = s.p0;
p1 = s.p1;
p2... |
google | chromium | pr23164 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr23164.C | 238 | utf_8 | f9e0ba5e946f02655fec1329bedd4078 | /* { dg-do compile } */
/* { dg-options "-O2" } */
bool f();
struct S {
S();
~S();
};
void g() {
for (;;) {
S s1, s2, s3, s4, s5, s6;
if (f())
continue;
if (f())
return;
}
}
|
google | chromium | pr17517 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr17517.C | 472 | utf_8 | 3f50ad6afe1400d17f21f8b61d4be1a6 | // Test PR 17517. Test case provided by Serge Belyshev.
/* { dg-do compile } */
/* { dg-options "-O2" } */
extern void foo ();
struct Ptr {
int * ptr;
Ptr () { ptr = 0; }
~Ptr() { delete ptr; }
Ptr &operator= (int * p) { ptr = p; return *this; }
};
int *new_checker () { foo (); return 0; }
void pipe (int c... |
google | chromium | pr23046 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr23046.C | 214 | utf_8 | 73a20ce04e160fe0b32687e6154f256b | /* { dg-do compile } */
/* { dg-options "-O2" } */
enum eumtype { ENUM1, ENUM2 };
void g(const eumtype kind );
void f(long i);
void g(const eumtype kind)
{
if ((kind != ENUM1) && (kind != ENUM2))
f(kind);
}
|
google | chromium | pr22444 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr22444.C | 5,435 | utf_8 | 26f6a330aaa1867dbab3e7a2226b985c | // PR tree-optimization/22444
// When creating SFT's, we shouldn't add the original variable
// to the addressable vars list, because this may cause false aliasing
// with the subvars leading to the subvars not being renamed when they should
// { dg-do compile }
// { dg-options "-O2" }
__extension__ typedef __PTRDIFF_T... |
google | chromium | pr22615 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr22615.C | 338 | utf_8 | 8757b801b93bd7b27358f98ca8bc55b2 | /* { dg-do compile } */
/* { dg-options "-O2" } */
/* Ensure that we don't crash when people decide to return the address of padding. */
struct A
{
char c;
int i;
};
A a;
struct B
{
char c, d;
};
union C
{
A *p;
B *q;
C() : p(&a) {}
char& foo() { return q->d; }
};
void bar() { ... |
google | chromium | pr37356 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr37356.C | 331 | utf_8 | 50e81396db8278e2f138e7c26430b52e | // PR middle-end/37356 */
// { dg-do compile }
// { dg-options "-O" }
bool foo ();
int bar ();
bool
baz (int v)
{
return v == bar ();
}
struct A
{
A () { baz (1) || foo (); }
};
struct B
{
static A get () { return A (); }
B (const int &x) { }
B () : b (get ()) { }
A b;
};
B c;
void
test ()
{
int d;
... |
google | chromium | builtin1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/builtin1.C | 131 | utf_8 | 92014ea122d687546fe3649560d8b2a7 | // { dg-do link }
extern void link_error();
int main()
{
if (! __builtin_constant_p (&"Hello"[0]))
link_error();
return 0;
}
|
google | chromium | pr41906 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr41906.C | 237 | utf_8 | 91fe55fdc4c162c106f9fe9a49ed7329 | /* { dg-do compile } */
/* { dg-options "-fpermissive -w" } */
/* We aren't interested in the warning, but in the ICE. */
void foo();
extern void abort (void);
void bar()
{
try { foo(); }
catch (...) {}
catch (int) {abort ();}
}
|
google | chromium | pr22037 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr22037.C | 244 | utf_8 | aa931156abafd21884e323d601aa367f | /* { dg-do compile } */
/* { dg-options "-O2" } */
extern double sqrt (double) throw ();
void foo(double& d, int n)
{
double e=0;
for(int i=0; i<n; i++);
for(int i=0; i<n; i++) e=1;
d = sqrt(e);
for(int i=0; i<n; i++);
}
|
google | chromium | pr26406 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr26406.C | 282 | utf_8 | 53f9f80a90d08a898ab9c66c6050280b | /* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-optimized" } */
int *f(int *b)
{
int * a = new int[104];
*a = 1;
if (a == 0)
return b;
return a;
}
/* { dg-final { scan-tree-dump-not "if" "optimized" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
|
google | chromium | pr26443 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr26443.C | 175 | utf_8 | 0f61e3b02d9689c33c95f07a9421ed69 | // { dg-do compile }
struct A
{
double x[4];
};
struct B
{
A y[2];
};
A foo(B *p)
{
for ( int i=0; i<4; ++i )
p->y[1].x[i]=0;
A a;
return a;
}
|
google | chromium | pr22005 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr22005.C | 266 | utf_8 | 01366956240506c80efe61a02b2126bb | /* { dg-do compile } */
/* { dg-options "-O2" } */
struct cl_string
{
union{ int i; };
cl_string ();
};
struct cl_print_univpoly_flags { cl_string univpoly_varname; };
struct cl_print_flags: cl_print_univpoly_flags {int i;};
cl_print_flags default_print_flags;
|
google | chromium | pr15791-3 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr15791-3.C | 286 | utf_8 | 60208923fa136080caefbbee2e86be67 | /* { dg-do compile } */
/* { dg-options "-fdump-tree-gimple" } */
int f(int i, unsigned j)
{
int b[2];
if (&b[i] == &b[j])
return 1;
return 0;
}
/* { dg-final { scan-tree-dump-times "i == j" 0 "gimple" } } */
/* { dg-final { cleanup-tree-dump "gimple" } } */
|
google | chromium | ssa-sra-2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/ssa-sra-2.C | 1,030 | utf_8 | 66bd3bb920ae8a07d7669d44d037b3f1 | /* { dg-do compile } */
/* { dg-options "-O1 -fdump-tree-optimized" } */
void link_error();
struct OOf {
int value;
OOf() {value = 0;}
};
inline OOf operator+(OOf op1, OOf op2)
{
OOf f;
f.value = op1.value + op2.value;
return f;
}
inline OOf operator*(OOf op1, OOf op2)
{
... |
google | chromium | pr38104 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr38104.C | 189 | utf_8 | 6162289afdc8ea2d3d209d49e210373b | // PR tree-optimization/38104
// { dg-do compile }
// { dg-options "-O3" }
struct S { int foo; };
void f0 ();
void
f1 (struct S s)
{
f0 ();
}
void
f2 ()
{
f1 (*(struct S *) (0));
}
|
google | chromium | pr24172 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr24172.C | 170 | utf_8 | cb28ea9929b05e6b833bd19e04d97d9c | // { dg-options "-O2" }
void IOException( char);
inline int* dummy( const char* const mode )
{
IOException(*mode+*mode);
}
void prepare_inpaint( )
{
dummy ("rb");
}
|
google | chromium | pr22550 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr22550.C | 493 | utf_8 | 65be1fbed029e9a8dc4952880c85496f | /* { dg-do compile } */
/* { dg-options "-O2" } */
class X {
public:
int mfunc1 () {
return 1;
}
int mfunc2 () {
return 2;
}
X (int a, int b) { }
};
typedef int (X::*memfunc_p_t) ();
memfunc_p_t mf_arr[2] = { &X::mfunc1, &X::mfunc2 };
int
main ()
{
// Get pntr to the array of pointers to member-... |
google | chromium | pr21584-1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr21584-1.C | 590 | utf_8 | d8a7cc9480a3e66c4aed7e081ba0ef0c | extern "C" {
extern char *strcpy (char *__restrict __dest, __const char *__restrict __src)
throw () __attribute__ ((__nonnull__ (1, 2)));
extern char *foo (char *__restrict __s) throw ();
}
class cset {
public:
cset();
int operator()(unsigned char) const;
private:
char v[(127 * 2 + 1)+1];
};
inline int c... |
google | chromium | pr34063 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr34063.C | 388 | utf_8 | c896a5c6bc3c2c73fb372aa1df72f942 | // { PR tree-optimization/34063 }
// { dg-do compile }
// { dg-options "-O2" }
struct S
{
double e[9];
double const &
operator() (int r, int c) const
{
return e[r * 3 + c];
}
};
void
foo()
{
S r;
double *p;
for (int j = 0; j < 3; j++)
for (int k = 0; k < 3; k++)
for (int l = k + 1; l < ... |
google | chromium | pr30738 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr30738.C | 347 | utf_8 | 822cd8fa882210d586093e8e0bb0e94c | /* { dg-do compile } */
/* { dg-options "-O -fdump-tree-phiopt1" } */
template <class T>
static inline const T&
min_ref (const T &x, const T &y)
{
return x < y ? x : y;
}
int test_min_ref (int x, int y)
{
return min_ref (x, y);
}
/* { dg-final { scan-tree-dump "MIN_EXPR" "phiopt1" } } */
/* { dg-final { cleanup-... |
google | chromium | block1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/block1.C | 291 | utf_8 | d4c530769d43a1d750e74fd5f10a662c | // PR 13764: We were inserting an extra body block in all functions, but
// it's only really necessary for [cd]tors.
// { dg-options "-fdump-tree-gimple" }
void bar (void)
{
int a;
}
// { dg-final { scan-tree-dump-times "\{" 1 "gimple" } }
// { dg-final { cleanup-tree-dump "gimple" } }
|
google | chromium | pr15791-4 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr15791-4.C | 283 | utf_8 | 0f59bb1d8a1193143a12e70d489de8a4 | /* { dg-do compile } */
/* { dg-options "-fdump-tree-gimple" } */
int f(int i, int j)
{
int b[2][2];
if (&b[1][i] == &b[0][j])
return 1;
return 0;
}
/* { dg-final { scan-tree-dump-times "i == j" 0 "gimple" } } */
/* { dg-final { cleanup-tree-dump "gimple" } } */
|
google | chromium | pr27894 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr27894.C | 1,173 | utf_8 | 086db4c922e923a9d5c7b0582a1ba9f5 | // PR c++/27894
// { dg-do compile }
// { dg-options "-O" }
class A;
struct B
{
B (unsigned long);
int b2 () const;
A *b1 () const;
};
enum { P = 0 };
enum O { Q = 75, };
class C;
struct D { A *d; };
struct E
{
B e1 (int) const;
A *e2 (const B &) const;
D e3[4096];
};
inline A *
E::e2 (const B & x) const... |
google | chromium | pr17153 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr17153.C | 303 | utf_8 | 800bd27a3a39f1b9271b5c24af25251d | /* The alias analyzer was marking RETVAL non-addressable, but RETVAL
is a special variable that's available across different functions. */
void foo(const char*);
struct A {};
struct B : A
{
B(){}
B bar()
{
foo(__PRETTY_FUNCTION__);
return B();
}
};
B b=B().bar();
|
google | chromium | pointer-reference-alias | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pointer-reference-alias.C | 299 | utf_8 | e48295bc246510ba07409a9c081f3d68 | /* { dg-do compile } */
/* { dg-options "-O1 -fdump-tree-optimized" } */
int f(int *a)
{
int &b = *a;
b = 0;
return *a;
}
/* There should be only one dereferencing of a. */
/* { dg-final { scan-tree-dump-times "\\*a" 1 "optimized" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
|
google | chromium | pr36766 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr36766.C | 299 | utf_8 | 2f183741ea748ec4b30350602de8d364 | // PR tree-optimization/36766
// { dg-do compile }
// { dg-options "-O -fnon-call-exceptions" }
struct A
{
~A ()
{
int *a = this->b;
}
int *b;
};
struct B : A
{
B ()
{
int *a = this->b;
}
~B ()
{
int *a = this->b;
}
};
void
foo ()
{
B *c = new B;
delete c;
}
|
google | chromium | pr19637 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr19637.C | 687 | utf_8 | 4fb7c1f3c3f79c0ca2d2ee441469a27c | /* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-dom1" } */
#include <new>
struct Foo {
Foo() { i[0] = 1; }
int i[2];
};
int foo_char(void)
{
int i[2];
new (reinterpret_cast<char *>(i)) Foo();
return reinterpret_cast<Foo *>(i)->i[0];
}
int foo_void(void)
{
int i[2];
new (reinterpret_cast<void ... |
google | chromium | pr33615 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr33615.C | 443 | utf_8 | 6da757bab007e7d9896e1ca1121a03e9 | /* { dg-do compile } */
/* { dg-options "-O -fnon-call-exceptions -fdump-tree-lim-details -w" } */
extern volatile int y;
double
foo (double a, int x)
{
while (x--)
{
y++;
a += 1.0 / 0.0;
}
return a;
}
// The expression 1.0 / 0.0 should not be treated as a loop invariant
// if it may throw an... |
google | chromium | pr17400 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr17400.C | 594 | utf_8 | 84bb302e221d8cd2317c6c09441d615f | // Test PR 17400. Test case provided by Serge Belyshev.
/* { dg-do compile } */
/* { dg-options "-O1" } */
void inc (int &);
bool dec_test (int &);
struct A
{
int c;
friend void AddRef (A * p)
{
inc (p->c);
}
friend void Release (A * p)
{
if(dec_test (p->c))
delete p;
}
};
stru... |
google | chromium | 20040317-1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/20040317-1.C | 1,153 | utf_8 | 2a1f9c8b1ccb241e4745f1e06c56fac3 | /* { dg-do run } */
/* { dg-options "-O2" } */
/* Test provided by Brian Ryner in PR 14511. The alias analyzer was
not handling structures containing arrays properly. In this case,
the static cast was introducing two assignments of the form
this_6->_vptr.IFoo = &_ZTV4IFoo[2];
this_4->_vptr.IFoo = &_ZTV3... |
google | chromium | pr28003 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr28003.C | 603 | utf_8 | 68f892d0aaa84abba22ecb11810e95ce | // PR tree-optimization/28003
// Alias grouping needs to be computed after call clobbering, because it
// changes around the tags and variables in a way that makes our
// call clobbering computation incorrect.
// { dg-do run }
// { dg-options "-O2" }
extern "C" void abort(void);
struct A
{
int i, j[9];
A() : i(1) {... |
google | chromium | pr21463 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr21463.C | 628 | utf_8 | 6354563547a948a45e6104aad7bce512 | /* { dg-do compile } */
/* { dg-options "-O -fdump-tree-phiopt1" } */
template<class T> static inline const T &ref_max(const T &a, const T &b)
{ return a<b ? b : a; }
template<class T> static inline const T &ref_min(const T &a, const T &b)
{ return a<b ? a : b; }
template<class T> struct foo_t {
T a0, a1;
T bar_ref... |
google | chromium | ssa-cast-1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/ssa-cast-1.C | 320 | utf_8 | 393e0408cee76b2ea195f959657d773f | /* { dg-do compile } */
/* { dg-options "-O1 -fdump-tree-optimized" } */
int &f(int *a)
{
return *a;
}
/* There should be no cast as pointer and references are
considered the same type. */
/* { dg-final { scan-tree-dump-times "\\(int &\\)" 0 "optimized"} } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
|
google | chromium | pr14703 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr14703.C | 1,037 | utf_8 | f32a65e0adde0d18a7b0f1b12d14f24b | /* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-optimized -fno-ipa-reference" } */
#include <iostream>
namespace {
template <unsigned long long L> class fib {
public:
static const unsigned long long value = fib<L - 1>::value + fib<L - 2>::value;
};
template <> class fib<0> {
public:
static const unsi... |
google | chromium | pr27090 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr27090.C | 414 | utf_8 | 3a3527449ee5348b6cd67dc8e7930581 | /* { dg-do compile } */
/* { dg-options "-O -fdump-tree-optimized" } */
template <class T>
struct Bar
{
int get() { return static_cast<T*>(this)->get2(); }
};
struct Foo : public Bar<Foo>
{
int get2() { return x; }
int x;
};
int foo(Foo& f)
{
return f.get();
}
/* { dg-final { scan-tre... |
google | chromium | pr15791-2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr15791-2.C | 166 | utf_8 | 44258efc32e7a0390a4fd5cba4148adc | /* { dg-do link } */
/* { dg-options "" } */
void link_error ();
struct a {};
int main ()
{
struct a b[2];
if (&b[0] == &b[1])
link_error ();
return 0;
}
|
google | chromium | tmmti | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/tmmti.C | 96 | utf_8 | 0fb08fd6d187247ae5872931e884061c | /* { dg-do compile } */
void bar(unsigned int i)
{
int a[4];
char *p = (char*)&a[1] + 4*i;
}
|
google | chromium | pr20489 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr20489.C | 265 | utf_8 | ebc744114f159114473ef7dfa2b07535 | /* { dg-do compile } */
/* { dg-options "-O2" } */
struct A
{
~A();
};
/* If we don't create SFT's for the "empty" structure A, bad things
will happen, and we will fail verification. */
struct B
{
int i;
A a;
void foo() {}
};
void bar()
{
B().foo();
}
|
google | chromium | obj-type-ref | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/obj-type-ref.C | 370 | utf_8 | 9ea732e01391f201c070578af2e42c8a | /* { dg-do compile } */
/* This used to fail with type-checking enabled because we didn't
expect OBJ_TYPE_REF expressions. */
class QObject {};
class Pile : public QObject {
public:
virtual void setVisible(void);
};
class Spider {
void dealRow();
Pile *redeals[5];
int m_redeal;
};
void Spider::dea... |
google | chromium | pr37337 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr37337.C | 590 | utf_8 | 5c831c14b296b96a01bdddeddc5a05ff | // PR middle-end/37337
// { dg-do compile }
// { dg-options "-O2" }
extern "C"
{
typedef struct _IO_FILE FILE;
extern int __fprintf_chk (FILE *, int, const char *, ...);
extern inline __attribute__ ((always_inline, gnu_inline, artificial))
int fprintf (FILE *s, const char *f, ...)
{
return __fprintf_chk ... |
google | chromium | new1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/new1.C | 628 | utf_8 | 1c66c0a04e2d18d5e297d227f66382cc | // PR c++/36633
/* { dg-do compile } */
/* { dg-options "-O2 -Wall -fdump-tree-forwprop1" } */
// No particular reason for choosing forwprop1 dump to look at.
struct B { ~B() {} };
struct D : public B {};
//struct D {};
struct my_deleter
{
void operator()(D * d)
{
// delete [] d;
}
};
struct smart_ptr
... |
google | chromium | ssa-sra-3 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/ssa-sra-3.C | 1,131 | utf_8 | 3fc97853b7f5a33a82d43b9c8b97e80a | /* { dg-do compile } */
/* { dg-options "-O2" } */
/* Test check use_block_copy bit propagation in sra element hierarchy. */
typedef unsigned char UINT8 ;
typedef unsigned int UINT ;
class C4
{
public:
int xy[2];
};
class C3
{
public:
inline void
Reset()
{
C4 const mvMax = {0x7fff, 0x7fff};
m42(0,mv... |
google | chromium | pr33604 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr33604.C | 999 | utf_8 | 8a32f9715dc55f59a28bddfc5561e10b | /* { dg-do run } */
/* { dg-options "-O -fdump-tree-forwprop1" } */
struct Value
{
double value;
Value(double value_) : value (value_) {}
operator double() const { return value; }
Value& operator=(double other) { value = other; }
};
struct Ref
{
const Value& m;
Ref(const Value& m_) : m(m_) {}
operator d... |
google | chromium | pr37284 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr37284.C | 282 | utf_8 | ad29c1108af522a5f6549a85ceae70af | /* { dg-do compile } */
/* { dg-options "-fstrict-aliasing" } */
void* operator new(__SIZE_TYPE__, void* __p) throw()
{
return __p;
}
class PatternDriverTop;
typedef const PatternDriverTop* _Tp;
void construct(_Tp* __p, const _Tp& __val)
{
::new((void *)__p) _Tp(__val);
}
|
google | chromium | pr26140 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr26140.C | 180 | utf_8 | 9b83f20893ef5febef9dbb2f7ade2aa1 | /* { dg-do compile } */
struct Pitch
{
int notename_;
};
struct Audio_note
{
Audio_note (Pitch p);
};
void create_audio_elements ()
{
Pitch *pit;
new Audio_note (*pit);
}
|
google | chromium | pr33615-2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr33615-2.C | 459 | utf_8 | 885e2d65485d9abe06da5ddb44712bf3 | /* { dg-do compile } */
/* { dg-options "-O2 -fnon-call-exceptions -fdump-tree-pre-details -w" } */
extern volatile int y;
double
foo (double a, int x)
{
while (x--)
{
y++;
a += 1.0 / 0.0;
}
return a;
}
// The expression 1.0 / 0.0 should not be treated as a loop invariant
// if it may throw a... |
google | chromium | pr20920 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr20920.C | 489 | utf_8 | 40a4cb93d3e506b171fb153b32fdf949 | /* { dg-do compile } */
/* { dg-options "-O2" } */
/* This was causing a failure in the out of SSA pass because VRP was
trying to insert assertions for SSA names that flow through
abnormal edges. */
void f(int) __attribute__((__noreturn__));
int d(const char *);
char * j ();
char *
foo (int x)
{
char *path =... |
google | chromium | pr27830 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr27830.C | 252 | utf_8 | a4395760f907dfae0f2de3099740f694 | /* { dg-do compile } */
/* { dg-options "-O" } */
struct gc{};
struct transform:public gc
{
double x, y, z, t;
transform (void){}
};
inline transform f (void)
{
return transform ();
};
void transformed (void)
{
new transform (f());
}
|
google | chromium | pr29902 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr29902.C | 496 | utf_8 | d8063a23a492689a7c530d408aecc6af | /* { dg-do compile { target i?86-*-* } } */
/* { dg-options "-O1 -fprefetch-loop-arrays -march=athlon" } */
/* { dg-require-effective-target ilp32 } */
int length1();
int g(int);
void f(int capacity_, char *old_storage)
{
try {
length1();
int old_capacity = capacity_;
capacity_ *= 2;
g(capaci... |
google | chromium | pr41961 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr41961.C | 236 | utf_8 | b3721c1012726f86c682c19ffbad76a6 | // { dg-do compile }
// { dg-require-effective-target pthread }
// { dg-options "-O3 -ftree-parallelize-loops=2" }
struct A
{
char c[17];
void foo();
};
void A::foo()
{
for (int i = 0; i < 17; ++i)
c[i] = 0;
}
|
google | chromium | pr33593 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr33593.C | 476 | utf_8 | 9b0a4afc028e2bf3114434c245b8ab96 | /* { dg-do compile } */
/* { dg-options "-O1 -fnon-call-exceptions -fdump-tree-optimized" } */
#include <stdio.h>
void foo (int) { printf ("Bar\n"); }
int
main (void)
{
int a = 1 / 0; // { dg-warning "division by zero" }
printf ("Foo\n");
foo (a);
}
// The expression 1 / 0 should not be propagated into the ca... |
google | chromium | pr15791-1 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr15791-1.C | 385 | utf_8 | 62600822d88828e393d9efe9f65e0fb1 | /* { dg-do link } */
void link_error ();
int main ()
{
struct { int b[2]; } x;
int b[2];
if (&b[1] != &b[1])
link_error ();
if (&b[0] != b)
link_error ();
if (b == &b[2])
link_error ();
if (b != b)
link_error ();
if (&x.b[1] == &x.b[0])
link_error ();
if (x.b != &x.b[0])
link_e... |
google | chromium | pr21584-2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr21584-2.C | 351 | utf_8 | 16cd9f13bcca36b74595d6ecd557a25a | extern char *strcpy (char *__restrict __dest, __const char *__restrict __src);
extern char *foo (void);
extern void *malloc(__SIZE_TYPE__) __attribute__((malloc));
char v[100];
void baz()
{
char *vec;
char buf[512];
char *p = buf;
while (v[(*p)])
p++;
if (*p != '#' && (p = foo()) != 0) {
strcpy (... |
google | chromium | pr16688 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr16688.C | 5,868 | utf_8 | 890d09382f8bad07b069d8f8fe14035c | /* PR 16688. Test provided by Wolfgang Bangerth. The alias analyzer
was aborting when trying to group aliases. */
/* { dg-do compile } */
/* { dg-options "-O2" } */
template<typename _Tp>
struct iterator_traits;
template<typename _Tp>
struct iterator_traits<_Tp*> {
typedef _Tp& reference;
};
template<type... |
google | chromium | copyprop | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/copyprop.C | 30,162 | utf_8 | 84cbb07e6080c860059481d123cb6d76 | // PR 39548 verify ssa ICE
//
// { dg-do compile { target { lp64 } } }
// { dg-options "-Wno-error -fno-exceptions -fno-tree-vrp -O2 -fprofile-generate -finline-limit=500" }
//
#include <map>
#include <vector>
#include <iostream>
using namespace std;
extern void free (void *);
template<typename _FIter, typename _T... |
google | chromium | pr21082 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr21082.C | 176 | utf_8 | 180ef8f1d16573d92b1f372b557677cd | /* { dg-do link } */
/* { dg-options "-fstrict-overflow" } */
void link_error();
int a[4];
long b, c;
int main()
{
if (&a[b] - &a[c] != b - c)
link_error();
return 0;
}
|
google | chromium | pr24351-2 | .C | native_client/nacl-gcc/gcc/testsuite/g++.dg/tree-ssa/pr24351-2.C | 650 | utf_8 | 35351f51c829a8c2ba2180c169d060d1 | /* { dg-do compile } */
/* { dg-options "-O2" } */
struct adaptor_base {};
struct bound_argument {
bound_argument();
};
struct adaptor_functorint : public adaptor_base {};
struct adaptsint : public adaptor_base {
adaptsint(const int& _A_functor);
adaptor_functorint functor_;
};
struct adaptor_functor_adaptsint {
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.