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
josh
.C
external/github.com/llvm/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
chromium
copyconstructor
.C
external/github.com/llvm/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
chromium
reference
.C
external/github.com/llvm/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
chromium
josh
.C
native_client/pnacl-compiler-rt/test/BlocksRuntime/josh.C
590
utf_8
030ca52355db3be28b65f1b82b6b3e9b
// // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // CONFIG C++ GC RR open rdar://6347910 struct MyStruct { int something; }; struct TestObject { void test(void){ { MyStruct first; // works ...
google
chromium
copyconstructor
.C
native_client/pnacl-compiler-rt/test/BlocksRuntime/copyconstructor.C
1,643
utf_8
5b9e0eb6d488e554e26380d52c0399d8
// // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source #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(C...
google
chromium
reference
.C
native_client/pnacl-compiler-rt/test/BlocksRuntime/reference.C
1,655
utf_8
8d796e387ce51dbea4fde4e1c554c4d9
// // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source #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: TestOb...
google
chromium
dtor
.C
native_client/nacl-newlib/libgloss/mips/dtor.C
330
utf_8
43b215ef5b769dbd29a8f357ab05c18a
#include <stdio.h> extern "C" void print (char *, ...); class foo { public: foo () { print ("ctor\n"); } ~foo () { print ("dtor\n"); } }; foo x; main () { outbyte ('&'); outbyte ('$'); outbyte ('%'); print ("FooBar\r\n"); /* whew, we made it */ print ("\r\nDone...\r\n"); fflush(stdout); }
google
chromium
dtor
.C
native_client/nacl-newlib/libgloss/m68k/dtor.C
330
utf_8
43b215ef5b769dbd29a8f357ab05c18a
#include <stdio.h> extern "C" void print (char *, ...); class foo { public: foo () { print ("ctor\n"); } ~foo () { print ("dtor\n"); } }; foo x; main () { outbyte ('&'); outbyte ('$'); outbyte ('%'); print ("FooBar\r\n"); /* whew, we made it */ print ("\r\nDone...\r\n"); fflush(stdout); }
google
chromium
dtor
.C
native_client/nacl-newlib/libgloss/sparc/dtor.C
335
utf_8
04da33f1419682870ae686bba36f3546
#include <stdio.h> extern "C" void print (char *, ...); class foo { public: foo () { print ("ctor\n"); } ~foo () { print ("dtor\n"); } }; foo x; main () { outbyte ('&'); outbyte ('$'); outbyte ('%'); print ("FooBar\r\n"); /* whew, we made it */ print ("\r\nDone...\r\n"); /* fflush(stdout); */ }
google
chromium
josh
.C
external/llvm.org/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
chromium
copyconstructor
.C
external/llvm.org/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
chromium
reference
.C
external/llvm.org/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
CVTUTF7
.C
platform/external/unicode/CVTUTF7.C
8,116
utf_8
1905ada95c664efa6ea654a6c8892e3b
/* ================================================================ */ /* File: ConvertUTF7.c Author: David B. Goldsmith RESTRICTED RIGHTS LEGEND: Use, duplication, or disclosure by the government is subject to restrictions as set forth in subparagraph clause at DFARS 252.227-7013 and FAR 52.227-19. This code may be ...
google
android
apple-kext-linkage
.C
platform/external/clang_35a/test/CodeGenCXX/apple-kext-linkage.C
904
utf_8
dc0b27e4bf3b8be7d38909623de0c537
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fapple-kext -emit-llvm -o - %s | FileCheck %s struct Base { virtual ~Base(); } ; struct Derived : Base { void operator delete(void *) { } Derived(); }; void foo() { Derived d1; // ok }
google
android
apple-kext-no-staticinit-section
.C
platform/external/clang_35a/test/CodeGenCXX/apple-kext-no-staticinit-section.C
483
utf_8
7cf3755756b5a0f693bab6a3751bad94
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fapple-kext -fno-rtti -emit-llvm -o - %s | FileCheck %s // rdar://8825235 /** 1) Normally, global object construction code ends up in __StaticInit segment of text section .section __TEXT,__StaticInit,regular,pure_instructions In kext mode, they end up in the __tex...
google
android
apple-kext-indirect-call-2
.C
platform/external/clang_35a/test/CodeGenCXX/apple-kext-indirect-call-2.C
2,342
utf_8
011a3c5a5a0f7e4e92aa2cb9622a147a
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fapple-kext -fno-rtti -emit-llvm -o - %s | FileCheck %s struct A { virtual const char* abc(void) const; }; const char* A::abc(void) const {return "A"; }; struct B : virtual A { virtual void VF(); }; void B::VF() {} void FUNC(B* p) { // CHECK-NEXT: [[T2:%.*]] = call...
google
android
apple-kext-indirect-call
.C
platform/external/clang_35a/test/CodeGenCXX/apple-kext-indirect-call.C
386
utf_8
19148fb29d76790919f156f8019a05b0
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fapple-kext -emit-llvm -o - %s | FileCheck %s struct Base { virtual void abc(void) const; }; void Base::abc(void) const {} void FUNC(Base* p) { p->Base::abc(); }
google
android
reference
.C
toolchain/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/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/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
foo5
.C
platform/ndk/tests/build/cpp-extensions/jni/foo5.C
84
utf_8
88dde2239a1a3cc6c1eaf4a72e9ae720
namespace cpp { extern int foo4(int); int foo5(int x) { return foo4(x) + 5; } }
google
android
main
.C
platform/ndk/tests/build/c++-stl-source-extensions/jni/main.C
19
utf_8
b20ceba765d5c5a50ad32f6692797a03
#include "main.cc"
google
android
cxx-test
.C
platform/external/bluetooth/glib/tests/cxx-test.C
114
utf_8
470a128f3a8ac615a66fed8fccb47f23
#include <glib.h> #include <gmodule.h> #include <glib-object.h> #include <gio/gio.h> int main () { return 0; }
google
android
uninit-pred-3_a
.C
toolchain/gcc/gcc-4.9/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.9/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.9/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.9/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.9/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.9/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.9/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
fstack-protector-strong
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/fstack-protector-strong.C
581
utf_8
fd84cfde48cf00e3a8cbef1051ae918a
/* Test that stack protection is done on chosen functions. */ /* { dg-do compile { target i?86-*-* x86_64-*-* } } */ /* { dg-options "-O2 -fstack-protector-strong" } */ class A { public: A() {} ~A() {} void method(); int state; }; /* Frame address exposed to A::method via "this". */ int foo1 () { A a; a....
google
android
pr50763-3
.C
toolchain/gcc/gcc-4.9/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.9/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.9/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
pr58950
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/pr58950.C
269
utf_8
1afffa3d74939421dcfa7501280f88dd
/* { dg-do compile } */ /* { dg-options "-Wall" } */ void f(){ int i __attribute__((vector_size(2*sizeof(int)))) = { 2, 3 }; __builtin_shuffle (i, i); /* { dg-warning "value computed is not used" } */ ++i?1:0; /* { dg-warning "value computed is not used" } */ }
google
android
pr46065
.C
toolchain/gcc/gcc-4.9/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.9/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.9/gcc/testsuite/g++.dg/constexpr-null1.C
349
utf_8
f25f03bef75b49b3242b2b981a26687a
// PR c++/46670 // { dg-do compile { target c++11 } } 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( ...
google
android
uninit-pred-2_b
.C
toolchain/gcc/gcc-4.9/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.9/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
pr60969
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/pr60969.C
728
utf_8
11692c0a1d9e603f30a38169f72d42aa
/* { dg-do compile { target { { i?86-*-* x86_64-*-* } && ia32 } } } */ /* { dg-options "-O2 -ftree-vectorize -march=pentium4 -mfpmath=387" } */ struct A { float f, g, h, k; A () {} A (float v0, float x, float y) : f(v0), g(x), h(y), k(0.0f) {} A bar (A &a, float t) { return A (f + a.f * t, g + a.g * t, h + a.h...
google
android
pr44486
.C
toolchain/gcc/gcc-4.9/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.9/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
pr49847
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/pr49847.C
134
utf_8
c7d91c8d394b3d1a963e73a4fc599344
/* { dg-do compile } */ /* { dg-options "-O -fnon-call-exceptions" } */ int f (float g) { try { return g >= 0; } catch (...) {} }
google
android
pr55263
.C
toolchain/gcc/gcc-4.9/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
pr59445
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/pr59445.C
2,414
utf_8
9c0ce580f44d602ace281aad58b9f777
/* { dg-do compile } */ /* { dg-options "-O2" } */ template <typename _Iterator> struct A; template <typename _Tp> struct A<_Tp *> { typedef _Tp value_type; typedef int difference_type; }; template <typename _Compare> struct B {}; template <typename _Compare> struct C { _Compare _M_comp; template <typename _Va...
google
android
pr61289
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/pr61289.C
760
utf_8
1ec6b4df7e034d65d4befa4778662d11
/* { dg-do run } */ /* { dg-options "-O2 -fno-exceptions" } */ struct S { inline int fn1 () const { return s; } __attribute__ ((noinline, noclone)) S *fn2 (int); __attribute__ ((noinline, noclone)) void fn3 (); __attribute__ ((noinline, noclone)) static S *fn4 (int); S (int i) : s (i) {} int s; }; int a =...
google
android
pr61094
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/pr61094.C
513
utf_8
a11ecfc0510623f70458e31e48d431fb
/* { dg-do compile } */ /* { dg-options "-O3" } */ template <typename> struct A { unsigned _width, _height, _depth, _spectrum; template <typename t> A(t p1) { int a = p1.size(); if (a) { _width = p1._width; _depth = _height = _spectrum = p1._spectrum; } } long size() { return (long)_wi...
google
android
system-binary-constants-1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/system-binary-constants-1.C
413
utf_8
bd853fa3602fc9067d8ef7e97d9986cb
/* { 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.9/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.9/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.9/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.9/gcc/testsuite/g++.dg/pr57878.C
7,460
utf_8
81d244cbbe16d1fd91f82022ebe24bc4
/* { dg-do compile { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */ // { dg-require-effective-target c++11 } /* { dg-options "-O2 -fno-omit-frame-pointer -fPIC" } */ typedef int int32; typedef long long int64; typedef unsigned int uint32; typedef unsigned long long uint64; namespace std { typedef __SIZE_TYPE__ s...
google
android
pr46890
.C
toolchain/gcc/gcc-4.9/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.9/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.9/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
pr49718
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/pr49718.C
1,495
utf_8
6dcfc0220336a51517b7c74c7a9ea7c8
/* { dg-do compile } */ /* { dg-options "-O2 -finstrument-functions" } */ /* { dg-additional-options "-mno-explicit-relocs" { target alpha*-*-* } } */ /* { dg-additional-options "-mno-relax-pic-calls" { target mips*-*-* } } */ /* { dg-final { scan-assembler-times "__cyg_profile_func_enter" 1 { target { ! { hppa*-*-hpux...
google
android
pr64037
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/pr64037.C
446
utf_8
673d6fbc490d70de4eb8279ad884c093
// { dg-do run { target i?86-*-* x86_64-*-* } } // { dg-options "-std=c++11 -Os" } enum class X : unsigned char { V = 2, }; static void __attribute__((noinline,noclone)) foo(unsigned &out, unsigned a, X b) { out = static_cast<unsigned>(b); } int main() { unsigned deadbeef = 0xDEADBEEF; asm volatile ("" : "+d...
google
android
pr50672
.C
toolchain/gcc/gcc-4.9/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
pr62079
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/pr62079.C
1,760
utf_8
30b2d39fd31772d17a8fd88b54ae69a3
// { dg-do compile } // { dg-options "-std=c++11 -O2 -fnon-call-exceptions" } template < typename > class allocator; template < class _CharT > struct char_traits; template < typename _CharT, typename _Traits = char_traits < _CharT >, typename _Alloc = allocator < _CharT > >class basic_string; typedef basic_string <...
google
android
pr57175
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/pr57175.C
251
utf_8
3e6fd08b5cdf6e46c9fefb4cb0720e23
/* { dg-do compile { target c++11 } } */ extern "C" void do_not_remove (); struct A { A () { } A (A const&) { do_not_remove (); } }; A f () { alignas (2 * alignof (A)) A x; return x; } /* { dg-final { scan-assembler "do_not_remove" } } */
google
android
pr45330
.C
toolchain/gcc/gcc-4.9/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
pr60518
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/pr60518.C
190
utf_8
423a4225250186b2746ca0c376b8124a
// { dg-do compile } // { dg-options "-Os -fprofile-use" } int a; int fn1 () { return a == ',' || a == ';'; } void fn2 () { do while (fn1 ()) ; while (1); }
google
android
predict-loop-exit-2
.C
toolchain/gcc/gcc-4.9/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
pr57662
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/pr57662.C
9,135
utf_8
01d0050661643bfd95a3c181ee0ca03e
/* { dg-do compile { target powerpc*-*-* ia64-*-* x86_64-*-* } } */ /* { dg-options "-O2 -fselective-scheduling2 -fsel-sched-pipelining" } */ extern "C" { typedef struct _IO_FILE FILE; extern int putc(int __c, FILE * __stream); extern int strcmp(__const char *__s1, __const char *__s2) throw() __attribute__ ((_...
google
android
thunk_section_name
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/thunk_section_name.C
562
utf_8
8ad88528d4cc3ce7d18ceee669bb5b4f
/* { dg-require-named-sections "" } */ /* { dg-do compile } */ /* { dg-options "-O2 -fno-reorder-blocks-and-partition -ffunction-sections" } */ class base_class_1 { public: virtual void vfn () {} }; class base_class_2 { public: virtual void vfn () {} }; class need_thunk_class : public base_class_1, public base_c...
google
android
pr53055
.C
toolchain/gcc/gcc-4.9/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.9/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.9/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.9/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.9/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
pr54442
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/pr54442.C
194
utf_8
602b3ed9ed82ed3733e6a28dadc4d0e6
/* { dg-do compile } */ struct S { void s (int) const throw (); void s (int) throw (); }; typedef int index_t; void (S::*f) (index_t) = &S::s; void (S::*g) (index_t) const = &S::s;
google
android
pr45112
.C
toolchain/gcc/gcc-4.9/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.9/gcc/testsuite/g++.dg/pubtypes.C
1,222
utf_8
811592037db74bbc53431e930fefbe1a
/* 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.9/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.9/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.9/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
pr59482
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/pr59482.C
103
utf_8
4afad787e09b4874a12312416375d3cb
/* { dg-do compile } */ class aa { friend class cc; class bb {}; }; class cc : aa::bb {};
google
android
pr59477
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/pr59477.C
244
utf_8
f30a79885e763e341eec192a87cfd3ff
/* { dg-do compile } */ /* { dg-options "-O" } */ struct A { unsigned *a, b; A (unsigned x) : a (), b (x) {} }; struct B { B (int); B (const B &) {} }; B bar (B, B, A); int v; void foo () { B c = 0; bar (c, c, A (1ULL << v)); }
google
android
pr45310
.C
toolchain/gcc/gcc-4.9/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
pr58389
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/pr58389.C
1,186
utf_8
a1888ee89e80f1205b9ddb9cc86a5133
/* { dg-do compile } */ /* { dg-options "-O2" } */ template <typename _RandomAccessIterator, typename _Compare> void __insertion_sort(_RandomAccessIterator, _Compare); template <typename _RandomAccessIterator, typename _Compare> void __final_insertion_sort(_RandomAccessIterator p1, _Compare p2) { _RandomAccessIterat...
google
android
pr45049-1
.C
toolchain/gcc/gcc-4.9/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.9/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.9/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.9/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
pr58438
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/pr58438.C
712
utf_8
0c280631aeb0bc616580714fa3ff6cac
/* { dg-do compile { target i?86-*-* x86_64-*-* } } */ /* { dg-options "-march=amdfam10 -O3 -fprofile-generate" } */ enum gimple_code {}; struct A { gimple_code code; }; struct B { A gsbase; }; int **a; int b, d, e, f, g, h, i, j, k, l, m, n, o; gimple_code c, p; class C { virtual unsigned m_fn1(); }; B q; static...
google
android
pr59510
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/pr59510.C
2,111
utf_8
c48f8e06d0c4fb011bdd97b2641d239a
// PR debug/59510 // { dg-do compile } // { dg-options "-O2 -g --param=large-stack-frame-growth=1" } template <typename _Iterator> struct _Iter_base { typedef _Iterator iterator_type; }; template <typename _CharT> struct basic_ostream; template <typename _CharT> struct basic_ostringstream; template <typename _CharT>...
google
android
pr55604
.C
toolchain/gcc/gcc-4.9/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.9/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
uninit-pred-2_a
.C
toolchain/gcc/gcc-4.9/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.9/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.9/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.9/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.9/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.9/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.9/gcc/testsuite/g++.dg/simulate-thread/atomics-2.C
1,199
utf_8
3357bf9a2204710e948cb278fb4c4266
/* { dg-do link { target c++11 } } */ /* { dg-final { simulate-thread } } */ /* { dg-require-effective-target sync_int_long } */ 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 ...
google
android
bitfields-2
.C
toolchain/gcc/gcc-4.9/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.9/gcc/testsuite/g++.dg/simulate-thread/atomics-1.C
1,578
utf_8
358da784b700bf42b91032b2ceb71406
/* { dg-do link { target c++11 } } */ /* { dg-final { simulate-thread } } */ /* { dg-require-effective-target sync_char_short } */ /* { dg-require-effective-target sync_int_long } */ /* Test that atomic int and atomic char work properly. */ using namespace std; #include <atomic> #include <limits.h> #include <stdio....
google
android
ttp9
.C
toolchain/gcc/gcc-4.9/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.9/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;