plateform
stringclasses
1 value
repo_name
stringclasses
2 values
name
stringlengths
1
78
ext
stringclasses
2 values
path
stringlengths
15
1.11k
size
int64
1
8.55M
source_encoding
stringclasses
11 values
md5
stringlengths
32
32
text
stringlengths
0
8.49M
google
android
java3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/java3.C
102
utf_8
7343c92b74cfb7bbab404d931a5ed2fa
// PR c++/11006 typedef int* jclass; void foo () { new __java_boolean; // { dg-error "valid" } }
google
android
offsetof6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/offsetof6.C
436
utf_8
19eb48777950ec2ddd6300d9e65a5288
// Origin PR c++/38699 // { dg-do compile } template<class T> struct A { const T *p; }; struct B { A<int> a; }; template class A<char>; void f0 () { __builtin_offsetof(A<char>, p); // OK __builtin_offsetof(A<char>, p[1]); // { dg-error "non constant address" } __builtin_offsetof(B, a.p); // OK __builtin_off...
google
android
unused1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/unused1.C
1,199
utf_8
ed2338c1f9b0041f7a5d84d7a8770464
/* { dg-do compile } */ /* { dg-options "-g" } */ /* { dg-skip-if "" { { hppa*-*-hpux* *-*-solaris2.[56]* powerpc-ibm-aix* } && { ! hppa*64*-*-* } } { "*" } { "" } } */ /* Make sure we didn't eliminate casted types because we thought they were unused. */ void *voidp; struct foo { int i; }; int bar (void) { r...
google
android
copy1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/copy1.C
877
utf_8
05e8006d99bfbd53319ecd928c0724ca
// { dg-do run } // PR 87 int assign = 0; int ctor = 0; int assignC = 0; struct A { int i; template<class T> void operator=(const T&) const { assign = 1; } A () : i (0) {} template <typename T> A (const T &) { ctor = 1; } }; struct B : A { }; struct C { int i; C (int i_) :i (i_) {} ...
google
android
error10
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/error10.C
268
utf_8
5a7c1bf4b79dcf65b10ac9eacefc3d60
// PR c++/21930 // Test case by Volker Reichelt // { dg-do compile } template<int> struct A {}; template<int N> void foo(const A<N> &a) { -A<N>(a); } // { dg-error "operand type is 'A<0>'" } void bar() { foo(A<0>()); // { dg-message "required from here" "" } }
google
android
pr40446
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/pr40446.C
587
utf_8
7a396754c07c42c3d37a44d7027e240e
// PR middle-end/40446 // { dg-do run { target i?86-*-* x86_64-*-* } } // { dg-options "-O1 -msse2" } // { dg-require-effective-target sse2_runtime } #include <emmintrin.h> extern "C" void abort (); struct S { S (double r, double i) { __real__ s = r; __imag__ s = i; } __complex__ double s; }; __m128d foo () { ...
google
android
dump-ada-spec-1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/dump-ada-spec-1.C
184
utf_8
d5d9e4636806cc2c21ba5269905d360d
/* { dg-do compile } */ /* { dg-options "-fdump-ada-spec" } */ struct S { int i; }; /* { dg-final { scan-ada-spec "type S is record" } } */ /* { dg-final { cleanup-ada-spec } } */
google
android
crash-7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/crash-7.C
273
utf_8
e7842fff9521bf33d21ea035ef04f0f9
// Origin: PR c++/42336 // { dg-options "-O2 -g" } // { dg-do compile { target c++11 } } struct X { void func() {} }; template<typename T, void (X::*P)() = &T::func> void b(T) {} int main() { b(X()); /* line 9 */ X().func(); return 0; }
google
android
crash-1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/crash-1.C
69
utf_8
e7de4fdd2efa00c9e16713dbef6623d4
void f() { return 0; } // { dg-error "return-statement" }
google
android
crash-3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/crash-3.C
540
utf_8
0d9c768cc6c1ceba304511794490d245
// { dg-do compile } // { dg-options "-g" } // Contributed by: <schmid at snake dot iap dot physik dot tu-darmstadt dot de> // and Niall Douglas <s_gccbugzilla at nedprod dot com> // PR c++/14246: ice in write_template_arg_literal while mangling boolean // expressions. namespace N1 { template <typename T> str...
google
android
crash-6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/crash-6.C
744
utf_8
2dadba1c6aecd548a8c0e44b0f421a05
// Origin: PR c++/42634 // { dg-options "-g" } // { dg-do compile { target c++11 } } template<typename T> T declval(); template<typename T, typename... Args> struct is_constructible { template<typename T1, typename... Args1> static decltype(T1(declval<Args1>()...), char()) test(); static const bool value = si...
google
android
virtual2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/virtual2.C
102
utf_8
8eb73bfdfb93ef436ae8ead1ba6b0a67
// PR c++/26071 // { dg-do compile } struct A { virtual static ~A(); // { dg-error "virtual" } };
google
android
static1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/static1.C
301
utf_8
2224c373f6ef60421d14c9389ef3412d
// PR c++/9574 // The new parser ICE on this test and then it could // not find z in bar::bar(). // { dg-do compile } struct X { void operator[](const int& __k); }; struct foo { static X x; }; struct bar { int z; bar () { foo::x[z]; } };
google
android
pr39060
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/pr39060.C
706
utf_8
79b61aece5527446fb2380d475ff596b
// PR c++/39060 // { dg-do compile } struct A { A(void* i=); // { dg-error "with|specification|primary-expression" } A(void* i=); // { dg-error "overloaded|primary-expression" } A(void* i=); // { dg-error "overloaded|primary-expression" } void operator+ (void* i=); // { dg-error "arguments" } virtual void ...
google
android
access2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/access2.C
564
utf_8
65f203ac430205520ff2901caa9ed88f
// { dg-do compile } // PR c++/2739 // Access to base class private static member. class Base { private: static int fooprivate; protected: static int fooprotected; public: static int foopublic; }; class Derived : public Base { public: void test(); }; int Base::fooprivate=42; // { dg-error "private" } int Base::...
google
android
error6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/error6.C
353
utf_8
211bf7afef91ced5b9f2bdf67115b606
// { dg-do compile } // Make sure we emit a decent error message when trying to mangle an // expression not supported by the C++ ABI due to a defect. // Update: Better to make it supported, I think... template <int N> struct A {}; struct B { static int foo(void); }; template <class T> A<sizeof(T::foo())> func(voi...
google
android
error1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/error1.C
368
utf_8
7228816342090a5efe94d0effa02c5bd
// { dg-do compile } // PR 90, stupid error message `(this + 160)' class foo { public: int fudge[40]; int bar [40]; inline int access(int i) { return bar(i); // { dg-error "cannot be used as a function" "" } } };
google
android
no-strict-enum-precision-3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/no-strict-enum-precision-3.C
269
utf_8
aac4743e0584073d8980b6a76bade2ac
/* { dg-do run } */ /* { dg-options "-O2 -fno-strict-enums" } */ extern "C" void abort (void); enum X { X1, X2 }; int main (int argc, char *argv[]) { X x = static_cast < X > (argc + 999); if (x == X1) abort (); if (x == X2) abort (); return 0; }
google
android
stdarg1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/stdarg1.C
410
utf_8
38e4cf0612b24814e3f6c917226681e5
// Test stdarg function with anonymous argument // { dg-do run } // { dg-options "-Wno-abi" { target arm_eabi } } #include <stdarg.h> extern "C" void abort (void); void baz (va_list list) { if (va_arg (list, long) != 3) abort (); } void foo (long p1, long, long p2, ...) { va_list list; va_start (list, p2)...
google
android
crash-5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/crash-5.C
279
utf_8
56e3643ee857c666d2b01a4499a8c7d4
// Origin: PR c++/42758 // { dg-do compile } template<class T> struct less {}; template<class T, typename U = less<T> > struct set {}; struct int_less_than {}; void assert_fail (const char*); int f(const set<int, int_less_than>&) { assert_fail (__PRETTY_FUNCTION__); }
google
android
array2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/array2.C
159
utf_8
8248f24a0f3e2adae1de4fcddad88b5c
// PR c++/25263 // { dg-do compile } int x[1/0]; // { dg-warning "division by zero" } // { dg-error "constant" "constant" { target *-*-* } 4 }
google
android
vthunk1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/vthunk1.C
413
utf_8
bbbc42226f302577b317dbefbed13e8a
// PR c++/12007 Multiple inheritance float pass by value fails // { dg-do run } extern "C" void abort (void); class gvImpl { public: virtual void PutVal(float value){} }; class foo { public: virtual void Bar(){} }; class myGv: public foo, public gvImpl { void PutVal(float value){ if (value != 3.14159f) abort ()...
google
android
unreachable1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/unreachable1.C
207
utf_8
5c2adc76f21ce8f7182fe1930db8db73
// PR middle-end/17827 // { dg-do compile } void foo() { if (false) if (int i=0) int j=i; }
google
android
ptrmem3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/ptrmem3.C
243
utf_8
aa501740c79db5668ed5a41a648546f6
// Bug: The double cast had an TREE_INT_CST_HIGH of 0, while the single // cast had -1, so the comparison failed. // { dg-do run } struct A { }; typedef int A::* aip; typedef long A::* alp; int main() { return ((aip)(alp)0 != (aip)0); }
google
android
pr42806
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/pr42806.C
215
utf_8
bd2f500fa5d566f920cd8ae804d20550
// { dg-do compile } // { dg-options "-O -fcompare-debug" } struct S1 { ~S1() { } }; struct S2 { S1 s1; void m(); ~S2() { m(); } }; struct S3 { S3(int, S2); }; void foo() { S3(0, S2()); }
google
android
anon2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/anon2.C
234
utf_8
25bec11b40119085408d52eaa5b86f6e
// Test that we can have an unnamed struct inside an anonymous union. struct A { union { struct { int i; } foo; }; }; static union { struct { int i; } foo; }; int main () { union { struct { int i; } bar; }; }
google
android
void2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/void2.C
129
utf_8
26c3e723ec1cf92ad6b8e63c466fb9e8
// PR c++/27423 // { dg-do compile } void foo(void = 0); // { dg-error "incomplete type|invalid use" } void bar() { foo(); }
google
android
pr52048
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/pr52048.C
1,182
utf_8
f41d9c16f9331b066d437ea74ff76a33
// PR debug/52048 // { dg-do compile } // { dg-options "-fcompare-debug -fnon-call-exceptions -fno-tree-dominator-opts -O2" } template <typename T> struct A; template <typename T> struct A <T *> { typedef T &a; }; template <typename T> struct B { typedef typename A <T>::a a; a operator *() {} }; template <typena...
google
android
cv_func
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/cv_func.C
441
utf_8
fdfa290c70a18c73e24a679861f4474f
// { dg-do compile } typedef int FIC(int) const; typedef int FI(int); FIC f; // { dg-error "cv-qualifier" } struct S { FIC f; // OK const FI g; int h(int) const; }; FIC S::*pm = &S::f; const FI S::*pm2 = &S::f; // { dg-error "cannot convert" } const FIC S::*pm3 = &S::f; int S::f(int) const { return 17; } ...
google
android
abstract5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/abstract5.C
86
utf_8
df81d021f1adcf8dae661aa394aa2a89
struct A { virtual void f() = 0; }; typedef A (*fp)(); // { dg-error "abstract" }
google
android
error7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/error7.C
248
utf_8
1879c54136b23a17a6c8b571f8a19c12
// { dg-do compile } // Origin: <andrewp at andypo dot net> // c++/8046: ICE on illegal code involving destructor being treated as bit-not // expression class A; namespace N {} void foo(void) { N::~A(); // { dg-error "not a class-name" } }
google
android
pr37789
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/pr37789.C
113
utf_8
491c4cb5cc2f40f08cea9aa3d5e50268
// PR c++/37789 // { dg-do compile } void foo(): { // { dg-error "initializers|identifier" } __FUNCTION__; }
google
android
scope1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/scope1.C
323
utf_8
97e48186eadf96baa75dab50f7628d6a
// { dg-do compile } // PR 3381 namespace N { template<class T> class A { }; } template class N::A<unsigned>; // this works (by itself) template class ::N::A<int>; // but this doesn't
google
android
error9
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/error9.C
395
utf_8
b92370a23a79c9c243e1e6ba7329b0a7
// { dg-options -Wall } // Bug 17681: bad diagnostic text. struct A { }; struct B { }; struct C : public B, public A { C () // { dg-warning "when initialized" "" } : A(), B() // { dg-warning "base .\[AB\]." "" } { } };
google
android
gc3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/gc3.C
203
utf_8
710d41055b4bb35ff1473bcd3c776607
// PR c++/21687 // { dg-options "--param ggc-min-expand=0 --param ggc-min-heapsize=0" } template <class Union> void perform_test_trivial() { struct check_union { void perform_test_trivial() {} }; }
google
android
gc4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/gc4.C
138
utf_8
88d3ce293bea84b74d7f26a42a8538fb
// PR c++/41120 // { dg-options "--param ggc-min-heapsize=0 --param ggc-min-expand=0" } struct A { A(); }; struct B { A a; }; B b;
google
android
linkage1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/linkage1.C
312
utf_8
b00a3ef2f2c7c47e551480d60abbc84f
// { dg-do compile } // PR 51 // This example snippet is from the ISO C++ standard, sect 7.5 para 4: extern "C" typedef void FUNC_c(); class C { public: static FUNC_c* q; };
google
android
friend3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/friend3.C
224
utf_8
6d1a6598f4b9a25e1ad71a415d80b127
// PR c++/22293 // { dg-do compile } struct A { friend ~A(); // { dg-error "qualified name" } }; struct B { friend ~A(); // { dg-error "qualified name" } };
google
android
default8
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/default8.C
715
utf_8
999b625d0b51f01b993b8d3373be22a5
// PR c++54485 template<typename T> class K1 { int fn(int, int); int gn(int, int); }; template<typename T> int K1<T>::fn (int a, int b = 3) // { dg-error "default arguments" } { return a - b; } template<typename T> int K1<T>::gn (int a = 1, int b = 3) // { dg-error "default arguments" } { return a - b;...
google
android
dump-ada-spec-2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/dump-ada-spec-2.C
226
utf_8
08b98c1e4c60302b4f451b29e48837db
/* { dg-do compile } */ /* { dg-options "-fdump-ada-spec" } */ struct S { int it; __extension__ unsigned char data[]; }; /* { dg-final { scan-ada-spec "array \\(0 .. -1\\)" } } */ /* { dg-final { cleanup-ada-spec } } */
google
android
pr31078
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/pr31078.C
814
utf_8
7c1a4ef9dd889bd9a64eeb9657827800
typedef int SLONG; typedef char SCHAR; typedef short SSHORT; typedef char TEXT; typedef long ISC_STATUS; const SLONG gds_arg_string = 2; const SLONG gds_sys_request = 335544373L; enum jrd_blk_t { type_str, type_dcc, type_sbm, type_smb, type_blb, type_irb, type_jrn }; struct blk { }; template < class RPT, SSHORT BLO...
google
android
error13
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/error13.C
386
utf_8
f5c1bca3f39b56631c1676bcf9d634c4
//PR c++/28258 struct A // { dg-message "note" } { A(void x); // { dg-error "invalid use|incomplete type|candidates" } // { dg-message "" "match candidate text" { target *-*-* } 5 } }; struct B : A {}; // { dg-error "no matching function for call|deleted" } // { dg-message "candidate" "candidate note" { target ...
google
android
crash-2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/crash-2.C
361
utf_8
f2c44da2d098b6e3329177d4a7f387ef
// { dg-do compile } // { dg-options "-finline -finline-functions" } // Contributed by Hans Buchmann <hans dot buchmann at fhso dot ch> // PR c++/14033: ICE while inlining a function with incomplete parameter struct A; // { dg-error "forward declaration" } void foo(A a) {} // { dg-error "incomplete" } str...
google
android
bitfield4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/bitfield4.C
133
utf_8
c11430455dce3502737769495b13d81c
// Origin PR c++/42217 // { dg-do compile } struct A { int : 0; }; A a = A();
google
android
pr22358
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/pr22358.C
88
utf_8
57901344b69ec7b216bf1128cc5a7242
/* { dg-do compile } */ struct a { virtual ~a(); }; struct b : virtual a { }; b a11;
google
android
no-strict-enum-precision-1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/no-strict-enum-precision-1.C
488
utf_8
072d809e1e9532d7b2b5566eb1c5d3e3
/* { dg-do run } */ /* { dg-options "-fno-strict-enums" } */ extern "C" void abort (void); enum zero_one { zero = 0, one = 1 }; int * allocate_bool (zero_one e) { int *v = 0; switch (e) { case zero: v = new int (0); case one: v = new int (1); } return v; } int main () { if (alloc...
google
android
pr47218
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/pr47218.C
268
utf_8
8e7b1b054b1f9b23fc3c278689e59e7d
/* { dg-do link } */ /* { dg-options "-save-temps" } */ /* { dg-additional-sources "pr47218-1.C" } */ #include "pr47218.h" Foo3::~Foo3 () { ((FooBaseBase1*)this)->Bar(); } void Foo3::Bar() { } int main () { return 0; } // { dg-final { cleanup-saved-temps } }
google
android
pr53811
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/pr53811.C
624
utf_8
064314e5b4858c9dbb88aea445e7faae
// { dg-do compile } // { dg-options "-mcmodel=large" { target { { i?86-*-* x86_64-*-* } && lp64 } } } struct ICCStringClass { virtual void * CreateString (const char *fromText) = 0; }; struct AGSCCDynamicObject { virtual void Unserialize (int index, const char *serializedData, int dataSize) = 0; }; struct ...
google
android
isnan
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/isnan.C
93
utf_8
74d2dc28c4cfdb8c13ff5a52e4f1924a
// PR c++/48369 extern "C" int isnan (double); void f(double d) { bool b = isnan(d); }
google
android
switch1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/switch1.C
308
utf_8
6312bd4cf43fd17e803778af8b1f2031
// { dg-do compile } // Contributed by: Nick Savoiu <savoiu at ics dot uci dot edu> // PR c++/14250: Incomplete type in switch statement template <typename T> struct A { operator int(); }; struct C1 { static A<void> t1; void fun() { switch(t1) { default: break; } } };
google
android
warning1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/warning1.C
416
utf_8
920e26dc1d208f4b8eb154039ac70505
// { dg-do compile } // PR c++/7804 // Floating point formatting in error and warning messages extern "C" int printf(const char *, ...); struct S { static const float inf = 1.0f / 0.0f; // { dg-error "1.0|float|initializ" } static const float nan = 0.0f / 0.0f; // { dg-error "0.0|float|initializ" } }; int main(...
google
android
incomplete1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/incomplete1.C
208
utf_8
cc1ca2bf9b477d018fa43d900031841d
// PR c++/23089 // ICE on incomplete type // { dg-do compile } // { dg-options "-O" } void foo(struct A) {} // { dg-error "incomplete type|forward declaration" }
google
android
canon-31724
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/canon-31724.C
124
utf_8
011b8ddc593601155e855d2cf648258c
struct ac {ac();}; ac spline_rep1(void) { typedef ac at[2]; ac * b = new ac[2]; at *a = (at*)b; return (*a)[0]; }
google
android
datasec1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/datasec1.C
212
utf_8
5af94f8039df2b744ff5d415b5e74405
// PR target/33168 // { dg-do compile } // { dg-require-effective-target named_sections } // { dg-options "-O2 -fdata-sections" } extern const int& foo; namespace { const int bar = 16; } const int &foo = bar;
google
android
error17
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/error17.C
196
utf_8
c5ebfa103b3a073b940575c6cfabfd60
// PR c++/32870 struct Foo { struct Bar; }; namespace N { struct Foo::Bar { }; // { dg-error "in namespace 'N'" } } struct Baz { struct Foo::Bar { }; // { dg-error "in 'struct Baz'" } };
google
android
ptrmem5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/ptrmem5.C
141
utf_8
713d0139b054494df9491738a1fefb6c
// PR 14123 struct a { int x[8]; }; int main() { int a::*n[8]; n = &a::x; // { dg-error "int \\(a::\\*\\)" } }
google
android
array3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/array3.C
334
utf_8
ed092dce3c46c4eb9fe96b8e2be6750c
// PR C++/28906: new on an array causes incomplete arrays to // become complete with the wrong size. // the bounds of xvalue_store was being set to include want // which was incorrect. // { dg-do compile } extern unsigned char xvalue_store[]; bool reserve (int want) { new unsigned char[want]; } unsigned char xvalu...
google
android
pr29610
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/pr29610.C
968
utf_8
28e9a172de1c6ea38bcb3af18a9eb52c
/* { dg-do compile } */ /* { dg-options "-O2 -funswitch-loops" } */ struct __normal_iterator { typedef int*const *_Iterator; int*const * _M_current; __normal_iterator(const _Iterator& __i) : _M_current(__i){} const _Iterator& base() const {} }; struct string { ~string(){} }; struct vector { int** _M_finish...
google
android
init2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/init2.C
590
utf_8
84228402757e3c8e700713d288e64c46
// { dg-do run } // PR 160. Wrong code emitted for some reference initializers. void Foo () { } int fail; class C { public: int m; int &r; C () ; }; C::C () : m (1), r ((Foo (), m)) { m = 10; if (r != m) fail = 1; else if (&m != &r) fail = 2; } int main () { int m (1); int &r ((Foo (),...
google
android
array5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/array5.C
299
utf_8
704a289cc183c9c58d161a065dc540b8
// Check to make sure changing from an incomplete // array type to a complete one does not change other // incomplete array type's bounds. // { dg-do compile } extern unsigned char xvalue_store[]; extern unsigned char xvalue_store1[]; unsigned char xvalue_store[7]; unsigned char xvalue_store1[9];
google
android
ptrmem11
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/ptrmem11.C
340
utf_8
b60b1ce8e8447af806ecec748ab8bea1
// Origin PR c++/37093 struct A {}; template <int A::* p> int foo(A* q) { return q->*p; } template <typename T> int bar(int T::* p) { return foo<p>(0);// { dg-error "(not a valid template arg|no matching func|pointer-to-member|could not convert|constant)" } } int i = bar<A>(0);
google
android
darwin-minversion-1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/darwin-minversion-1.C
224
utf_8
bd1c35be302338df14b1aa330813797d
/* Test for -mmacosx-version-min default on powerpc-darwin. */ /* { dg-do compile { target powerpc-*-darwin* } } */ int main(void) { #if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1030 fail me; #endif return 0; }
google
android
abstract6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/abstract6.C
81
utf_8
7f10e9e51c9dab9a3c9109c1c3e17f8f
// PR c++/60532 class A { ~A (); }; class B : A { virtual void m () = 0; };
google
android
arm-neon-1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/arm-neon-1.C
320
utf_8
2138aca3dce7e8ea857b666c6463bc03
/* Basic smoke test for arm_neon.h */ /* { dg-do assemble } */ /* { dg-require-effective-target arm_neon_ok } */ /* { dg-add-options arm_neon } */ #include "arm_neon.h" float a[4]; void test(void) { float32x2x2_t v; float32x2_t res; v = vld2_f32(a); res = vadd_f32(v.val[0], v.val[1]); vst1_f32(a, res); }
google
android
offsetof1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/offsetof1.C
311
utf_8
ed6ba93ec64ee88b5ea998354c729e44
// { dg-do compile } // PR c++ 7598, offsetof broke // PR c++ 11072, DR 273's solution is broken #include <cstddef> struct F { char i; char j; }; static int ary[offsetof(F, j)];
google
android
first-global
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/first-global.C
181
utf_8
455aeb7100537f75958e97507174848d
/* { dg-do compile } */ /* { dg-add-options bind_pic_locally } */ /* { dg-final { scan-assembler "_GLOBAL__(I|sub_I)(_|_65535_0_)foobar" } } */ struct foo { foo (); }; foo foobar;
google
android
array4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/array4.C
356
utf_8
4fc58d9ff176effcac170e54d3144031
// PR C++/28906: new on an array causes incomplete arrays to // become complete with the wrong size. // The sizeof machineMain should be 5 and not 100. // { dg-do run } extern char machineMain[]; void sort (long len) { new char[100]; } char machineMain[] = "main"; int main(void) { if (sizeof(machineMain)!=sizeof(...
google
android
ptrmem4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/ptrmem4.C
296
utf_8
76b8bc4328319b30e522cbc6e57ff4ed
// Bug: This checks that the pointer-to-member-function type is not // shared between differently-qualified pointer-to-method types. // { dg-do compile } struct A { void f () {} }; void (A::*const cp)() = &A::f; int main () { void (A::* p)(); void (A::** ip)() = &p; *ip = &A::f; }
google
android
pr43116
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/pr43116.C
252
utf_8
e18e3ba20f03468900780d327126e381
/* { dg-do compile } */ extern "C" int rpl_open (const char *filename, int flags, ...) __attribute__ ((__nonnull__ (1))); namespace gnulib { int (*const open) (const char *filename, int flags, ...) __attribute__ ((__nonnull__ (1))) = rpl_open; }
google
android
access3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/access3.C
208
utf_8
9badaf0d3171514f4d628f2da49a35a9
// { dg-do compile } // { dg-options "-fno-access-control" } // PR c++/20022 // Make sure -fno-access-control doesn't crash, and actually grants at // least some access. class B { enum A {}; }; B::A r;
google
android
vararg-1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/vararg-1.C
447
utf_8
6aa48be6aef2630759f48ff66b6424bd
// C++/15119 // This ICEd in substitute_placeholder_in_expr because it did not // implement the 4 element trees. /* { dg-do compile } */ template<typename T> const T& xmin(const T& a, const T& b); void bar (char *, ...); char const* descs[4]; int main() { int t = 1; char buf[100]; bar( buf...
google
android
enum1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/enum1.C
262
utf_8
c5b26d15a4924f5e39dad2e8b5b7608a
// PR c++/6037 // This testcase ICEd because start_enum expected pushtag to insert // the tag always into current binding level. struct A { ~A () { } }; struct B { void foo () { switch (0) { default: ; } A a; enum C { }; (void) a; } };
google
android
error2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/error2.C
385
utf_8
a7f642f46d2d9259194f51e24e5b9ee6
// { dg-do compile } // PR 196. Misleading diagnostic namespace N { class B { friend void operator>>(int, class B); }; class N { friend void operator>>(int,class N); }; } void N::operator>>(int, N::B) // { dg-error "N::N::B|N::operator>>" } { }
google
android
anon6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/anon6.C
75
utf_8
1c68df289b2577a8e2753eaf82704fed
// PR c++/60353 struct A { A(int); }; typedef struct { A format; } B;
google
android
increment1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/increment1.C
468
utf_8
91b5ed5104c76d620a1314b0a88fee48
// PR c++/37561 // { dg-do compile } // { dg-options "-Wno-int-to-pointer-cast" } __PTRDIFF_TYPE__ p; char q; void foo () { ((char *) p)++; // { dg-error "lvalue" } ((char *) q)++; // { dg-error "lvalue" } ((char *) p)--; // { dg-error "lvalue" } ((char *) q)--; // { dg-error "lvalue" } ++(char *) p; // { ...
google
android
operator2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/operator2.C
150
utf_8
971cefc8317fd5a29f53da37b1dbb6d6
// PR c++/28852 // { do-do compile } struct A { operator int&(int); // { dg-error "void" } }; A a; int& i = a; // { dg-error "initialization" }
google
android
default1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/default1.C
244
utf_8
9e7395f0094f6f5737290e2034fc9ed7
// PR c++/24103 // ICE in simple_cst_equal // { dg-do compile } // { dg-options "" } struct S { int i; }; struct A { A(S = (S){0}); }; struct B { B(S = (S){0}); }; B::B(S) {}
google
android
field1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/field1.C
536
utf_8
4cb9d6103dd937ddadce6eb5df7557c2
// { dg-do compile } // PR c++ 9483. accepted fields with same name as class struct test { char test; // { dg-error "with same name as class" "" } test(); }; template <typename T> struct X { char X; // { dg-error "with same name as class" "" } X (); }; template <> struct X<int> { char X; // { dg-error "wi...
google
android
pr49912
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/pr49912.C
452
utf_8
3f80d803f33ca352a2d86ba6db9d48fe
// PR rtl-optimization/49912 // { dg-do compile } // { dg-require-effective-target freorder } // { dg-options "-O -freorder-blocks-and-partition" } int foo (int *); struct S { int *m1 (); S (int); ~S () { foo (m1 ()); } }; template <int> struct V { S *v1; void m2 (const S &); S *base (); }; template <i...
google
android
pragma-re-1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/pragma-re-1.C
1,335
utf_8
2b96e0cda3aaa703c284fca6a0dd72c9
/* { dg-final { scan-assembler "bar" } } */ /* { dg-final { scan-assembler-not "foo" } } */ /* { dg-final { scan-assembler "_Z3bazv" } } */ /* { dg-final { scan-assembler-not "baq" } } */ /* { dg-final { scan-assembler "tut" } } */ /* { dg-final { scan-assembler-not "gee" } } */ /* { dg-final { scan-assembler "bang" } ...
google
android
typedef2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/typedef2.C
88
utf_8
2ae83dd33030d45c71b8674e327b61aa
typedef void fn() const; fn* fp; // { dg-error "pointer.*qualified function type" }
google
android
array6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/array6.C
172
utf_8
db68b7a03fb0ede3fec05340bda061e1
// PR c++/43036 typedef char T6[2][8]; const T6* p1; typedef char T[8]; typedef T T2[2]; typedef T T3[2]; typedef char T5[2][8]; const T2* p2; const T5* p3; const T3* p4;
google
android
builtin1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/builtin1.C
119
utf_8
4576cbaaf099a0140a4b7488cb4d9c9f
/* { dg-do compile } */ void foo() { __builtin_isless (foo, 0); /* { dg-error "non-floating-point arguments" } */ }
google
android
nested-extern-1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/nested-extern-1.C
242
utf_8
34552611e0ea3221799b7ea6c572fbc0
/* { dg-do run } */ // { dg-additional-sources "nested-extern.cc" } /* PR 31775 */ extern "C" void abort(); extern int *p; int main() { extern int i; i = 1; *p = 2; if (i == 2) abort (); return 0; } static int i; int *p = &i;
google
android
pr24623
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/pr24623.C
1,038
utf_8
cbfc16147cdfd178e38e28c8ffca2385
/* This used to ICE due to a backend problem on s390. */ /* { dg-do compile } */ /* { dg-options "-O1" } */ class ReferenceCounted { public: virtual ~ ReferenceCounted () { } void decrementRefCount () const { if (--const_cast < unsigned int &>(_ref_count) == 0) { delete this; } } unsi...
google
android
ptrmem2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/ptrmem2.C
814
utf_8
c79782b762cef64300df319862fcdc0f
// { dg-do compile } // PR 4379. We created pointers to member references and pointers to // member fields when we shouldn't have. struct D { int &m; // { dg-error "invalid use of non-static data member" "" } static int &s; int Foo (); }; template<class T> int f1(T x); template<class T> int f2(T x); i...
google
android
component1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/component1.C
625
utf_8
62c7e0b19a0713c16c861d1093f50759
// { dg-do compile } // PR 5123. ICE struct C { template<class T> void f(T); void g (); void g (int); }; void Foo () { C c; (c.g) (); (c.f) (1); (c.f<int>) (2); c.g; // { dg-error "statement cannot resolve" "" } c.f; // { dg-error "statement cannot resolve" "" } c.f<int>; // { dg-erro...
google
android
error8
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/error8.C
680
utf_8
67a3ed27978e2f58840fe8091b893f02
// { dg-do compile } // Contributed by: Michael Elizabeth Chastain // <mec dot gnu at mindspring dot com> // PR c++/13927: Wrong error message for redeclartion of type from union void foo(void) { union { int alpha; int beta; }; // { dg-message "previous declaration" } double alpha; // { dg-error "conflicting d...
google
android
pr36944
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/pr36944.C
326
utf_8
8063a4cb70e924f46779754da6c98175
/* { dg-do compile } */ class XObject { public: int foo; }; class XObjectPtr { public: explicit XObjectPtr(XObject* theXObject = 0) : m_xobjectPtr(theXObject) { } private: XObject * m_xobjectPtr; }; class SelectionEvent { public: SelectionEvent(bool selection) : m_selection() {} const XObjectPtr m_selectio...
google
android
java1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/java1.C
543
utf_8
f32a6142208532cc717bb64d8020d355
// { dg-options "-w -ansi -pedantic" } extern "Java" { class One { ~One (); // { dg-error "cannot have a destructor" "" } One (); }; class Two {}; class Three : One {}; // { dg-error "cannot have an implicit" "" } class Four : Two {}; class Five : Two, Four {}; // { dg-error "cannot have multipl...
google
android
error22
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/error22.C
143
utf_8
c9a1c84378c02c61b6ede3fb15773426
// PR c++/34394 // { dg-do compile } extern "C" double fabs (double); void foo (double x) { fabs (x) (); // { dg-error "__builtin_abs" } }
google
android
opaque-3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/opaque-3.C
304
utf_8
2fdec97c9e8b739bdcdbd33ed78c1d4f
/* { dg-do compile } */ /* { dg-options "-mcpu=8540 -mspe -mabi=spe -mfloat-gprs=single" } */ /* { dg-skip-if "not an SPE target" { ! powerpc_spe_nocache } { "*" } { "" } } */ __ev64_opaque__ o; #define v __attribute__((vector_size(8))) v unsigned int *p; void m() { o = __builtin_spe_evldd(p, 5); }
google
android
fold1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/fold1.C
177
utf_8
f0b90cefee19cdf27cf52d575824a7b2
// PR middle-end/27384 // { dg-do compile } struct A { static const int i = i; // { dg-error "not declared" } int x[i]; // { dg-error "constant-expression" } };
google
android
default7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/default7.C
353
utf_8
81914af5da2aba583c08c504b718391e
/* { dg-do assemble } */ /* { dg-options "-O1" }*/ // This was PR C++/31165 // We used to copy the whole decl when we just wantted to // unshare some expressions for the default argument. class string { char *ptr; int len; int sz; }; class cset { } _cset_init; string an_empty_string; void f(string& = an_empty_st...
google
android
operator1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/operator1.C
156
utf_8
5c4a588829781d8931751c4126ebd8aa
// PR c++/27547 // { dg-do compile } int operator=(int); // { dg-error "member function" } void foo() { operator=(0); // { dg-error "not defined" } }
google
android
friend1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/friend1.C
293
utf_8
4e454805fdba784ccf383bf015fee2fc
// { dg-do compile } // Bug 4476. We tangled up inline friends and pure virtuals during // class definition. struct A { friend void f () { } void g (A a) { } };
google
android
constref1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/constref1.C
308
utf_8
ff9cb67baddab7a5c96d0e2a37893445
// { dg-do compile } // Make sure that we can pass a cast-expression as an argument that's // passed by const reference. void bar (const long&) { } void foo (int x) { bar ((long) x); }
google
android
pr39496
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/pr39496.C
940
utf_8
14cd5913702333a4982d44b3769179f0
// PR target/39496 // { dg-do compile { target { { i?86-*-linux* i?86-*-gnu* x86_64-*-linux* } && ia32 } } } // { dg-options "-O0 -fverbose-asm -fno-omit-frame-pointer -mtune=i686 -msse2 -mfpmath=sse" } // Verify that {foo,bar}{,2}param are all passed on the stack, using // normal calling conventions, when not optimiz...
google
android
default3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/default3.C
3,328
utf_8
076ac51ef7f2cc7d10a4cd083ffb2fe7
// PR c++/16829 // { dg-do compile } void f1(int = 0, int); // { dg-error "default" } void f2(int = 0, int) {} // { dg-error "default" } void f3(int, int); void f3(int = 0, int); // { dg-error "default" } void f4(int, int); void f4(int = 0, int) {} ...
google
android
typedef3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/typedef3.C
367
utf_8
d4120067ea2a2f801d8e1d6c528e17e6
// Origin: PR c++/40357 // { dg-do compile } struct XalanCProcessor { typedef enum {eInvalid, eXalanSourceTree, eXercesDOM} ParseOptionType; ParseOptionType getParseOption(void); }; typedef XalanCProcessor::ParseOptionType ParseOptionType; ParseOptionType XalanCProcessor::getParseOption(void) {}