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
array10
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/array10.C
124
utf_8
52be26e8b242500ae671c570de13a1a7
// { dg-do compile } // { dg-options "" } typedef int __attribute__((vector_size (8))) vec; vec foo[] = { (vec) {1, 2} };
google
chromium
array17
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/array17.C
115
utf_8
bebae7e64d01c783fefaf2f358272230
// { dg-do compile } class StringMap { const char empty_str[1]; public: StringMap() : empty_str() {} };
google
chromium
brace4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/brace4.C
117
utf_8
fa25c5dda11ffc85ea36955456c3fbe8
// PR c++/16859 // { dg-do compile } // { dg-options "-pedantic" } int a[] = { }; // { dg-error "zero-size array" }
google
chromium
global1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/global1.C
338
utf_8
4c0fd932ebbc4629dbb229edf363e946
// PR c++/18416 class errarg { enum { EMPTY } type; public: errarg(); }; extern errarg empty_errarg; extern void errprint(const char *, const errarg &arg1 = empty_errarg, const errarg &arg2 = empty_errarg, const errarg &arg3 = empty_errarg); errarg::errarg() : type(EMPTY) { } erra...
google
chromium
aggr5
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/aggr5.C
144
utf_8
b13f6872740c13eeb5b260b78e7c78dd
// Origin PR c++/40239 // { dg-do compile } struct B { B() { } private: B(B const&); }; struct A { int a; B b; }; int main() { A a = {0}; }
google
chromium
ctor9
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/ctor9.C
124
utf_8
c55d67e7ef83de8fc0fa30f01b68f5f7
// PR c++/38427 // { dg-do compile } struct S { int &ref; S() : ref() {}; // { dg-error "value-initialization of" } };
google
chromium
new5
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/new5.C
278
utf_8
165b53a00e07117f81b4b42f0b88ed5c
// { dg-do run } #include <new> void * operator new[](std::size_t, std::nothrow_t const &) throw() { return 0; } struct X { struct Inner { ~Inner() {} }; X() { Inner * ic = new (std::nothrow) Inner[1]; // SegFault here } }; int main() { X table; }
google
chromium
pr20039
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/pr20039.C
208
utf_8
aa579892dca36d8b110a8b13f1664a4a
// PR c++/20039 // { dg-do compile } struct M { M() : m(0) { } int m; }; struct X { M m; int i; }; int mymain() { const X *p = new const X[2]; // { dg-error "uninitialized const" } return 0; }
google
chromium
empty1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/empty1.C
575
utf_8
d2ea13322f402d3ce506a9a1106ee836
// { dg-do run } // padding. Which clobbers whatever they overlay. class EmptyBase0 {}; class EmptyBase1 : public EmptyBase0 {}; class Base1 { public: unsigned int t_; Base1(unsigned int t) : t_(t) {} }; class PEPE : public Base1, public EmptyBase1 { public: PEPE(unsigned int t) : Base1(t), EmptyBase1(EmptyBase1()) {...
google
chromium
new21
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/new21.C
134
utf_8
c9a8d831104ecec8c5233bd81e720061
// PR c++/32251 struct A { A(); void operator delete(void *, ...); }; void foo () { new A; // { dg-warning "deallocation" } }
google
chromium
addr-const1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/addr-const1.C
714
utf_8
835b43db313003f4551ea74731f1362c
// { dg-do run } // PR 9881. address-constant-expression not static initialized struct bar { double p; }; // bar bar v; static bool error = false; struct foo { static double *a; static double *b; static double storage; }; struct baz { baz () { if (foo::a != &v.p) error = true; if (foo::b !=...
google
chromium
value3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/value3.C
541
utf_8
f5892df2ecb52226b652c40258f42f73
// Testcase for value-initialization in new-expressions. // { dg-do run } #include <stdlib.h> #include <string.h> // Make sure that we return memory that isn't already set to 0. void *operator new(size_t s) { void *p = malloc (s); memset (p, 42, s); return p; } struct A { A() {} ~A() {} }; struct B { A a; int ...
google
chromium
ref6
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/ref6.C
106
utf_8
f75e860b2c4af1d147a082d96b6d7806
struct B { void g() { } }; struct A { void f() { B &b = b; b.g(); } }; int main(void) { }
google
chromium
ptrfn1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/ptrfn1.C
148
utf_8
697d82f637fb8839d98efadd58ededf5
// PR c++/29016 // { dg-options "-O2" } class A; class B { typedef void (*C[5]) (A *); static C D; static void E (A*) {} }; B::C B::D={E};
google
chromium
reference1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/reference1.C
249
utf_8
14fd5d851c700287b535c91b481fe0cf
// { 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 int main() { typedef int& T; T a = T(); // { dg-error "value-initialization of reference" } }
google
chromium
new19
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/new19.C
1,253
utf_8
2e14de5f82a334a88354de9073763969
// { dg-do compile } // { dg-options "-O2 -fstrict-aliasing -fdump-tree-pre-details" } // Make sure we hoist invariants out of the loop even in the presence // of placement new. This is similar to code in tramp3d. typedef __SIZE_TYPE__ size_t; inline void* operator new(size_t, void* __p) throw() { return __p; } te...
google
chromium
enum2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/init/enum2.C
104
utf_8
ca9a6dc8d27f3cf82314cfcd92133441
#include <limits.h> enum test { z = 0, c = UINT_MAX + 1LL } x = z; int main() { return x != z; }
google
chromium
dr127
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/tc1/dr127.C
582
utf_8
3592a0b845ee849a03440c75d39ae12b
// { dg-do link } // Origin: Giovanni Bajo <giovannibajo at gcc dot gnu dot org> // DR127: Ambiguity in description of matching deallocation function #include <cstddef> #include <new> struct A { // placement new, but can be called through normal new syntax. void* operator new(std::size_t size, float = 0.0f) { ...
google
chromium
dr48
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/tc1/dr48.C
227
utf_8
9c539eaced56bf5f6dfcc87de03577a2
// { dg-do link } // Origin: Giovanni Bajo <giovannibajo at gcc dot gnu dot org> // DR48: Definitions of unused static members struct A { static const int size = 10; int array[size]; }; int main() { A a; return 0; }
google
chromium
dr108
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/tc1/dr108.C
355
utf_8
86960e6cb501196eef5cc23d207d7473
// { dg-do compile } // Origin: Giovanni Bajo <giovannibajo at gcc dot gnu dot org> // DR108: Are classes nested in templates dependent? template <class T> struct S { struct I1 { typedef int X; }; struct I2 : public I1 { X x; // { dg-error "does not name a type" "name" } // { dg-message "note" "n...
google
chromium
dr193
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/tc1/dr193.C
784
utf_8
95dff81e87b633f2db332adf927b41fb
// { dg-do run } // Origin: Giovanni Bajo <giovannibajo at gcc dot gnu dot org> // DR193: Order of destruction of local automatics of destructor extern "C" void abort(void); namespace N1 { bool a_done = false; struct A { ~A() { a_done = true; } }; struct B { ~B() { if (...
google
chromium
dr68
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/tc1/dr68.C
306
utf_8
6a9b2ff3865ebd4b9b4a24ea9e5fa1e0
// { dg-do compile } // Origin: Giovanni Bajo <giovannibajo at gcc dot gnu dot org> // DR68: Grammar does not allow "friend class A<int>;" namespace A{ class B{}; } namespace B{ class A{}; class C{ friend class ::A::B; }; } template <typename> class K; class J { friend class K<int>; };
google
chromium
dr52
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/tc1/dr52.C
504
utf_8
be0dd419c395588111addfd87e31b3fe
// { dg-do compile } // Origin: Giovanni Bajo <giovannibajo at gcc dot gnu dot org> // DR52: Non-static members, member selection and access checking struct A { void foo(void); }; struct B { private: void foo(void); }; struct B1 : B {}; struct B2 : B {}; struct C { // { dg-error "C" } void foo(void); }; str...
google
chromium
dr194
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/tc1/dr194.C
239
utf_8
11d8e489cc200e109dbdfe58fd9c1fcf
// { dg-do compile } // Origin: Giovanni Bajo <giovannibajo at gcc dot gnu dot org> // DR194: Identifying constructors struct A { inline explicit A(); }; template <class> struct B { inline explicit B(); }; template struct B<void>;
google
chromium
dr176
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/tc1/dr176.C
855
utf_8
302c9ff5944026043db8e45e1d6b729d
// { dg-do compile } // Origin: Giovanni Bajo <giovannibajo at gcc dot gnu dot org> // DR176: Name injection and templates namespace N1 { template <class T> struct Base { Base* p; Base<T*>* p2; ::Base* p3; // { dg-error "" "" } }; template <class T> struct Derived: public Base<T> { Base* p; ...
google
chromium
dr74
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/tc1/dr74.C
198
utf_8
99fbd5404170a32ec3b81a4c87114aa9
// { dg-do compile } // Origin: Giovanni Bajo <giovannibajo at gcc dot gnu dot org> // DR74: Enumeration value in direct-new-declarator struct A {}; enum E1 { COUNT = 10 }; A* a = new A[COUNT];
google
chromium
dr142
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/tc1/dr142.C
810
utf_8
a6d46728c39c24256b63197af59b95f1
// { dg-do compile } // Origin: Giovanni Bajo <giovannibajo at gcc dot gnu dot org> // DR142: Injection-related errors in access example class B { // { dg-error "inaccessible" } public: int mi; // { dg-error "inaccessible" } static int si; // { dg-error "inaccessible" } };...
google
chromium
dr1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/tc1/dr1.C
426
utf_8
f660af37e71a300b94fc53e6bc686185
// { dg-do compile } // Origin: Giovanni Bajo <giovannibajo at gcc dot gnu dot org> // DR1: What if two using-declarations refer to the same function but the // declarations introduce different default-arguments? namespace A { extern "C" void f(int = 5); } namespace B { extern "C" void f(int = 5); } using...
google
chromium
dr94
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/tc1/dr94.C
209
utf_8
2b6b832186c8ccf57001b2888f9dec54
// { dg-do compile } // Origin: Giovanni Bajo <giovannibajo at gcc dot gnu dot org> // DR94: Inconsistencies in the descriptions of constant expressions struct S { static const int c = 5; }; int a[S::c];
google
chromium
dr128
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/tc1/dr128.C
325
utf_8
1b0c9fccd7b07ffc338e9e9ca4dbb8c0
// { dg-do run } // Origin: Giovanni Bajo <giovannibajo at gcc dot gnu dot org> // DR128: Casting between enum types extern "C" void abort(void); enum E1 { BLACK = 0, RED = 1 }; enum E2 { WHITE = 0, YELLOW = 1}; int main(void) { E1 e1 = RED; E2 e2 = static_cast<E2>(e1); if (e2 != YELLOW) abort(); return ...
google
chromium
dr185
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/tc1/dr185.C
489
utf_8
9704d0caf0975b804de4cf5a0218a1db
// { dg-do run } // Origin: Giovanni Bajo <giovannibajo at gcc dot gnu dot org> // DR185: "Named" temporaries and copy elision extern "C" void abort(void); struct A { mutable int value; explicit A(int i) : value(i) {} void mutate(int i) const { value = i; } }; int foo() { A const& t = A(1); A n(t); ...
google
chromium
dr20
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/tc1/dr20.C
479
utf_8
0af12371ac925505bc0a0b0b9c2aa770
// { dg-do run } // Origin: Giovanni Bajo <giovannibajo at gcc dot gnu dot org> // DR20: Some clarifications needed for 12.8 para 15 extern "C" void printf(const char*, ...); extern "C" void abort(void); int count = 0; class Thing { public: Thing() { } ~Thing() { } Thing(const Thing&) { count += 1; ...
google
chromium
dr213
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/tc1/dr213.C
467
utf_8
0014574b059f89b52e31c871b381619b
// { dg-do compile } // Origin: Giovanni Bajo <giovannibajo at gcc dot gnu dot org> // DR213: Lookup in dependent base classes // We should emit an error at *instantiation* time because g(t) can't be // resolved to any function. template <class T> struct A : T { void h(T t) { f(t); g(t); // { dg-messag...
google
chromium
dr164
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/tc1/dr164.C
244
utf_8
3e61e5bdc2b1492780331f39f942586f
// { dg-do link } // Origin: Giovanni Bajo <giovannibajo at gcc dot gnu dot org> // DR164: Overlap between Koenig and normal lookup void f(int); template <class T> void g(T t) { f(t); } enum E { e }; void f(E) {} int main() { g(e); }
google
chromium
dr188
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/tc1/dr188.C
271
utf_8
007afeacb36d4756871511f3e7e8ea6f
// { dg-do compile } // Origin: Giovanni Bajo <giovannibajo at gcc dot gnu dot org> // DR188: Comma operator and rvalue conversion template <bool> struct StaticAssert; template <> struct StaticAssert<true> {}; char arr[100]; StaticAssert<(sizeof(0,arr) == 100)> check;
google
chromium
dr90
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/tc1/dr90.C
310
utf_8
bf475bf32acceb9eb23c5b5b7013f7fe
// { dg-do compile } // Origin: Giovanni Bajo <giovannibajo at gcc dot gnu dot org> // DR90: Should the enclosing class be an "associated class" too? struct A { union U {}; friend void f(U); }; struct B { struct S {}; friend void f(S); }; int main() { A::U u; f(u); B::S s; f(s); }
google
chromium
dr85
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/tc1/dr85.C
255
utf_8
c241bed1d85ccf57402c8efd46ab9b8c
// { dg-do compile } // Origin: Giovanni Bajo <giovannibajo at gcc dot gnu dot org> // DR85: Redeclaration of member class struct Base { struct Data {}; struct Data; // { dg-error "" "redeclaration of nested class is invalid" { xfail *-*-* } } };
google
chromium
dr147
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/tc1/dr147.C
1,430
utf_8
d27184a30c6a141a8b1f534715991dd8
// { dg-do compile } // Origin: Giovanni Bajo <giovannibajo at gcc dot gnu dot org> // DR147: Naming the constructor (PR 11764) namespace N1 { struct A { A(); void f(); }; struct B: public A { B(); }; A::A() { } B::B() { } B::A ba; A::A a; // { dg-error "constructor" "the injected-class-name can never be found thr...
google
chromium
dr159
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/tc1/dr159.C
234
utf_8
9b56ad73b780b825e0de60463c83386f
// { dg-do compile } // Origin: Giovanni Bajo <giovannibajo at gcc dot gnu dot org> // DR159: Namespace qualification in declarators namespace N { namespace M { void f(); void g(); } void M::f(){} void N::M::g(){} }
google
chromium
dr135
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/tc1/dr135.C
352
utf_8
0af74303a4251b24669c368429e4af91
// { dg-do compile } // Origin: Giovanni Bajo <giovannibajo at gcc dot gnu dot org> // DR135: Class type in in-class member function definitions struct S { S f() { return S(); } // { dg-bogus "" "incomplete class type is allowed as return type" } void g(S) { } // { dg-bogus "" "incomplete class type is ...
google
chromium
dr101
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/tc1/dr101.C
875
utf_8
62fa96d1dd89c22b15cbfa1242477ca4
// { dg-do compile } // Origin: Giovanni Bajo <giovannibajo at gcc dot gnu dot org> // DR101: Redeclaration of extern "C" names via using-declarations namespace Test1 { typedef unsigned int X; extern "C" void f1(); namespace N { typedef unsigned int X; extern "C" void f1(); } using N::f1; // { dg-b...
google
chromium
dr166
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/tc1/dr166.C
1,520
utf_8
15182708f6c74ee671eae0494b001aa4
// { dg-do compile } // Origin: Giovanni Bajo <giovannibajo at gcc dot gnu dot org> // DR166: Friend declarations of template-ids namespace N { template <class T> void f(T); void g(); namespace M { class A { friend void f<int>(int); // N::f static int x; // { dg-error "private" } }; ...
google
chromium
dr76
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/tc1/dr76.C
252
utf_8
4dd95811a9583fd5b2412c2c99d7dff9
// { dg-do compile } // Origin: Giovanni Bajo <giovannibajo at gcc dot gnu dot org> // DR76: Are const volatile variables considered "constant expressions"? volatile const int a = 5; template <int> struct K; template struct K<a>; // { dg-error "" }
google
chromium
dr49
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/tc1/dr49.C
590
utf_8
2d505ce906bacb84abf98000ee1f70ad
// { dg-do compile } // Contributed by: Giovanni Bajo <giovannibajo at gcc dot gnu dot org> // DR 49: Non-constant pointers are invalid template arguments. template<int *a> struct R { /* ... */ }; template<int b[5]> struct S { /* ... */ }; int p; template struct R<&p>; // OK template struct S<&p>; // OK due to parame...
google
chromium
dr137
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/tc1/dr137.C
300
utf_8
a6b204a1733f1ef91a83ebba5d3a48be
// { dg-do compile } // Origin: Giovanni Bajo <giovannibajo at gcc dot gnu dot org> // DR137: static_cast of cv void* struct A; const void* v; void foo(void) { (void)static_cast<const volatile A *>(v); (void)static_cast<A *>(v); // { dg-error "" "static_cast cannot remove cv qualifiers" } }
google
chromium
dr161
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/tc1/dr161.C
649
utf_8
62aa8921c6705fdab59b10a7be7f39b9
// { dg-do compile } // Origin: Giovanni Bajo <giovannibajo at gcc dot gnu dot org> // DR161: Access to protected nested type namespace N1 { struct A { protected: typedef int type; }; struct B : public A { void test(void) { A::type t; } friend void ftest(void) { A::t...
google
chromium
dr80
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/tc1/dr80.C
717
utf_8
fddf6e4104e367506b1483b55a539b63
// { dg-do compile } // Origin: Giovanni Bajo <giovannibajo at gcc dot gnu dot org> // DR80: Class members with same name as class struct A { int A; }; struct A2 { static int A2; // { dg-error "same name as" } }; template <class> struct A3 { int A3; }; template <class> struct A4 { static int A4; // { d...
google
chromium
dr179
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/tc1/dr179.C
291
utf_8
54a7e43eb51f59e7eae694e23b7ef1f6
// { dg-do compile } // Origin: Giovanni Bajo <giovannibajo at gcc dot gnu dot org> // DR179: Function pointers and subtraction void foo(void); typedef void (*fp)(void); int main() { fp f1 = foo; fp f2 = foo; (void)f2-f1; // { dg-error "" "cannot subtract pointers to function" } }
google
chromium
dr152
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/tc1/dr152.C
865
utf_8
6fe3b87e65dbf5ee049cce922f6dffb4
// { dg-do compile } // Origin: Giovanni Bajo <giovannibajo at gcc dot gnu dot org> // DR152: explicit copy constructors namespace N1 { struct X { X(); // { dg-message "note" } explicit X(const X&); }; void f(X); // { dg-error "initializing" } int foo() { X x; f(x); // { dg-error ...
google
chromium
dr217
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/tc1/dr217.C
431
utf_8
d227f60fa4be5b52028628722cfa4992
// { dg-do compile } // Origin: Giovanni Bajo <giovannibajo at gcc dot gnu dot org> // DR217: Default arguments for non-template member functions of class // templates template <class T> struct S { void foo (int); }; template <class T> void S<T>::foo (int = 0) // { dg-error "" "default arguments for parameters ...
google
chromium
expr1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/diagnostic/expr1.C
100
utf_8
3127905a449847bc27a84d6b88588e2a
// PR c++/50059 int i; struct A { }; void f(A); void g() { f(i = 0); // { dg-error "i = 0" } }
google
chromium
parm1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/diagnostic/parm1.C
254
utf_8
87d8d501c7c4afd85a94fca95720d273
// PR c++/44366 // While printing the operand of sizeof We were trying to print f as the // scope of t, causing infinite recursion. template <typename T> void f(T t, int(*)[sizeof(t)]) { struct A { void g() { foo; // { dg-error "foo" } } }; }
google
chromium
bitfld1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/diagnostic/bitfld1.C
211
utf_8
424dce5e3d57a2b34afe27e7bbf2592d
// PR c++/46001 // { dg-do compile } struct S { char *p; unsigned char f : 1; }; struct S s; void *a = s.p | s.f; // { dg-error "unsigned char:1" } // { dg-bogus "__java_boolean" "" { target *-*-* } 11 }
google
chromium
bindings1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/diagnostic/bindings1.C
381
utf_8
d7dcca6cdb24ff15a17be482e130bf4e
// PR c++/45487 // { dg-do run } extern "C" int strcmp(const char*, const char*); template <typename T> const char* foo(T, typename T::type c) { return __PRETTY_FUNCTION__; } struct x {typedef int type;}; int main() { if (strcmp (foo(x(), 3), "const char* foo(T, typename T::type) " "[with T = x; typename ...
google
chromium
aka1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/diagnostic/aka1.C
296
utf_8
74a973a9bb2225ddd4f1d24ed76803df
// Basic test for typedef stripping in diagnostics. struct A { void f(); }; void A::f() { // We don't want an aka for the injected-class-name. A a = 0; // { dg-error "type .A. requested" } } typedef A B; // We do want an aka for a real typedef. B b = 0; // { dg-error "B .aka A." }
google
chromium
method1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/diagnostic/method1.C
234
utf_8
dd4bb7f33bab2d29dadf5116c6327414
// PR c++/44627 // { dg-do compile } struct A { A *foo (); }; template <class T> void bar () { A::foo ().anything; // { dg-error "request for member" } } void baz () { bar <int> (); } // { dg-prune-output "without object" }
google
chromium
bitfld2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/diagnostic/bitfld2.C
265
utf_8
3b47f7b0378980c46be440deb807fc41
// PR c++/33840 // { dg-do compile } template<int> struct A { struct {} : 2; // { dg-error "expected ';' after struct" } }; // { dg-error "ISO C.. forbids declaration" "" { target *-*-* } 6 } // { dg-error "ISO C.. prohibits anonymous" "" { target *-*-* } 6 }
google
chromium
pr42681
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/graphite/pr42681.C
342
utf_8
012194f3f4441fc0dc8fb4ba94a8882b
/* { dg-options "-O1 -fgraphite-identity -fno-loop-block -fno-loop-interchange -fno-loop-strip-mine" } */ typedef __SIZE_TYPE__ size_t; inline void* operator new(size_t, void* __p) throw() { return __p; } struct A { int i, j; A() : i(0) {} }; void Init(A *a) { for (int i = 0; i < 20; i++) { new (&a[i]) A; ...
google
chromium
pr43026
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/graphite/pr43026.C
1,172
utf_8
4cf735ba9e5b65e201dbbd4ec916b359
/* { dg-do compile } */ /* { dg-options "-O2 -fgraphite-identity" } */ template<typename Tp > class vector { }; template <int rank, int dim> class Tensor; template <int dim> class Tensor<1,dim> { public: Tensor (const Tensor<1,dim> &); private: double values[(dim != 0) ? (dim) : 1]; }; template <int dim> #ifdef...
google
chromium
pr42130
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/graphite/pr42130.C
302
utf_8
dcecc8a81073a9824c153ff083f81a4a
/* { dg-options "-O2 -fgraphite-identity -fno-tree-ch" } */ #include <vector> using std::vector; vector<unsigned> & __attribute__((noinline, noclone)) foo(unsigned n) { vector<unsigned> *vv = new vector<unsigned>(n, 0u); return *vv; } int main() { foo(0); return 0; } /* { dg-do run } */
google
chromium
pr39447
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/graphite/pr39447.C
930
utf_8
5c6a1178f4fd620e8792644c534c29f8
/* { dg-options "-O2 -fgraphite-identity" } */ struct Point { int line, col; Point( int l = -1, int c = 0 ) throw() : line( l ), col( c ) {} bool operator==( const Point & p ) const throw() { return ( line == p.line && col == p.col ); } bool operator<( const Point & p ) const throw() { return ( line < p.l...
google
chromium
id-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/graphite/id-1.C
1,045
utf_8
de81689ffe7845348fd7504b61336c82
#include <vector> template <int rank, int dim> class Tensor; template <int dim> class Tensor<1,dim> { public: explicit Tensor (const bool initialize = true); Tensor (const Tensor<1,dim> &); double values[(dim!=0) ? (dim) : 1]; }; template <int dim> Tensor<1,dim>::Tensor (const Tensor<1,dim> &p) { for (...
google
chromium
pr41305
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/graphite/pr41305.C
8,492
utf_8
8b5bc8519c7a0bd3c7d9c018b0e608ea
// { dg-do compile } // { dg-options "-O3 -floop-interchange -Wno-conversion-null" } void __throw_bad_alloc (); template <typename _Tp> void swap (_Tp & __a, _Tp __b) { __a = __b; } template <typename _Category> struct iterator { typedef _Category iterator_category; }; template <typename _Tp> struct allocator {...
google
chromium
pr42930
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/graphite/pr42930.C
1,264
utf_8
0d9af772788367ff2013140aaacad333
/* { dg-options "-O1 -floop-block" } */ typedef unsigned char byte; typedef unsigned int uint; typedef unsigned char uint8; namespace Common { class NonCopyable { }; template<class In, class Out> Out copy(In first, In last, Out dst) { while (first != last) *dst++ = *first++; } template<class T> class Array { uint ...
google
chromium
pr41562
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/graphite/pr41562.C
582
utf_8
e5bf55fca0fdd72d0227e8f96a248045
/* { dg-do compile } */ /* { dg-options "-O -ftree-loop-distribution -floop-block" } */ typedef struct stSirenEncoder { } *SirenEncoder; int Siren7_EncodeFrame(SirenEncoder encoder, unsigned char *DataIn, unsigned char *DataOut) { int number_of_regions; static int absolute_region_power_index[28] = {0}; stati...
google
chromium
scope1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/overload/scope1.C
125
utf_8
1bd540977a3ebf0e74db36e595b11998
// PR c++/9868 template <typename T> struct D { void (*p)(); void clear() { D::p(); } }; template class D<bool>;
google
chromium
addr1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/overload/addr1.C
713
utf_8
31a1eb67025f875651678e52a1e2b3d1
// { dg-do run } // PR c++/11788 we failed to instantiate a decl, and we lost some side // effects static int flag = 0; template <typename> struct A { A &active () { flag++;} static void foo() {} static void bar () {} static void bar (int) {} int m; }; void (*baz ()) () { A<int> a; return &a.activ...
google
chromium
template3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/overload/template3.C
351
utf_8
77913297a13e3346eae87df8ebe54edd
// PR c++/33962 // { dg-do compile } template <class T> struct A; template <class U> void foo (const U &x, ...); template <class T> void foo (const A<T> &x, ...); void bar (const A<int> &x, const char *y) { foo (x, y); } /* { dg-final { scan-assembler "_Z3fooIiEvRK1AIT_Ez" } } */ /* { dg-final { scan-assembler-no...
google
chromium
arg5
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/overload/arg5.C
285
utf_8
2462790168c7dfd3a860d6ca77ecec30
// PR c++/34111 class QChar { }; struct QString { QString(QChar); }; struct QPainter { void drawText (int x, int y, const QString &); }; class KHEChar:public QChar { public:KHEChar (QChar C); }; void drawByte (QPainter * P, char, KHEChar B) { P->drawText (0, 0, B); }
google
chromium
defarg1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/overload/defarg1.C
148
utf_8
877335e5c928622631b75a257e67bd77
// PR c++/5247 template<typename T> int foo (T t, int = foo(T())); struct A { }; int main() { foo(A()); // { dg-error "default argument" } }
google
chromium
template5
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/overload/template5.C
513
utf_8
d27489435ea49d237a1e1a1619e9661b
// { dg-do compile } template<typename T> int low(T a, T b, T c) { return a + b + c; } // { dg-message "template" } template<typename T> int high(T a, T b, T c) { return a + b + c; } // { dg-message "template" } int test (void) { low (5, 6); // { dg-error "no matching function" } // { dg-message "(candidate|3 ...
google
chromium
member1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/overload/member1.C
399
utf_8
53b4a1648421c533b9cf26423d529dc0
// { dg-do compile } struct X { template<typename T> static void ProcessProxy (); typedef void (*Callback) (); void Process (Callback); template<typename T> void Process () { Process (&ProcessProxy<T>); } }; void foo (X *x) { x->Process<int> (); }
google
chromium
builtin3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/overload/builtin3.C
164
utf_8
63766fb1bce3bab4ad17a59d07a272d2
// PR c++/11409 // { dg-do compile } namespace std { double fabs (double); } using std::fabs; double (*p) (double) = &fabs; // { dg-bogus "is ambiguous" "" }
google
chromium
error2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/overload/error2.C
308
utf_8
e4753bb05dc59e57b5bb60b1877f1fc1
struct A { void foo(); // { dg-error "with" "" } virtual void foo(); // { dg-error "cannot be overloaded" "" } };
google
chromium
template4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/overload/template4.C
742
utf_8
be74c01840f65736064ba4a3405bbb21
// PR c++/35986 // { dg-do compile } namespace { template <int> void foo (...); // { dg-message "foo" } template <int> void bar (int, ...); // { dg-message "bar" } void baz (...); // { dg-message "baz" } } template <int> void foo (...); // { dg-message "note" } template <int> void bar (int, ...); // { dg-mes...
google
chromium
ambig2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/overload/ambig2.C
562
utf_8
ea3127f4b42d821f844905a93809eb92
// Bug: g++ thought that the QChar overload was a viable but ambiguous // candidate. It isn't viable, because there's no conversion from const // char * to QChar. class QChar { public: QChar( char c ); QChar( unsigned char c ); }; class QString { public: QString( const char *str ); // dee...
google
chromium
error3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/overload/error3.C
1,095
utf_8
43125e7142193f05f89e39acd6ccf335
// PR c++/42701 // Test for error-recovery on code that is ill-formed by DR 147. namespace Glib { class ustring { public: typedef unsigned size_type; ustring(const char* src, size_type n); ustring(const char* src); }; } namespace Gdk { class Color { public: explicit ...
google
chromium
rvalue1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/overload/rvalue1.C
168
utf_8
14e68b07c04d0b27c8221cd9eeab2703
// PR c++/42655 void unused(const bool &) { } int main() { volatile bool x = false; unused(!!x); // type of "!x" is bool unused(!x); // type of "!x" is bool }
google
chromium
builtin2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/overload/builtin2.C
128
utf_8
3a79826fd499e94593a88f2c06436f3d
namespace __gnu_cxx { void llabs(long long x); } namespace std { using __gnu_cxx::llabs; using __gnu_cxx::llabs; }
google
chromium
autoptr1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/overload/autoptr1.C
381
utf_8
1e41ec11ca00276315dd010f205f9f90
// PR c++/35773 template< typename T > class auto_ptr { struct auto_ptr_ref { }; public: auto_ptr(auto_ptr&); auto_ptr(auto_ptr_ref); operator auto_ptr_ref(); }; template< typename T > class reference_wrapper { public: reference_wrapper(T& t); operator T& () const; }; struct X { }; void f(auto_ptr< X >...
google
chromium
arg4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/overload/arg4.C
382
utf_8
494fd275c1d67e2ced55a80500cbedec
// { dg-do compile } struct A {}; struct B : A { B(int); B(B&); B(A); }; struct C { operator B () const; }; void foo(B); void bar() { C c;
google
chromium
defarg4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/overload/defarg4.C
375
utf_8
fe0dbe1f81b80b364b6cd8c9b5d5967e
// Origin PR c++/39987 // { dg-do compile } class foo { template<typename U> static bool func(const U& x) {} public: template<typename U> unsigned int Find(const U& x, bool (*pFunc) (const U&) = func) const {} }; class bar { bool Initialize(); protected: foo b; }; bool bar::Initialize() { b.Find(b); }
google
chromium
reftemp2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/overload/reftemp2.C
358
utf_8
f1afe21410b8c9ff2b405c0ea38c466d
// DR 391 says that we always bind a reference to the base subobject; it is // incorrect to call the A copy constructor to initialize the parameter of // f. int fail; struct A { A() { } A(const A&) { fail = 1; } }; struct B : public A { }; struct X { operator B() { return B(); } }; X x; void f (const A&) { } ...
google
chromium
using2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/overload/using2.C
2,801
utf_8
8c16af260b5d8605c686a71728054554
// { dg-do compile } // based on https://bugzilla.redhat.com/beta/show_bug.cgi?id=149098 // Per the ISO C++ 90 Standard, using declarations before of after a // declaration of the same function name and prototype should be // errors (7.3.3/11). However, DR 101's resolution recommends // accepting such duplicates if th...
google
chromium
operator2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/overload/operator2.C
251
utf_8
964600658be3f75b988efd034a9cc438
// PR c++/19966 // { dg-do compile } struct A { static operator int(); // { dg-error "must be a nonstatic" } }; struct B { static int operator*(); // { dg-error "must be either" } }; static operator int(); // { dg-error "must be a nonstatic" }
google
chromium
virtual1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/overload/virtual1.C
304
utf_8
f0e44977493ab0fe59f740f65a694211
// Test that explicit scope suprresses virtual lookup even after an // explicit object. extern "C" int printf (const char *, ...); struct A { virtual int f () { return 0; } }; struct B: public A { int f () { return 1; } int g() { return this->A::f(); } }; int main() { B b; return b.g(); }
google
chromium
copy1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/overload/copy1.C
323
utf_8
4a5f6626c507c0ad7805e34f3032e376
// PR c++/34824 struct A; struct B { B (A const &); // { dg-message "note" } B (B &); // { dg-message "note" } }; struct A { A (B); // { dg-error "initializing" } }; B f (B const& b) { return b; // { dg-error "matching" "matching" } // { dg-message "candidate" "candidate note" { target *-*-* } 19 }...
google
chromium
arg3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/overload/arg3.C
559
utf_8
cdcd898390d816869bc68de3bc9066f6
// { dg-do compile } struct A {}; struct B : A { B(int); // { dg-message "B::B|no known conversion" "" } B(B&); // { dg-message "note" "" } }; void foo(B); // { dg-error "initializing" } void bar() { foo(0); // { dg-error "no matching function" "no matching" } // { dg-message "candidate" "candidate note" { t...
google
chromium
builtin1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/overload/builtin1.C
412
utf_8
ce05e962357b9e27eb61fcb9e1f0b7ee
// Test that we don't discard builtin candidates inappropriately. struct B { }; struct A { operator int (); operator B (); }; void operator+ (B, B); // { dg-message "operator" "operator" } int main () { A a; a + a; // { dg-error "ambiguous" "ambiguous" } // { dg-message "operator" "match candidate text...
google
chromium
defarg3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/overload/defarg3.C
311
utf_8
b954eab7456dcde91d0de9d826c7d3aa
// PR c++/37971 // { dg-do compile } class C { private: static int f(int); // { dg-error "private" } static int f(char); }; class D { public: /* C::f is inaccessible, so this is an error, even if this function is never called. */ static void g(int (*)(int) = C::f); // { dg-error "context" } };
google
chromium
template2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/overload/template2.C
228
utf_8
053bc5744de44c3637cdea4e8f67c443
typedef int PyObject; typedef PyObject *(*PyCFunction)(PyObject *, PyObject *); template<class T> int _clear(PyObject* self); void _typeInfo() { reinterpret_cast<PyCFunction>(_clear); // { dg-error "overloaded function" } }
google
chromium
rvalue3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/overload/rvalue3.C
132
utf_8
e8d2b5f4633ed5ca39b035852658ba5d
// PR c++/50512 void foo (const char *const& s); template<typename C> void foo (const C& x) { x.a; } void f () { foo ("abc"); }
google
chromium
arg2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/overload/arg2.C
326
utf_8
4491935dbfe94276c1739fb569f323e7
// { dg-do compile } struct A {}; struct B : A { B(int); B(A); }; void foo(B); void bar() { foo(0); }
google
chromium
extern-C-2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/overload/extern-C-2.C
131
utf_8
799b32bc675b693f7b09c8e88e1f6ff9
// PR c++/39742 void f( int, ...); struct S { }; void g() { void f( int, ...); S t; f(1, t); } void f( int i, ...) { }
google
chromium
koenig2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/overload/koenig2.C
328
utf_8
a29b6caa05b24423db00096e576bf2be
template <class T> void dummy(T& t); void anyfunc(int x); void Foo () { anyfunc (&dummy<>); // { dg-error "cannot resolve overload" "" } }
google
chromium
volatile1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/overload/volatile1.C
227
utf_8
61a6a1da046265d7914707aea16d1d6e
// PR c++/48118 // { dg-prune-output "note" } struct A { }; void f (A); // { dg-error "argument 1" } void (*g)(A); int main() { volatile A a; f(a); // { dg-error "no match" } g(a); // { dg-error "no match" } }
google
chromium
ref1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/overload/ref1.C
369
utf_8
02856d8d11be85bdeb888d95d224df01
// Bug 14397: Bogus access error. struct S { S (int); S(S const&); private: S(S&); }; S foo() { int result = 0; S s ((0,S (result))); return S (result); }
google
chromium
reftemp1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/overload/reftemp1.C
107
utf_8
4d59760484bbf6fd355f658032664fa4
// PR c++/25950 struct X { X(); explicit X(const X&); }; void g(const X&); int main() { g(X()); }
google
chromium
ref-conv1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/overload/ref-conv1.C
194
utf_8
dbdde512ef922a0ffbdf918206043c23
// PR c++/50442 template <typename T> struct MoveRef { operator T& () {} }; template <typename T> MoveRef <T> Move(T&) {} struct Thing {}; Thing foo(const Thing* p) { return Thing(Move(*p)); }
google
chromium
ambig1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/overload/ambig1.C
567
utf_8
7c686fa337e16b4168bbec2411734d98
// [over.best.ics]: For the purpose of ranking implicit conversion // sequences as described in _over.ics.rank_, the ambiguous conversion // sequence is treated as a user-defined sequence that is indistinguishable // from any other user- defined conversion sequence. struct A { A(long); A(char); }; struct B { B(...