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
simd-4
.C
toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/simd-4.C
919
utf_8
4782413e33639ab8bf21719dd3c2ae29
// { dg-do run } // { dg-options "-O2" } // { dg-additional-options "-msse2" { target sse2_runtime } } // { dg-additional-options "-mavx" { target avx_runtime } } extern "C" void abort (); int a[1024] __attribute__((aligned (32))) = { 1 }; struct S { int s; S () : s (0) {} ~S () {} }; #pragma omp declare reducti...
google
android
udr-4
.C
toolchain/gcc/gcc-4.9/libgomp/testsuite/libgomp.c++/udr-4.C
609
utf_8
ea9d7efadb5b2c25e305ce1e8aee8d04
// { dg-do run } extern "C" void abort (); struct S { int s; S () : s (0) {} ~S () {} }; #pragma omp declare reduction (+:S:omp_out.s += omp_in.s) #pragma omp declare reduction (foo:S:omp_out.s += omp_in.s) #pragma omp declare reduction (foo:int:omp_out += omp_in) int main () { int i, u = 0, q = 0; S s, t...
google
android
reference
.C
toolchain/rustc/src/llvm-project/compiler-rt/test/BlocksRuntime/reference.C
1,683
utf_8
3bc18a8647db2ad7bfb9762d8ca66fc5
// #import <Block.h> #import <stdio.h> #import <stdlib.h> // CONFIG C++ int recovered = 0; int constructors = 0; int destructors = 0; #define CONST const class TestObject { public: TestObject(CONST TestObject& inObj); TestObject(); ~TestObject(); TestObject& operator=(CONST TestObject& inObj); vo...
google
android
copyconstructor
.C
toolchain/rustc/src/llvm-project/compiler-rt/test/BlocksRuntime/copyconstructor.C
1,671
utf_8
b3bf032b3cc048a5c86d06af8bde7298
// #include <stdio.h> #include <Block.h> // CONFIG C++ rdar://6243400,rdar://6289367 int constructors = 0; int destructors = 0; #define CONST const class TestObject { public: TestObject(CONST TestObject& inObj); TestObject(); ~TestObject(); TestObject& operator=(CONST TestObject& inObj); int version() CONST { re...
google
android
josh
.C
toolchain/rustc/src/llvm-project/compiler-rt/test/BlocksRuntime/josh.C
618
utf_8
ecf3421a299138bc62e7aec7d1d326fc
// // CONFIG C++ GC RR open rdar://6347910 struct MyStruct { int something; }; struct TestObject { void test(void){ { MyStruct first; // works } void (^b)(void) = ^{ MyStruct inner; // fails to compile! }; } }; ...
google
android
t_try1
.C
toolchain/mingw/mingw-w64-v6.x/mingw-w64-crt/testcases/t_try1.C
3,319
utf_8
fe572b03f84fcbcf92ed67006dc55ce0
#include <windows.h> #include <excpt.h> #include <stdio.h> /* The exception handler */ #ifndef _WIN64 extern "C" EXCEPTION_DISPOSITION _exception_filter(struct _EXCEPTION_RECORD* ed,void *v1,_CONTEXT *cont,void* v2) #else extern "C" long _exception_filter (EXCEPTION_POINTERS *exception_data) #endif { #ifdef _WIN64 ...
google
android
control.internal.arm.CtsWindowManager
.C
platform/external/autotest/server/site_tests/cheets_CTS_R/control.internal.arm.CtsWindowManager.C
1,509
utf_8
e11421310de7edda3654ad2fff49982e
# This file has been automatically generated. Do not edit! AUTHOR = 'ARC++ Team' NAME = 'cheets_CTS_R.internal.arm.CtsWindowManager.C' ATTRIBUTES = 'suite:arc-cts-r, suite:arc-cts' DEPENDENCIES = 'arc' JOB_RETRIES = 1 TEST_TYPE = 'server' TIME = 'MEDIUM' MAX_RESULT_SIZE_KB = 512000 PY_VERSION = 3 DOC = 'Run module CtsW...
google
android
control.internal.x86.CtsWindowManager
.C
platform/external/autotest/server/site_tests/cheets_CTS_R/control.internal.x86.CtsWindowManager.C
1,522
utf_8
cc0116407b52e7d8006bc8a8575683b3
# This file has been automatically generated. Do not edit! AUTHOR = 'ARC++ Team' NAME = 'cheets_CTS_R.internal.x86.CtsWindowManager.C' ATTRIBUTES = 'suite:arc-cts-r, suite:arc-cts' DEPENDENCIES = 'arc, cts_abi_x86' JOB_RETRIES = 1 TEST_TYPE = 'server' TIME = 'MEDIUM' MAX_RESULT_SIZE_KB = 512000 PY_VERSION = 3 DOC = 'Ru...
google
android
uninit-pred-3_a
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/uninit-pred-3_a.C
1,149
utf_8
5786bf78cee1b70c9836b60ec34f42ba
/* { dg-do compile } */ /* { dg-options "-Wuninitialized -O2" } */ /* Multiple initialization paths. */ typedef long long int64; void incr (); bool is_valid (int); int get_time (); class A { public: A (); ~A () { if (I) delete I; } private: int* I; }; bool get_url (A *); bool get_url2 (A *); class M...
google
android
pr55106
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/pr55106.C
1,720
utf_8
9deb7215258d8ff8a15e52e1fce39338
/* { dg-do compile } */ /* { dg-options "-c -O3" } */ template<typename _Tp> struct A { typedef _Tp *pointer; typedef _Tp& reference; typedef _Tp& const_reference; template<typename>struct rebind { typedef A other; }; }; template<typename _Alloc>struct __alloc_traits { typedef typename _Alloc::pointe...
google
android
pr37742
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/pr37742.C
238
utf_8
2ac64817a39fe1a5c2dc328f4233cda1
/* { dg-do compile } */ __extension__ typedef __SIZE_TYPE__ size_t; void* __valarray_get_memory(size_t __n); int*__restrict__ __valarray_get_storage(size_t __n) { return static_cast<int* __restrict__>(__valarray_get_memory(__n)); }
google
android
predict-loop-exit-1
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/predict-loop-exit-1.C
309
utf_8
ae8863cdd596655bd9501c7a7e546fc7
/* { dg-do compile } */ /* { dg-options "-O2 -fdump-tree-profile_estimate" } */ int g; int foo(); void test() { while (foo() && g < 10) g++; return; } /* { dg-final { scan-tree-dump-times "loop exit heuristics:" 3 "profile_estimate"} } */ /* { dg-final { cleanup-tree-dump "profile_estimate" } } */
google
android
prof-robust-1
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/prof-robust-1.C
318
utf_8
46dfed9235a1b2047de97216124fc419
/* { dg-options "-O2 -fno-weak" } */ #include <stdio.h> namespace { namespace { class MyClass { public: void foo() const; ~MyClass() { foo(); } }; void MyClass::foo() const { printf("Goodbye World\n"); } } static MyClass variable; } int main() { return 0; }
google
android
pr50763-4
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/pr50763-4.C
618
utf_8
687fcdd96edb8d9d6910173004998886
/* { dg-do compile } */ /* { dg-options "-O2 -ftree-tail-merge" } */ float clamp (const float x) { return x <= 1 ? 1 : x; } template < class T > struct VECTOR { float x; }; template < class TV > class JOINT { virtual void Constrain_Angles (VECTOR < float >&angles) const; }; template < class TV > class ANGLE_JO...
google
android
func-args-1
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/func-args-1.C
1,810
utf_8
165f4d1a12237b9ed8273a7db5e4299e
/* { dg-do compile } */ /* { dg-options "" } */ void f0(void); /* { dg-message "note: declared here" } */ void f1(int); /* { dg-message "note: declared here" } */ void f1v(int, ...); /* { dg-message "note: declared here" } */ void f2(int, int); /* { dg-message "note: declared here" } */ void f2v(int, int, ...); /* { dg...
google
android
pr50763-3
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/pr50763-3.C
1,101
utf_8
af836a3a9ba8f043430e40fef5923de3
/* { dg-do compile } */ /* { dg-require-effective-target ilp32 } */ /* { dg-options "-O2 -ftree-tail-merge" } */ class v2d { public: double x; double y; }; class v3d { public: double x; v3d() {} v3d(const v2d & cr2Dv) {} }; class e2d { protected: v2d _Min; v2d _Max; public: int cop2d(const v2...
google
android
pr48660
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/pr48660.C
525
utf_8
91af1bf8e0bef02ef0fdef13fea1c20e
template<int N> struct val { char a[N]; }; class Base { public: virtual val<1> get1() const = 0; virtual val<2> get2() const = 0; virtual val<3> get3() const = 0; virtual val<4> get4() const = 0; }; class Derived : public virtual Base { public: virtual val<1> get1() const { return foo->get1(); } virtual v...
google
android
pr51264-4
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/pr51264-4.C
397
utf_8
cea7cdabebcdd0a13585c5a24f935537
/* { dg-do compile } */ /* { dg-options "-O0 -Werror -Wreturn-type" } */ /* Test-case from http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25973#c4. */ struct Block { public: Block (); ~Block (); }; bool func (bool bar) { Block block; bool foo = false; if (!foo || bar) do { return true; } ...
google
android
pr46065
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/pr46065.C
91
utf_8
4e1d8a1af98ff692467fa16f5a8da67f
// PR c++/46065 // { dg-do compile } void bar (); void foo () { using ::bar; label:; }
google
android
pr45056
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/pr45056.C
1,152
utf_8
df445dd466c64ca9de2502714fd94669
/* { dg-do compile } */ /* { dg-options "-O -fschedule-insns2 -fschedule-insns -g" } */ /* { dg-require-effective-target scheduling } */ template < class _T1, class _T2 > struct pair { _T1 first; _T2 second; pair (_T1 & __a, _T2 & __b) :first (__a), second (__b) { } } ; template < typename _Tp > ...
google
android
constexpr-null1
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/constexpr-null1.C
340
utf_8
3e1ff7dfa116cf8bba94cc9b62873cdb
// PR c++/46670 // { dg-options -std=c++0x } extern unsigned char __TBB_ReverseByte(unsigned char src); extern unsigned char *reversed; template<typename T> T __TBB_ReverseBits(T src) { unsigned char *original = (unsigned char *) &src; for( int i = sizeof(T)-1; i--; ) reversed[i] = __TBB_ReverseByte( original[...
google
android
uninit-pred-2_b
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/uninit-pred-2_b.C
906
utf_8
c299a2e8f2fcb74286fbc4d6d1cf115d
/* { dg-do compile } */ /* { dg-options "-Wuninitialized -O2" } */ typedef long long int64; void incr (); bool is_valid (int); int get_time (); class A { public: A (); ~A () { if (I) delete I; } private: int* I; }; bool get_url (A *); class M { public: __attribute__ ((always_inline)) bool GetC (in...
google
android
20090107-1
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/20090107-1.C
364
utf_8
58dc5a5cf5db074f93f28ff8913eed25
/* { dg-do compile } */ /* { dg-require-effective-target lto } */ /* { dg-options "-flto -Wuninitialized -O1" } */ template <typename T> struct Q1 { typedef int x; }; template <typename T> struct Q2 { typename Q1<T>::x f() { int k; return k; /* { dg-warning "'k' is used uninitialized in this function" } */...
google
android
pr44486
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/pr44486.C
295
utf_8
e43b4ea2d038b181b57782d5d56d22ba
// PR c++/44486 missing space in __PRETTY_FUNCTION__ expansion in anonymous namespace // { dg-do compile } // { dg-options "" } struct S { }; namespace { S f() { const char * s = __PRETTY_FUNCTION__; return S(); } } int main() { f(); } // { dg-final { scan-assembler "S \{anonymous\}::f" } }
google
android
pr46868
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/pr46868.C
89
utf_8
7affa7ae7d35122d45703a6d24ae54f9
// PR c++/46868 // { dg-do compile } template < int > struct S { S < // { dg-error "" }
google
android
pr55263
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/pr55263.C
1,367
utf_8
87fdbc7f65a77794bc417b29c89d0401
/* { dg-do compile } */ /* { dg-options "-c -O -fgcse-after-reload -fnon-call-exceptions" } */ template < typename _Tp > class new_allocator { public: typedef _Tp pointer; template < typename _Tp1 > struct rebind { typedef new_allocator < _Tp1 > other; }; }; template < typename > class allocator; templat...
google
android
system-binary-constants-1
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/system-binary-constants-1.C
396
utf_8
08ca9bc97714b955d9c75e06aa0e83df
/* { dg-options "-std=c++98 -pedantic" } { dg-do compile } */ #include "system-binary-constants-1.h" int foo (void) { #if BINARY_INT_CONSTANT_IN_SYSTEM_HEADER /* A binary constant defined in system header. No warning. */ return 23; #endif return 0b1101; /* { dg-warning "binary constants...
google
android
cdce3
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/cdce3.C
7,409
utf_8
b78e75ef491c1969ff850e077c3cc676
/* { dg-do run } */ /* { dg-require-effective-target c99_runtime } */ /* { dg-options "-O2 -fmath-errno -fdump-tree-cdce-details -lm" } */ /* { dg-additional-options "-DLARGE_LONG_DOUBLE" { target large_long_double } } */ /* { dg-additional-options "-DGNU_EXTENSION" { target pow10 } } */ /* { dg-add-options ieee } */ /...
google
android
pr44328
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/pr44328.C
796
utf_8
32b2fbda29ffd2ac2181c43c971f3a7d
/* { dg-do compile } */ /* { dg-options "-c -O2 -Wextra" } */ #define O_RDONLY (1<<0) #define O_WRONLY (1<<1) #define O_RDWR (O_RDONLY|O_WRONLY) #define O_CREAT (1<<3) #define O_TRUNC (1<<6) typedef enum { OM_READ = 0, OM_WRITE, OM_READWRITE_NOCREATE, OM_READWRITE_CREATE } OpenM...
google
android
pr55513
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/pr55513.C
295
utf_8
99ec6374b2f0e4e6df67c98e4c982d12
// { dg-do compile } // { dg-options "-O0 -fdump-tree-gimple" } main () { char s[10]; const int t = (__builtin_memcpy (s, "Hello", 6), 777); __builtin_printf ("%d %s\n", t, s); } // { dg-final { scan-tree-dump-times "memcpy" 1 "gimple" } } // { dg-final { cleanup-tree-dump "gimple" } }
google
android
pr57878
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/pr57878.C
7,420
utf_8
5abc6bae2519525e59b2a021bb5cd489
/* { dg-do compile { target i?86-*-* x86_64-*-* } } */ /* { dg-options "-m32 -O2 -fno-omit-frame-pointer -fPIC -std=gnu++11" } */ typedef int int32; typedef long long int64; typedef unsigned int uint32; typedef unsigned long long uint64; namespace std { typedef __SIZE_TYPE__ size_t; template<class _CharT> struct...
google
android
pr46890
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/pr46890.C
103
utf_8
3946927cb1dd0a7ac3d8009e703d00c4
// PR c++/46890 // { dg-do compile } struct MdatResource { const char *mdatAlloc; } const *_resource;
google
android
pr54655
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/pr54655.C
298
utf_8
da36360b1eaeaaf6b1adffefc9001717
// { dg-do compile } /* { dg-options "-O1" } */ extern "C" class A { }; template <typename T> class B:A { public: B (int *, T); ~B () { } }; bool a; inline void fn1 () { switch (0) case 0: { B <int*> b (0, 0); if (a) break; } } void fn2 () { fn1 (); }
google
android
pr59695
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/pr59695.C
2,282
utf_8
6ef903a30658765c574e6f3aa8592058
/* PR target/59695 */ /* { dg-do run } */ /* { dg-options "-O0" } */ #define DEFINE_VIRTUALS_FNS(i) virtual void xxx##i () {} \ virtual void foo1_##i () {}\ virtual void foo2_##i () {}\ virtual void foo3_##i () {}\ virtual void foo4_##i () {}\ virtual void foo5_##i () {}\ virtual void foo6_##i () ...
google
android
pr50672
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/pr50672.C
3,146
utf_8
38f9fa3d1d04965b11deec7e969c1372
/* { dg-do compile } */ /* { dg-options "-O2 -ftree-tail-merge" } */ typedef int BoxCoordinate; typedef int BoxDimension; const BoxDimension X = 0; const BoxDimension Y = 1; const BoxDimension NDimensions = 2; class BoxPoint { BoxCoordinate point[NDimensions]; public: bool isValid() const; void operator += ...
google
android
pr45330
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/pr45330.C
640
utf_8
824966c44b18cb22cd6c60db87f93578
// { dg-do compile } // Search std, __cxxabiv1, and global namespaces, plus one more. // { dg-options "--param cxx-max-namespaces-for-diagnostic-help=4" } #define NSPACE(NAME) namespace NAME { int foo; } namespace A { int foo; // { dg-message "A::foo" "suggested alternative" } } namespace B { int foo; } names...
google
android
predict-loop-exit-2
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/predict-loop-exit-2.C
309
utf_8
112161f9cc2e99ed1a64b608b234d230
/* { dg-do compile } */ /* { dg-options "-O2 -fdump-tree-profile_estimate" } */ int g; int foo(); void test() { while (foo() || g < 10) g++; return; } /* { dg-final { scan-tree-dump-times "loop exit heuristics:" 2 "profile_estimate"} } */ /* { dg-final { cleanup-tree-dump "profile_estimate" } } */
google
android
pr53055
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/pr53055.C
95
utf_8
acc9f7ed518d3bd847391a849c7741a3
// PR c++/53055 // { dg-do compile } struct A A :: * p ; int i = p ->* p ; // { dg-error "" }
google
android
pr47053
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/pr47053.C
211
utf_8
9c1057b2baef3c7b14a3990a7dab5c62
/* { dg-do compile } */ /* { dg-options "-O2 -fnon-call-exceptions" } */ struct A { int i; virtual ~A () {} }; struct B : virtual A {}; struct C : public B { C (); ~C (){} }; void foo () { C c; }
google
android
pr48484
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/pr48484.C
1,716
utf_8
d29c2329b28c23ae3cb258a8026b53cd
/* { dg-do compile } */ /* { dg-options "-O -finline-functions -finline-small-functions -Wuninitialized" } */ struct SQObjectPtr { int _type; SQObjectPtr operator = (long); }; struct SQObjectPtrVec { SQObjectPtr fff (unsigned); SQObjectPtr *_vals; }; struct SQInstruction { int _arg1; unsigned op; unsi...
google
android
pr46852
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/pr46852.C
79
utf_8
f8a176d1fc5d47b59c3be174c032504f
// PR c++/46852 // { dg-do compile } template < class { // { dg-error "" }
google
android
pr48633
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/pr48633.C
529
utf_8
e384db5ab7dd22da4d2f37d7651bb107
/* { dg-do compile} */ /* { dg-options "-O2 -fira-region=all -fnon-call-exceptions" } */ extern long double getme (void); extern void useme (long double); struct Frame { long double tmp; }; void bugme (int n, long double ld1, long double ld2, long double ld3, long double ld4, long double ld5) { Frame ...
google
android
pr45112
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/pr45112.C
252
utf_8
5f87750ba61c9001cac317e0f478021f
/* { dg-do compile } */ struct JSString { unsigned char mLength; static JSString unitStringTable[]; }; JSString JSString::unitStringTable[] __attribute__ ((aligned (8))) = { 1 }; int bug [__alignof__ (JSString::unitStringTable) >= 8 ? 1 : -1];
google
android
pubtypes
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/pubtypes.C
1,239
utf_8
ff03ae43e2f7b271b014ab72b2a538fd
/* Radar 4535968 */ /* { dg-do compile { target *-*-darwin* } } */ /* { dg-options "-O0 -gdwarf-2 -dA -fno-eliminate-unused-debug-types" } */ struct A { virtual ~A (); int a1; }; A::~A() { a1 = 800; } struct B : public A { virtual ~B (); int b1; int b2; }; B::~B() { a1 = 900; b1 = 901; b2 = 902; } // ...
google
android
pr45049-2
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/pr45049-2.C
110
utf_8
bb2d7657d437d9771120e409a911eaab
/* { dg-do compile } */ void foo() { void bar(int); void baz(int); void baz(void); void bar(void); }
google
android
predict-loop-exit-3
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/predict-loop-exit-3.C
321
utf_8
9fdf45388f73e8c9a46342cf4ec52cb6
/* { dg-do compile } */ /* { dg-options "-O2 -fdump-tree-profile_estimate" } */ int g; int foo(); void test() { while (foo() && (g < 10 || g > 20)) g++; return; } /* { dg-final { scan-tree-dump-times "loop exit heuristics:" 3 "profile_estimate"} } */ /* { dg-final { cleanup-tree-dump "profile_estimate" } } */...
google
android
pr47589
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/pr47589.C
249
utf_8
7d415c3f086a787fac9c43c2198e69a2
// PR c++/47589 // { dg-do compile } struct F { typedef void(*Cb)(); F(Cb); }; struct C { template<class D> static void f(); }; template<class D> struct TF : F { TF() : F(C::f<D>) { } }; struct DTC : TF<DTC> { DTC() { } };
google
android
pr45310
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/pr45310.C
300
utf_8
39f7b22081ae13a868ee3c73cf7311bc
/* { dg-do compile } */ /* { dg-options "-O1 -fnon-call-exceptions" } */ static inline const int & max (const int &a, const int &b) { return a ? a : b; } static inline int baz () { return max (0, 0); } struct S { ~S () { baz (); } }; void bar (); void foo () { S s; bar (); }
google
android
pr45049-1
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/pr45049-1.C
185
utf_8
de6e2f19bd82039476dbac4742f1fa43
/* { dg-do compile } */ namespace n1 { void modf (); } namespace n2 { void trunc (); void modf (); } void max () { using n1::modf; using n2::trunc; using n2::modf; }
google
android
uninit-pred-3_b
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/uninit-pred-3_b.C
1,294
utf_8
e7062d8b8ae34f0a4f8b5b407e180316
/* { dg-do compile } */ /* { dg-options "-Wuninitialized -O2" } */ /* Multiple initialization paths. */ typedef long long int64; void incr (); bool is_valid (int); int get_time (); class A { public: A (); ~A () { if (I) delete I; } private: int* I; }; bool get_url (A *); bool get_url2 (A *); bool get...
google
android
pr45038
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/pr45038.C
183
utf_8
72214a3aa3e03b049b631f8d07e65aa9
// PR preprocessor/45038 // { dg-do compile } // { dg-options "-Werror -Wold-style-cast" } double f(void) { // We used to produce old-style casts for this. return __DBL_MIN__; }
google
android
uninit-pred-4
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/uninit-pred-4.C
300
utf_8
5ee1b7f723d2f67283e9a5a7eb0c38f1
/* { dg-do compile } */ /* { dg-options "-Wuninitialized -Og" } */ int pop (); int pop_first_bucket; int my_pop () { int out; // { dg-bogus "uninitialized" "uninitialized variable warning" } while (pop_first_bucket) if (pop_first_bucket && (out = pop())) return out; return 0; }
google
android
pr55604
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/pr55604.C
238
utf_8
0ae4a428b317c1c96fedab8dbcaf1da0
/* { dg-do compile } */ /* { dg-options "-O -fdump-rtl-reload" } */ main () { char s[10]; const int t = (__builtin_memcpy (s, "Hello", 6), 5); __builtin_printf ("%d %s\n", t, s); } /* { dg-final { cleanup-rtl-dump "reload" } } */
google
android
pr45788
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/pr45788.C
3,042
utf_8
0f2ee0c5baf4aad3f066c6e5b6757464
// { dg-do compile { target x86_64-*-* } } // { dg-options "-O3 -fwhole-program -msse2" } typedef long unsigned int __darwin_size_t; typedef __darwin_size_t size_t; typedef float __m128 __attribute__ ((__vector_size__ (16), __may_alias__)); typedef float __v4sf __attribute__ ((__vector_size__ (16))); extern inline __m1...
google
android
pr60769
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/pr60769.C
551
utf_8
70e9c0dd0d7ee853af583f1de142f6f4
/* { dg-do compile } */ /* { dg-options "-O" } */ template <class T> void fun(T); struct B {}; struct R { int *x; B f; }; R v(int &, R); void rfun(R &); struct A { void m_fn2(R p1) { R a = p1; rfun(p1); fun(this); fun(a); } }; struct J { A ep; A ap; int c2a; void m_fn1(R &p2) { R d, ...
google
android
uninit-pred-2_a
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/uninit-pred-2_a.C
855
utf_8
f0a1fb92cf38358bf8b5f06449cca963
/* { dg-do compile } */ /* { dg-options "-Wuninitialized -O2" } */ typedef long long int64; void incr (); bool is_valid (int); int get_time (); class A { public: A (); ~A () { if (I) delete I; } private: int* I; }; bool get_url (A *); class M { public: __attribute__ ((always_inline)) bool GetC (in...
google
android
uninit-pred-1_a
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/uninit-pred-1_a.C
907
utf_8
bc857364cab52e462e2e718cd7fefaa8
/* { dg-do compile } */ /* { dg-options "-Wuninitialized -O2" } */ typedef long long int64; void incr (); bool is_valid (int); int get_time (); class A { public: A (); ~A () { if (I) delete I; } private: int* I; }; bool get_url (A *); class M { public: __attribute__ ((always_inline)) int GetC (int...
google
android
uninit-pred-1_b
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/uninit-pred-1_b.C
925
utf_8
6b26b973249421d830f2fec8a5610837
/* { dg-do compile } */ /* { dg-options "-Wuninitialized -O2" } */ typedef long long int64; void incr (); bool is_valid (int); int get_time (); class A { public: A (); ~A () { if (I) delete I; } private: int* I; }; bool get_url (A *); class M { public: __attribute__ ((always_inline)) int GetC (int...
google
android
20090121-1
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/20090121-1.C
315
utf_8
e530347ad81371c3d469f2a1d1245735
// { dg-do compile } // { dg-require-effective-target lto } // { dg-options "-flto -Wuninitialized -O2" } class A { private: int y; public: A () { int x; y = x + 1; } /* { dg-warning "'x' is used uninitialized in this function" } */ int get_y () { return y; } }; int foo() { A a; return a.get_y (); }
google
android
pr48772
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/pr48772.C
332
utf_8
eb8473dadb424bb65d0d3d0b5588e217
// { dg-do compile } // { dg-options "-O -fnon-call-exceptions -fno-tree-ccp -fno-tree-dce" } extern "C" void abort (); struct A { void foo () { this->bar (); } virtual void bar () { abort (); } ~A () { } }; struct B:A { virtual void bar () { } }; int main () { B b; b.foo (); r...
google
android
bitfields
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/simulate-thread/bitfields.C
1,587
utf_8
e1529e00808a519096138652632d46da
/* { dg-do link } */ /* { dg-options "--param allow-load-data-races=0 --param allow-store-data-races=0" } */ /* { dg-final { simulate-thread } } */ /* Test that setting <var.a> does not touch either <var.b> or <var.c>. In the C++ memory model, non contiguous bitfields ("a" and "c" here) should be considered as d...
google
android
atomics-2
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/simulate-thread/atomics-2.C
1,164
utf_8
d520d08dd3c9fb6458cefd008cac9547
/* { dg-do link } */ /* { dg-options "-std=c++0x" } */ /* { dg-final { simulate-thread } } */ using namespace std; #include <atomic> #include <limits.h> #include <stdio.h> #include "simulate-thread.h" atomic_int atomi; /* Non-atomic. Use a type wide enough to possibly coerce GCC into moving things around. */ l...
google
android
bitfields-2
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/simulate-thread/bitfields-2.C
1,464
utf_8
42ca2c92fb64d1147a01ff1890d584f8
/* { dg-do link } */ /* { dg-options "--param allow-load-data-races=0 --param allow-store-data-races=0" } */ /* { dg-final { simulate-thread } } */ /* Test that setting <var.a> does not touch either <var.b> or <var.c>. In the C++ memory model, non contiguous bitfields ("a" and "c" here) should be considered as d...
google
android
atomics-1
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/simulate-thread/atomics-1.C
1,489
utf_8
edfb6558cf0e5780a778afe861b3c587
/* { dg-do link } */ /* { dg-options "-std=c++0x" } */ /* { dg-final { simulate-thread } } */ /* Test that atomic int and atomic char work properly. */ using namespace std; #include <atomic> #include <limits.h> #include <stdio.h> #include "simulate-thread.h" atomic<int> atomi; atomic<char> atomc; /* No need for p...
google
android
ttp9
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/ttp9.C
588
utf_8
32ec8290dcb76d620e429687f0236c40
// { dg-do compile } // PR c++/12170: Deducing template template parameter from nested // class template. template <typename> struct W {}; template< template<typename> class F, typename T> int foo(W< F<T> >); template<typename T> struct L { static int const value = sizeof(foo(W<T>())); typedef T type; }; templ...
google
android
const2
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/const2.C
319
utf_8
98b1720316bc749eaed8150f3ddb776c
// PR c++/39608 // We were improperly considering dependent members of the current // instantiation to be non-constant (and therefore invalid template // non-type arguments). template <int I> struct C {}; template <class T> struct A { static const T x = 1; C<A<T>::x> c; // { dg-bogus "invalid" } }; A<int> a;
google
android
pr28301
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/pr28301.C
239
utf_8
d3ba333f92088ba255ebad2bc17cd0cf
// PR c++/28301 // { dg-do compile } template<typename> struct A { template<int> void foo() }; // { dg-error "initializer" } template<> struct A<void> { template<int> void foo(); }; void bar() { A<void> a; a.foo<0>(); }
google
android
error20
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/error20.C
88
utf_8
c76b01c2f7357d4400cd8e049826cc38
// PR c++/25439 template<int> struct A; template<> int A<0>; // { dg-error "invalid" }
google
android
error46
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/error46.C
262
utf_8
d9a7aa2040681bdfe2554b4abe8205e0
// PR c++/51230 template<int> struct A {}; template<int N> void foo(A<N>, A<N>); // { dg-message "template" } void bar() { foo(A<0>(), A<1>()); // { dg-error "no matching" } } // { dg-message "candidate|parameter 'N' ('0' and '1')" "" { target *-*-* } 9 }
google
android
conv9
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/conv9.C
163
utf_8
8de20cec2491fd7ca8d7d9e44e45478a
// PR c++/28557 struct A { template<typename T> operator T() { return T(); } }; template<int> void foo() { A().operator int(); } void bar() { foo<0>(); }
google
android
partial2
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/partial2.C
388
utf_8
e2ea27f4d30c89986de472da016881a2
// { dg-do compile } // PR c++/11154: Multi-level template argument in partial ordering of // class template template <class A> struct Outer { template <class T, class U = void, class V = void> struct Foo {}; template <class T, class U> struct Foo<T,U,void> {}; template <class T> struct Foo<T,void,void> {}; };...
google
android
using20
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/using20.C
196
utf_8
320afc20e453862a122ac3d0bdda181b
// PR c++/51925 struct E { int e (); }; template <typename T1> struct G : public E { using E::e; template <int> void e (); void f () { e <0> (); } }; int f(void) { G<int> a; a.f(); }
google
android
call4
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/call4.C
331
utf_8
865f009ddc0a20c3f776c322940208a1
// PR c++/25364 class OFX_PropertySuiteV1 { static int propGetDouble (); }; template<int dimension, class T, int (*PROPGET)() > struct OFX_AnimatedNumberParam { virtual int paramSetValueAtTime() { return PROPGET(); } }; void f() { new OFX_AnimatedNumberParam<2,double,OFX_PropertySuiteV1::propGetDo...
google
android
nested4
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/nested4.C
196
utf_8
b12c9a151e46871b430564ee47c57714
template <typename T> struct A { template<typename S> struct B { typedef A<S> X; }; }; template<typename> void f() { typedef A<int>::B<double>::X X; } template void f<int> ();
google
android
static14
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/static14.C
176
utf_8
ff5a3d46b4c279a829a0b1e0eb4acdac
struct Base { int x; }; template <typename T> struct A { static const int N = sizeof(static_cast<Base*>(T())); int a[N]; }; struct Derived : Base { A<Derived*> a; };
google
android
unify1
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/unify1.C
439
utf_8
450c0b9e346d4201c85d9055f20ebf1a
// Test non-type template argument folding. // { dg-do compile } template < int I1, int I2 > class unit { public: unit() {} unit( const unit<I1,I2>& ) {} template< int Q1, int Q2 > unit< I1 - Q1, I2 - Q2 > operator / ( const unit< Q1, Q2 >& rhs ) const { return unit< I1 - Q1, I2 - Q2 >(); } }; int m...
google
android
sizeof13
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/sizeof13.C
392
utf_8
52cb6bded099df9ce613e3e3e21f7a8a
// PR c++/42623 // We should choose f(B) because f(A<undef>) involves applying sizeof to // an incomplete class, so it is removed by SFINAE. // { dg-do link } struct undef; template <typename U, int N = sizeof(U)> struct A { A(int); }; template <typename U> void f(A<U>); template <typename U> struct B { B(int) { } }...
google
android
stmtexpr1
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/stmtexpr1.C
150
utf_8
53fcc90b25ad8744232fbb7b915d3d89
// PR c++/17404 // { dg-do compile } // { dg-options "" } template <int> void foo () { __builtin_expect (({0;}), 1); } template void foo<1> ();
google
android
ptrmem18
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/ptrmem18.C
606
utf_8
c29b186e715b166abc3703fea2205647
// PR c++/33616 // { dg-do run } // { dg-options "-O2" } extern "C" void abort (); struct S { int c; S () : c (0) {} virtual void f1 () { c += 1; } virtual void f2 () { c += 16; } }; struct T { S s; }; typedef void (S::*Q) (); template <Q P> void test1 (T *t) { (t->s.*P)(); } template <Q P> void test2...
google
android
ttp20
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/ttp20.C
193
utf_8
e418b0b8fa3fa6c89ea62a249937f9c4
// PR c++/27424 // Bug: failing to substitute the 'int' into C template<typename T> struct A { template<template<T> class> struct B {}; template<T> struct C; B<C> b; }; A<int> a;
google
android
overload11
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/overload11.C
450
utf_8
36f046a8855c4966a1c3643a3557e887
// PR c++/39413 // We don't need to instantiate Wrapper<int> to check the // foo(const Thingy&) overload. template <class T> struct Incomplete; template <typename T> class Wrapper { Incomplete<T> i; }; template <typename T> struct Thingy { Thingy(); Thingy(const Wrapper<T>& v); template <typename X> void fo...
google
android
crash53
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/crash53.C
229
utf_8
31afa14b98908513c290d08fb3c8185c
// PR c++/28110 // { dg-do compile } template<int> struct A {}; template<typename T> struct B { template<T I> B(A<I>); // { dg-error "template non-type parameter" } }; B<double> a=A<0>(); // { dg-error "non-scalar type" }
google
android
array9
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/array9.C
277
utf_8
9ff0e683b6d55fee7915dd8f28470138
// PR c++/18429 int subtrees = 4; template< class T > struct Tree { Tree* L[subtrees]; // { dg-error "" } Tree* R[subtrees]; // { dg-error "" } ~Tree() { delete [] L[0]; // { dg-error "" } delete [] R[0]; // { dg-error "" } } }; void f() { Tree<int> t; }
google
android
enum3
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/enum3.C
299
utf_8
dfe8fe9abce8be55414485a111a8c15f
// PR c++/17327 enum E { E0, E1 }; template <class T,class U> class A {}; template <class T> void f(A<E,T>) {} // We used to issue a "sorry" message. By using an explicit error // message below, we make sure that we will not match "sorry". template void f(A<int,E>); // { dg-error "template-id" }
google
android
typedef15
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/typedef15.C
390
utf_8
b9875172b6e849d858fc2d69a332444c
// Origin: PR c++/26693 // { dg-do compile } template<class T> struct C0; struct Foo { typedef int TypedefedFoo; typedef C0<Foo> TypedefedC0; }; template<class T> struct C0 { typedef Foo TypedefedFoo; typename T::TypedefedC0::TypedefedFoo m; }; template<class U> struct C1 { typedef C0<Foo> TypedefedC0; }; C0<...
google
android
const5
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/const5.C
197
utf_8
42ba21e587db92d23dbd323c32e26350
// PR c++/49176 // { dg-options -std=c++0x } struct A { static int a(); }; template<int> struct B { static int const b; }; int f() { return B<0>::b; } template<int I> int const B<I>::b=A::a();
google
android
crash9
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/crash9.C
131
utf_8
44592f20d07e36f90633528dd90bfad3
struct A { }; struct B { }; A f(const B & b) { return A(); } template<> B f(const A & a) { // { dg-error "" } return B(); }
google
android
ptrmem12
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/ptrmem12.C
442
utf_8
adf178bf638c6b871c4bd9abf0c44c53
template <class _Ret, class _Tp> void mem_fun_ref(_Ret (_Tp::*__f)()); struct A { double f(); }; void h () { mem_fun_ref(&A::f); } template <class T> void f() { mem_fun_ref(&A::f); } void g() { f<int>(); }
google
android
unify5
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/unify5.C
303
utf_8
a356fc4e8d85f399c730f255f0823551
// PR:c++/14007 template <typename T> struct X {}; // #1 template <typename T> struct X<const T>; //#2 template struct X<int&>; //#3
google
android
memtmpl2
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/memtmpl2.C
341
utf_8
742c5d9c3baa52309d717d8a67cb74e7
// { dg-do compile } // PR c++/12332. ICE template <unsigned D> class TPL; template <typename T> struct X { template <template <typename> class V> V<TPL<V<int>::d> > operator () (); }; void Foo (X<int> x) {}
google
android
constant1
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/constant1.C
236
utf_8
86a7d82d7e4fadd71353ebf643d761f0
// PR c++/49855 extern void foo(int); template <class Key, class Value> void Basic() { const int kT = 1.5e6; // <--- causes ICE int size = kT*2/3; do { foo(size); size = size * 0.5 - 1; } while (size >= 0 ); }
google
android
crash90
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/crash90.C
185
utf_8
efaa2028c9ccfb1df47967a48a4b3431
// PR c++/39750 template < unsigned > struct A ; template < typename > struct B ; template < typename T , A < B < T > // { dg-error "initializer|parse error|valid type|expected" } { }
google
android
ptrmem20
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/ptrmem20.C
302
utf_8
81a6774120ce149534db6fc79b3ba354
// PR c++/43079 struct A {}; struct B { void foo() const; void foo(); }; template<void (A::*)()> void bar(); // { dg-message "note" } void baz() { bar<&B::foo>(); // { dg-error "not a valid template argument|no match" } // { dg-message "candidate" "candidate note" { target *-*-* } 15 } }
google
android
static27
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/static27.C
169
utf_8
1b82adb3481fed24cf9d4678fad7ec3a
// PR c++/28235 template<typename> struct A { static const bool i = true; template<bool = i> struct B {}; B<> b; }; void f() { A<int> a1, a2; a1.b = a2.b; }
google
android
anon5
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/anon5.C
166
utf_8
c49d0d53d89b9f43c9efd96309b57cfa
// PR c++/45651 namespace { template <int T> struct A {}; } template <int T> struct B { void f(A<T>); }; template struct B<1>; template<int T> void B<T>::f(A<T>) {}
google
android
non-dependent6
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/non-dependent6.C
137
utf_8
45dd220f658e86742366772757b041e2
// PR c++/15285 void foo(void (*func)()) {} template<typename T> void bar() {} template<typename T> void baz() { foo(&bar<long>); }
google
android
sizeof1
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/sizeof1.C
261
utf_8
8af3d67f6d9f4dd6cda097137e1aaa5e
// Test use of `sizeof' as a template parameter. // { dg-do compile } template <unsigned I> struct A { static char *value; }; template <typename SizeType> struct B { char * f() const { return (A<sizeof(void *)>::value); } };
google
android
crash56
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/crash56.C
354
utf_8
33e6f2d8b3773c0bca8704049deea0c9
// PR c++/28705 // DR 218 is debating whether this is well formed or not. We've never // accepted it (because we'd crash), so we continue to reject it, but // without crashing. namespace N { struct A { A (A*); }; } template<typename T> void g (N::A *p) { (void) A (p); // { dg-message "" "" } }
google
android
sfinae6
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/sfinae6.C
1,947
utf_8
2622d4a8e2409cf748878b7d2db89477
// DR 339 // // Test of the use of the function call operator with SFINAE typedef char yes_type; struct no_type { char data[2]; }; template<typename T> T create_a(); template<typename T> struct type { }; template<bool, typename T = void> struct enable_if { typedef T type; }; template<typename T> struct enable_if<fal...
google
android
using1
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/template/using1.C
562
utf_8
36bc33b0a7d4f4c6efc1f83c1b6bf13b
// { dg-do run } // PR 9447. Using decls in template classes. template <class T> struct Foo { int i; }; struct Baz { int j; }; template <class T> struct Bar : public Foo<T>, Baz { using Foo<T>::i; using Baz::j; int foo () { return i; } int baz () { return j; } }; int main() { Bar<int> bar; bar.i = 1...