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
array12
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/array12.C
472
utf_8
cdd8bcf2d0f951ea0f042ff962ed9854
// PR c++/12253 // Bug: We were failing to destroy the temporary A passed to the // constructor for b[0] before going on to construct b[1]. // { dg-do run } extern "C" int printf (const char *, ...); int c; int r; struct A { A() { printf ("A()\n"); if (c++) r = 1; } A(const A&) { printf ("A(const A&)\n"); ++c; ...
google
chromium
array1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/array1.C
413
utf_8
92960aa3fba7b251d088910f7ca36c73
// Test that completing an array declared with a typedef doesn't change // the typedef. // { dg-do run } typedef int iArr[]; const iArr array4={ 1, 2, 3, 4 }; const iArr array3={ 1, 2, 3 }; const iArr array5={ 1, 2, 3, 4, 5 }; int main() { if (sizeof (array4)/sizeof (array4[0]) != 4 || sizeof (array...
google
chromium
cleanup2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/cleanup2.C
394
utf_8
7d94225f3f0c383bec9dd200a01a0b33
// PR c++/12526 // We decided that the call to strcmp has no side-effects because strcmp is // pure, even though the first argument has side-effects. As a result, we // stripped the CLEANUP_POINT_EXPR. Hilarity ensued. extern "C" int strcmp (const char *, const char *); struct A { A(int); const char *str(); ...
google
chromium
delete2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/delete2.C
769
utf_8
468ee3e464fecbec120056e490e0ffe4
// PR c++/15097 // { dg-do run } typedef __SIZE_TYPE__ size_t; extern "C" void * malloc (size_t); extern "C" void free (void *); extern "C" void abort(void); void *saved; void * operator new (size_t size) { void *p = malloc (size); saved = p; return p; } void operator delete (void *p) { if (p != saved) ...
google
chromium
new9
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/new9.C
235
utf_8
d9b779b618b81e9ea527baf5e2af4c4e
// PR 12337 class A {}; template <typename T> class X : public A { public: X(T&); }; class B { public: bool foo(A*); template <typename T> bool foo(T& t) { return foo(new X<T>(t)); } }; int main() { B x, y; x.foo(y); }
google
chromium
init-ref3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/init-ref3.C
688
utf_8
c9be9788e0023890c93cbcdd3e3bcbd1
// { dg-do link } template <class T> class Ptr { protected: T * ptr; public: Ptr(void) : ptr(0) { } Ptr(T * p) : ptr(p) { } ~Ptr(void) { delete ptr; } operator T & () { return *ptr; } }; class base { public: base(void) { } ~base(void) { } }; class foo : public base { private: foo(const foo & r...
google
chromium
pr42844
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/pr42844.C
1,282
utf_8
066f1cead171149587cf59897ebf0fb8
// PR c++/42844 // { dg-do compile } struct A { A(){} }; struct B : A { int i; }; // { dg-message "user-provided default constructor" } struct C : A { int i; }; // { dg-message "user-provided default constructor" } struct D : B { D() {} }; struct E { int i; }; // { dg-message "user-provided default constructor" ...
google
chromium
value7
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/value7.C
158
utf_8
4487271d3a3d8cbbe87a8aa0dee4b541
// PR c++/30111 // { dg-do run } struct pod { int i; }; struct inherit : pod { inherit() : pod() {} }; int main() { inherit i; return i.i != 0; }
google
chromium
ref13
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/ref13.C
94
utf_8
9fd35f214b88e04577c6edb14b23477c
// PR c++/28338 void foo() { { static const int& i = 0; } { static const int& i = 0; } }
google
chromium
elide2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/elide2.C
429
utf_8
e657849b9797c7df684fd4fafe1341d1
// PR c++/8674 // Bug: Since B().a is an rvalue, we tried to treat it like a TARGET_EXPR // and elide the copy. But that produces a bitwise copy, which causes us // to abort in cp_expr_size. // Test that we actually run the A copy constructor when calling f(). // { dg-do run } int c; struct A { A () { ++c; } ...
google
chromium
ctor1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/ctor1.C
710
utf_8
77ceed5edeb6a109374c44ef23679bef
// { dg-do run } // From WindRiver SPR 80797 // We were inadvertently SAVE_EXPRing volatile arrays during delete[] struct A { A *ptr; static int ok; A () {ptr = this;} ~A () {ok = ptr == this;} }; int A::ok = -1; struct B { B *ptr; static int ok; B () {ptr = this;} ~B () {ok = ptr == this;} }; int...
google
chromium
aggr1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/aggr1.C
247
utf_8
f6bd229ad72e1e0526a7e259faf50163
// Test that initializing an aggregate with complex copy constructor // and assignment ops doesn't cause cp_expr_size to abort. struct A { A(); A(const A&); A& operator=(const A&); }; struct B { A a; }; int main () { B b = { A() }; }
google
chromium
for3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/for3.C
111
utf_8
07dcd9a47aa0d73fd3c9a976d1f3ba07
// { dg-do compile } struct A { int i; A(); A(const A&); }; void bar() { A a; for ( ;; a=A() ) ; }
google
chromium
volatile2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/volatile2.C
94
utf_8
f98e7ab2646951eca57b37b0ade8c12a
// PR c++/47003 struct A { A(int); }; volatile int i; int main() { A *q = new A (i); }
google
chromium
delete1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/delete1.C
116
utf_8
27316aef2661ec451196e55a019579a8
// PR c++/19811 class C; // { dg-error "forward" } void foo(void *p) { delete [] ((C*)p) ; // { dg-error "" } }
google
chromium
new31
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/new31.C
160
utf_8
cb832553288f013af05fc884fc7a4d21
// PR c++/48834 // { dg-options -Wuninitialized } // { dg-do run } struct S { S ():i (0) { } int i; }; int main () { S *s = new S[2]; return 0; }
google
chromium
ref18
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/ref18.C
253
utf_8
414d55614739b2926c1121746254a89a
// PR c++/49395 volatile int foo(); struct A { volatile int i; }; typedef volatile int vi; volatile int i; const int& ir1 = foo(); //const int& ir2 = A().i; // line 8 const int& ir3 = static_cast<volatile int>(i); const int& ir4 = vi(); // line 10
google
chromium
new6
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/new6.C
178
utf_8
6142030ce76d1ab9453ff0a223722577
// { dg-options "-fkeep-inline-functions" } struct B1 { virtual ~B1(); }; struct B2 { virtual ~B2(); }; struct D : B1, B2 {}; struct X : D { X (); }; X::X () { new int; }
google
chromium
ctor5
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/ctor5.C
242
utf_8
a6128e1518e0ce6bdc30c0b7a23dfd18
// PR C++/21645 // We were crashing because we forgot to update the type for // the cloned argument for the cloned ctor. struct color { ~color(); }; struct style { color col; style (color); }; style::style(color c) { }
google
chromium
synth3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/synth3.C
240
utf_8
52d51052f7365f93dd3959b1a93894f2
// Test that synthesizing the C copy constructor doesn't require B<int> to // be complete. template <class T> struct B { typename T::NT nt; }; struct A { A (); A (const A&); A (const B<int>&); }; struct C: A { }; C c;
google
chromium
ref9
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/ref9.C
603
utf_8
ded575d1c35757dbf89f635e5a86910d
// { dg-do run } struct ex; struct basic { int refcount; ex eval() const; basic() : refcount(0) {} }; struct ex { basic *bp; ex() : bp(0) { } ex(const basic &); virtual ~ex(); void construct_from_basic(const basic &); }; ex basic::eval() const { throw 1; } inline ex::ex(const basic &b) { construct...
google
chromium
new12
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/new12.C
64
utf_8
bd503383d6a9825355b68023ee042168
// PR c++/18369 void breakme () { int *v = new (int [5]); }
google
chromium
brace6
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/brace6.C
407
utf_8
39bb9098aeddf86d5649eb460b65f03f
/* PR c++/30759 */ /* { dg-do compile } */ struct A { A(int) { } }; struct B { B(const B&); int b; }; struct C {}; struct D { int c; }; int main() { int i = { 1 }; int j = { 1, 2 }; /* { dg-error "requires one element" } */ A a = { 6 }; /* { dg-error "initialize" } */ B b = { 6 }; /* { dg-erro...
google
chromium
new7
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/new7.C
131
utf_8
625c88e7ce2f57c2f27e69085c8278eb
template <class T> struct Foo {}; template <class T> void Foo<T>::NON_EXISTENT(int* val = new int()) {} // { dg-error "" }
google
chromium
copy3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/copy3.C
199
utf_8
507c17431c10231f129d442ae2f706a2
// { dg-do run } // { dg-options "-fno-elide-constructors" } int copies; struct S { S () {} S (const S&) { ++copies; } }; S s[1] = { S () }; int main () { if (copies != 1) return 1; }
google
chromium
pr43719
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/pr43719.C
2,812
utf_8
eb8192573e3e72e83efdd8ce41eb2ff2
// PR c++/43719 // { dg-do compile } struct A1 { int const j; // { dg-message "should be initialized" } }; struct A2 { int const volatile i; // { dg-message "should be initialized" } }; struct A3 { int& ref; // { dg-message "should be initialized" } }; struct A4 { int const& ref; // { dg-message "should be init...
google
chromium
ptrmem2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/ptrmem2.C
135
utf_8
74ea9e49b5fe45a570f00a8474ac7198
// PR c++/19916 // { dg-do run } struct S { char k; }; char const volatile S::* const p01 = &S::k; int main(void) { return 0; }
google
chromium
new20
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/new20.C
199
utf_8
9b183ec2b575bdf5465306fc4e259b43
// PR c++/31743 typedef int A[]; A* p = new A; // { dg-error "invalid use of array with unspecified bounds" } A* q = new (A); // { dg-error "invalid use of array with unspecified bounds" }
google
chromium
aggr2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/aggr2.C
528
utf_8
a79ad2e50ca8d0ab6dd5b27254f204b5
// PR c++/15172 // { dg-do run } extern "C" int printf (const char *, ...); extern "C" void abort (); struct A { static A* p; A() { p = this; } A(const A&); ~A() { if (this != p) abort (); } void print () { } }; A* A::p; struct B { A a; }; B b = { A () }; struct A2 { static A2* p; A2() { p = thi...
google
chromium
ctor8
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/ctor8.C
147
utf_8
649afd1f0ee64cdf809736af7d5a8c2a
// PR c++/29039 typedef struct S { int &r; }; // { dg-warning "'typedef' was ignored" } S f () { return S (); // { dg-error "reference" } }
google
chromium
static1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/static1.C
85
utf_8
36c7bdcd9c002a17bbb025dd79e017b7
struct A { static const int size = BOGUS; // { dg-error "" } }; const int A::size;
google
chromium
member1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/member1.C
443
utf_8
0160b85e4a1a6610929a08c40f60df4d
// Bug 20789: ICE on invalid template<typename> struct A; template<int> struct B {}; template<typename T> struct C { static const int i = A<T>::i; // { dg-error "incomplete" } static const int j = i; B<j> b; }; C<int> c; int i = C<int>::i; int j = C<int>::j;
google
chromium
new17
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/new17.C
709
utf_8
0e5c6faf49d015ce24e47a142ef72ec9
// { dg-do compile } // { dg-options "-O2 -fstrict-aliasing -fdump-tree-optimized" } // Test that placement new does not introduce an unnecessary memory // barrier. // See PR 29286. typedef __SIZE_TYPE__ size_t; inline void* operator new(size_t, void* __p) throw() { return __p; } template <class T, int D> class Vec...
google
chromium
new25
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/new25.C
957
utf_8
ccfb55277b45e67e6b5a86c7f05fd0a8
// PR c++/31988 #include <new> class C { public: void* operator new(std::size_t = 32) throw (std::bad_alloc); // { dg-error "first parameter" } void* operator new[](std::size_t = 32) throw (std::bad_alloc); // { dg-error "first parameter" } void* operator new(std::size_t = 32, const std::nothrow_t&) throw(); // ...
google
chromium
const2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/const2.C
86
utf_8
4db32f4d35d147ab0e7b83fc5a21a848
// PR c++/19878 struct S { char k; }; char const volatile S::* const p01 = &S::k;
google
chromium
string1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/string1.C
124
utf_8
8b181745d241d484dd529391acd12c57
extern void f (char*); extern const char * const target = "foo"; void g () { f (target); // { dg-error "conversion" } }
google
chromium
pr25811
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/pr25811.C
2,831
utf_8
6599fe1395799d25410913bae790590c
// PR c++/25811 // { dg-do compile } struct A1 { int const j; // { dg-message "should be initialized" } }; struct A2 { int const volatile i; // { dg-message "should be initialized" } }; struct A3 { int& ref; // { dg-message "should be initialized" } }; struct A4 { int const& ref; // { dg-message "should be init...
google
chromium
cleanup1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/cleanup1.C
304
utf_8
0f1ff9d8ddbbe6eb6b3651aa40fa79db
// PR c++/13033 // We failed to treat the for increment expression as a full-expression, // which broke gimplification. struct QDomNode { virtual ~QDomNode(); QDomNode nextSibling() const; bool isNull() const; }; void processNode(QDomNode n) { for (; !n.isNull(); n = n.nextSibling()) ; }
google
chromium
struct3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/struct3.C
344
utf_8
22d61e3cdadcbb46755a2e1556954646
/* PR c++/23180. */ /* Initialize a global variable with an expression that attempts to use pointer arithmetic to calculate a structure field offset. */ struct Track { char soundName[15]; }; struct SaveLoadEntry { int offs; int type; int size; }; int foobar = ((long) (__SIZE_TYPE__) (& ((Track *) 42...
google
chromium
struct2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/struct2.C
526
utf_8
4659e4a9f0e209d3efc6a3da61e47a06
/* PR c++/23180. */ /* Initialize a local structure with an expression that attempts to use pointer arithmetic to calculate another structure field offset. */ void saveLoadEntries(const void *); void saveOrLoad() { struct Track { char soundName[15]; }; struct SaveLoadEntry { int offs;...
google
chromium
error2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/error2.C
262
utf_8
56a518089ed19a2aa32735199bb379e0
/* PR c++/29727 */ /* { dg-do compile } */ template<int> struct A { static int a[1]; }; template<int N> int A<N>::a[1] = { X:0 }; /* { dg-error "does not allow designated|was not declared|designated initializer for an array" } */ void foo() { A<0>::a; }
google
chromium
new30
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/new30.C
288
utf_8
fb29671d73953facd665408d3e39029d
// PR c++/40975 struct data_type { // constructor required to reproduce compiler bug data_type() {} }; struct ptr_type { // array new as default argument required to reproduce compiler bug ptr_type (data_type* ptr = new data_type[1]) { delete[] ptr; } }; ptr_type obj;
google
chromium
byval1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/byval1.C
323
utf_8
8878c87dba0d0dc5af8198636c9944bc
// PR c++/3948 // Test that the destructor call for a value parameter gets the // right address. // { dg-do run } void *p[2]; int i; int r; struct C { int m; C() { p[i++] = this; } ~C() { if (p[--i] != this) r = 1; } }; void Foo (C c) { p[i++] = &c; } int main () { C c; return r; }
google
chromium
self1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/self1.C
199
utf_8
2ce501fe71f97375e159963b826b5f70
// PR c++/29106 // { dg-do run } int i; void f(__SIZE_TYPE__) { i = 3; } int main() { int* const savepos = sizeof(*savepos) ? 0 : 0; f (sizeof (*savepos)); if (i != 3) return 1; }
google
chromium
pr25811-4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/pr25811-4.C
1,012
utf_8
677f7b38b3959f7edf25e66789e0a86a
// { dg-do compile } // { dg-options "-fpermissive" } struct A { int const i; }; struct B { int& i; }; struct C { int i; }; template< class T > class is_constructible_via_new_without_initializer { template<int> class size {}; typedef char yes_type; struct no_type { char data[2]; }; template <class U...
google
chromium
array14
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/array14.C
283
utf_8
46ee7376992213a7ad7da95e9c59931d
// PR c++/12883 // Bug: Destructor of array object not called if no prior // instantiation of the template has happened. // { dg-do run } int ret = 1; template <int> struct X { X(int) { } ~X() { ret = 0; } }; int main() { { X<0> array[] = { 0 }; } return ret; }
google
chromium
inline1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/inline1.C
116
utf_8
41d2d4e5be3c0a2a40a1924f14ac4448
// PR c++/9167 // { dg-options "-finline" } struct A { ~A(); A f(A) { } }; void f(void) { A a; a.f(a); }
google
chromium
synth1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/synth1.C
135
utf_8
ab02e565927ee50b37c774159922e9d9
// PR middle-end/17525 struct A { ~A(); int a; }; struct B : public A { virtual ~B(); }; void run (B& b, B& b1) { b1 = b; }
google
chromium
array19
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/array19.C
89
utf_8
db737c897b3b257dcc015a0f7ff35dcc
// { dg-do compile } // { dg-options "" } double a[0] = { }; const double b[0][1] = { };
google
chromium
pm2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/pm2.C
60
utf_8
49c02c7ea8ff817fb850567f5e9bb9d8
struct S { S (); int S::* sp; int i; }; S s[2] = {};
google
chromium
new2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/new2.C
255
utf_8
7502916c49c92544e10e7a1d3ce41eea
// { dg-do compile } class bar { public : bar() { } void * operator new ( __SIZE_TYPE__ , void * storage ) { return (void *)1;} }; class foo { public: void mem ( ) { new ( 0 ) bar; } };
google
chromium
new11
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/new11.C
361
utf_8
6f47ea3d49aa99edd7c65d0f6c52bdf3
// PR c++/17670 // { dg-do run } #include <cstdlib> #include <new> bool abort_new; void *operator new[](size_t bytes) throw (std::bad_alloc) { if (abort_new) abort(); return operator new (bytes); } struct X {}; int main () { // Do not abort until main is running in case startup code uses // operator...
google
chromium
brace5
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/brace5.C
122
utf_8
c67cb693c501dfa41dcf719d6d7498f1
// PR c++/27491 // { dg-do compile } // { dg-options "" } int i = (int) { 0 }; int j = (int) { i }; int k = (int) { k };
google
chromium
copy6
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/copy6.C
126
utf_8
5d48182e8fa2907f420bf1ef3d67dba3
// PR c++/11878 struct A { virtual ~A(); }; template<typename T> struct B { T t; }; void foo() { throw B<A>().t; }
google
chromium
new4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/new4.C
25
utf_8
19dcda79922ea7017c7e260394e77415
int *x = new int [2] ();
google
chromium
ptrmem3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/ptrmem3.C
134
utf_8
0b090bd78ae8ce905e99bc82ec692b95
// PR c++/28148 struct foo { public: virtual int bar(int); }; void (foo::*__Virtual__foo__Var1)() = (void (foo::*)())(&foo::bar);
google
chromium
pr29043
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/pr29043.C
664
utf_8
e2c0aac4366618ed7bc4bd7d1af31fd2
// PR c++/29043 // { dg-do compile } struct S { int const i; // { dg-message "should be initialized" } }; class C { public: C() {} // { dg-error "uninitialized const member" } S s; }; struct S2 { int& ref; // { dg-message "should be initialized" } }; class C2 { public: C2() {} // { dg-error "uninitial...
google
chromium
save1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/save1.C
236
utf_8
7d8b7ff14410173fd3e1cb0594f72583
// PR c++/8748 // We were wrapping the ARRAY_REF in a SAVE_EXPR, causing us to try to make a bitwise // copy of b[0]. struct A { int i; }; struct B : A { virtual ~B(); }; struct C { B b[1]; }; void foo() { C().b[0].i; }
google
chromium
copy4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/copy4.C
413
utf_8
28ced8869a7baac26a49e3084bf7d851
// PR c++/9342 // into the reference temp used a bitwise copy. struct QString { QString( const QString & ); QString &operator=( const QString & ); }; struct ServerSettings { QString user; }; extern ServerSettings def(); extern void arg( const QString& a ); void startSession( bool b, QString s ) { arg (b...
google
chromium
pr25811-3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/pr25811-3.C
980
utf_8
769411a1c7958778a3d38ee85b470169
// { dg-do compile } struct A { int const i; }; struct B { int& i; }; struct C { int i; }; template< class T > class is_constructible_via_new_without_initializer { template<int> class size {}; typedef char yes_type; struct no_type { char data[2]; }; template <class U> static yes_type sfinae (siz...
google
chromium
synth2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/synth2.C
311
utf_8
618d3b43c166ae26e9e340c6831a133c
// PR c++/34180 struct G { G(); // { dg-message "" "candidate" } G(G&); // { dg-message "" "candidate" } }; class A // { dg-error "" } // { dg-message "candidate" "candidate note" { target *-*-* } 8 } { const G g; }; int main() { A a; A b = a; // { dg-message "required here|deleted" } }
google
chromium
reference3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/reference3.C
308
utf_8
8c2a05e86a5eb2a7a53230fcaf761060
// { dg-do compile } // This code used to be accepted but it is invalid as there is no // value initialization of a reference type. // PR c++/36695 template <typename T> T f() { T a = T(); // { dg-error "value-initialization of reference" } } int &a = f<int&>(); // { dg-message "required from here" }
google
chromium
copy2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/copy2.C
71
utf_8
c268699333b239c371d1bdc906ea54ad
// { dg-do compile } struct S { S (); }; volatile S s[1] = { S () };
google
chromium
array28
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/array28.C
139
utf_8
93d1f2b22f375dea4f3b14687d2d2b73
// PR c++/49669 struct Foo { explicit Foo(int) { } }; struct Goo { Goo() : x(Foo(4), Foo(5)) { } // { dg-error "array" } Foo x[2]; };
google
chromium
pm3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/pm3.C
175
utf_8
b8f980c062ec4b3f73dffbda8276ec70
// PR c++/12218 // { dg-do run } struct C { int i, j; }; typedef int C::*mPtr; extern const mPtr should_be_0 = &C::i; extern const mPtr should_be_4 = &C::j; int main () { }
google
chromium
static2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/static2.C
273
utf_8
5790ab7ca9ca7303a8c59f3dbcb9058e
// PR 14804 // { dg-do run } struct A { virtual void foo() = 0; }; struct B : public A { virtual void bar() = 0; }; typedef void (A::*mfptr)(); struct D { mfptr p; }; static const D ds[] = { { reinterpret_cast<mfptr>(&B::bar) }, }; int main() { return 0; }
google
chromium
array22
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/array22.C
142
utf_8
7f0b825cc0a026b71572eb45075bdc8a
// PR C++/29002 // We ICE trying to set the "zero" initializer on the incomplete // array struct A {}; int A::* x[]; // { dg-error "size" }
google
chromium
static3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/static3.C
258
utf_8
004975a4245800f0c34b34b9565fc427
// { dg-do run } struct T { static void (*handler)(); static void func() {} }; bool fail; struct S { S() { if (T::handler != T::func) fail = true; } }; static S s; void (*T::handler)() = func; int main() { if (fail) return 1; }
google
chromium
aggr6
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/aggr6.C
143
utf_8
769a94ec8a7e41cbb2ec24cc39f71dc1
// Origin PR c++/40239 // { dg-do compile } struct B { B() { } private: B(B const&); }; struct A { int a; B b; }; int main() { A a = {}; }
google
chromium
switch1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/switch1.C
118
utf_8
fb4e7d34dd521424475c02bd1379d218
int f(int c) { { case d: /* { dg-error "'d' was not declared" } */ int optBzip2 = true; } }
google
chromium
new15
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/new15.C
214
utf_8
22333fe39f0bec9273096c8bd851c7c4
// PR c++/9782 extern "C" void printf(const char*, ...); template <int> struct A { A() {printf("A::A()\n");} }; struct B { B() {printf("B::B()\n");} }; int main () { new A<0>[1][1]; new B [1][1]; }
google
chromium
array7
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/array7.C
154
utf_8
02cf876b0b0d2594118addc046b9112a
struct S { virtual void v () {} void f (const float g[3]); float h[3]; }; void g () { S s1, s2; s1 = s2; } void S::f (const float g[3]) {}
google
chromium
float1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/float1.C
224
utf_8
265ea5015e9eb7de8e1c6503d956e086
// PR c++/21089 // { dg-do run } extern "C" void abort(); static const double a = 1.0; struct S { S(); }; static S s; static const double b = a + 1.0; S::S() { if (b < 1.9 || b > 2.1) abort (); } int main () { }
google
chromium
dso_handle1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/dso_handle1.C
231
utf_8
b34354a9fccb98f99f3ac0bc14d8f157
// PR c++/17042 // { dg-do assemble } /* { dg-require-weak "" } */ // { dg-options "-fuse-cxa-atexit" } struct A { A(); ~A(); }; A a; extern "C" { void* __dso_handle __attribute__ ((__weak__)); } void f() { __dso_handle = 0; }
google
chromium
static-init2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/static-init2.C
80
utf_8
c0a507cb8b6bf9a5448427e537d93531
// PR c++/36912 // { dg-options -frounding-math } const double c = .1, d = c+1;
google
chromium
union2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/union2.C
195
utf_8
a2a29bef6924e38f49965c48ff606491
// PR c++/15938 // { dg-do compile } // { dg-options "" } typedef union { struct { int i; }; struct { char c; }; } A; A a = { 0 }; A b = {{ 0 }}; A c = {{{ 0 }}}; // { dg-error "braces" }
google
chromium
const5
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/const5.C
267
utf_8
d20e9e92d2904deda74fbcf84cb823bb
// PR c++/31449 class Foo {}; class Bar : public Foo {}; static const Foo *foo = 0; static Bar *bar = static_cast<const Bar*>(foo); // { dg-error "conversion" } void func(const Foo *foo) { Bar *bar = static_cast<const Bar*>(foo); // { dg-error "conversion" } }
google
chromium
null1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/null1.C
74
utf_8
554f34a22cd100ecfb39b5c4ab32947f
// PR c++/16489 const int NULL = 0; int main() { double* p = NULL; }
google
chromium
aggr4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/aggr4.C
96
utf_8
6c7823cc31b81149e4b16ea9c6189129
struct A { int i; }; A a1 = { 1 }; // ok A a2 = { a1 }; // { dg-error "cannot convert" }
google
chromium
dtor3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/dtor3.C
187
utf_8
5f5e01bbe7cb4844fd36654728665aa4
// PR c++/17976 // { dg-do run } extern "C" void abort(); struct A { static int i; A(){} ~A(){i++;if(i>1)abort();} }; int A::i = 0; A a; extern A a; int main() { return 0; }
google
chromium
ptrfn2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/ptrfn2.C
290
utf_8
c3eaccdcf8e35f944dee4d4b3d720336
// { dg-options "" } // { dg-do compile } // C++/30221 // We would ICE while trying to reshape the pointer to // member function element which is not needed. class abstract {}; typedef void (abstract::*fptr1) (short & s ) const; struct s {}; s array[] = { (fptr1)0 };// { dg-error "" }
google
chromium
const3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/const3.C
119
utf_8
88f5c7af426aec933b525e2bb17b1b0d
// { dg-do run } struct S { static const int i = 3; }; const int S::i; int main () { if (!S::i) return 1; }
google
chromium
new26
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/new26.C
584
utf_8
d20a83f8968c6c9a1d648762dc1a9e2c
// PR c++/33407 // { dg-do run } // { dg-options "-O2 -fstrict-aliasing" } extern "C" void * malloc(__SIZE_TYPE__); extern "C" void abort(void); void *p; void __attribute__((noinline)) init(void) { p = malloc(4); } inline void *operator new(__SIZE_TYPE__) { return p; } inline void operator delete (void*) {} in...
google
chromium
array8
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/array8.C
99
utf_8
4ab5bb9dc38b78d749ba584adefbdc33
struct A { A (); }; struct B { A a1; A a2; }; A a; struct B b[] = { { a, a }, { a, a } };
google
chromium
goto1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/goto1.C
229
utf_8
a2c1054568281f6408f992ee29e5680b
// PR c++/14724 // { dg-do run } int j; template <class T> struct C { C() { ++j; } ~C() { --j; } }; int main(int, char **) { { int i = 0; again: C<int> v; if (++i < 10) goto again; } return j; }
google
chromium
copy1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/copy1.C
195
utf_8
641df0a856e9b4cd6a3fe6823eda796c
// { dg-do compile } class A { public: A(){} A( const A& a ){} }; class B : public A { public: B( int& s) : s_(s){} int& s_; }; int main() { int i; B x1( i ); B x2( x1 ); }
google
chromium
complex1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/complex1.C
136
utf_8
0f7623c102a38caadf3ad160abd647cf
/* PR c++/21210 */ /* { dg-do compile } */ /* { dg-options "-O2" } */ typedef float __complex__ fcomplex; fcomplex cplx = fcomplex();
google
chromium
call1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/call1.C
482
utf_8
37e3aaafda06e7a49338706d936ff70f
// Bug c++/16115 // { dg-options "-O2" } extern "C" void abort(); int count = 0; struct T { T() { count++; } T(const T&) { count++; } ~T() { if (count==0) abort(); --count; } }; struct auto_ptr { T* p; auto_ptr(T* __p) : p(__p) { } ~auto_ptr() { delete p; } T* release()...
google
chromium
vector1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/vector1.C
1,182
utf_8
e4ace0ef4caaae06eef685ccaefd464e
// PR c++/19263 // { dg-do run } // { dg-options "-O2 -fpermissive" } // { dg-prune-output "narrowing" } typedef signed char v8qi __attribute__ ((vector_size (8))); extern "C" void abort (void); static unsigned char S[16]; struct A { int i; v8qi j, k; int l; }; void foo (unsigned char v) { A a = { 1, { v, ...
google
chromium
for2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/for2.C
172
utf_8
01eca483f7382cb5c35dcad5558f08b1
// { dg-do compile } // PR 16012: Got the scope of I incorrect in templates only. template<int> void foo() { for (int i=0 ;;) ; int i; } void bar() { foo<0>(); }
google
chromium
ctor4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/ctor4.C
257
utf_8
47ae2ae0f865672f6096af3cfbe8bf60
// PR c++/17788 // { dg-do compile } class foo { public: foo(); }; class bar: public foo { // { dg-error "reference|bar::bar" } private: int &a; }; foo::foo() { } int main(int argc, char **argv) { bar x; // { dg-message "synthesized|deleted" } }
google
chromium
ptrmem4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/ptrmem4.C
159
utf_8
a044d5ddcfc1b75d76300d577f3b92fb
// PR c++/32245 // { dg-do run } struct foo { int mem1; int foo::* mem2; }; int main () { foo x = { 0 } ; if (x.mem2 != foo().mem2) return 1; }
google
chromium
ref8
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/ref8.C
167
utf_8
7d3e4afff4fce557d4ee66f8d865c7d9
struct A { A operator=(const A&); }; A operator*(A, A); A& operator+=(A& a, const A& b) { return a = a * b; // { dg-error "non-const reference" } }
google
chromium
struct1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/struct1.C
105
utf_8
58b4c5838fafdec40fe718447129945f
struct bug { const char *name; __SIZE_TYPE__ type; }; struct bug s = { 0, (__SIZE_TYPE__) &s | 1 };
google
chromium
array15
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/array15.C
715
utf_8
4b343cab41b920a5cd17c596fa24cc6f
// { dg-do run } struct foo { unsigned char buffer[4111222]; foo() ; bool check () const; }; foo::foo () : buffer() {} bool foo::check () const { for (unsigned ix = sizeof (buffer); ix--;) if (buffer[ix]) return false; return true; } void *operator new (__SIZE_TYPE__ size, void *p) { return p; }...
google
chromium
new13
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/new13.C
222
utf_8
6cc3a43ec721a6a41801bdc9bc2a8a18
// PR c++/22508 // ICE on invalid operator new // { dg-do compile } struct A { void* operator new(__SIZE_TYPE__) throw(X); // { dg-error "expected|type" } }; A* p = new A;
google
chromium
array3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/array3.C
373
utf_8
0212d2961b78684e39260cc7bf7ae66a
// PR c++/6331 // Bug: we were generating a badly cv-qualified ARRAY_TYPE in the // synthesized copy constructor for A, which then became the canonical // version, confusing later uses. struct A { virtual ~A(); const float* f(); float fa[3]; }; struct B { B(const A& ai) : a (ai) {} A a; }; void g (const fl...
google
chromium
union1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/union1.C
59
utf_8
a94d2ff7c7a43d0764a116004fa30738
// PR c++/14401 union U { int& i; // { dg-error "" } };
google
chromium
array4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/array4.C
429
utf_8
dafd4fb071c88ff21250002b43675816
// { dg-do compile } // PR c++/6944 // Fail to synthesize copy constructor of multi-dimensional // array of class. #include <string> class Array { public: std::string m_array[10][20][30]; }; Array func() { Array result; return result; // sorry, not implemented: cannot initialize multi-dimensional array with in...
google
chromium
new24
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/new24.C
402
utf_8
55a9e7ab7780295582670cb7aa2e312f
// PR c++/33025 // { dg-do compile } // { dg-options "-O2" } typedef __SIZE_TYPE__ size_t; inline void *operator new (size_t, void *p) throw () { return p; } extern "C" void abort (); int main() { const unsigned num = 10; unsigned *data = new unsigned[num]; unsigned *ptr = new (data) unsigned (num); static un...