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
typeid4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/rtti/typeid4.C
430
utf_8
f45226306cb853d7f47a657db3e4f853
// { dg-do run } // { dg-options "-O2" } #include <typeinfo> #include <iostream> struct A { virtual ~A () {} }; struct APtr { APtr (A* p) : p_ (p) { } A& operator* () const { return *p_; } A* p_; }; int main () { APtr ap (new A); std::type_info const* const exp = &typeid (*ap); for (bool cont = true;...
google
chromium
typeid2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/rtti/typeid2.C
293
utf_8
f03a5377eca516c74e77fcf76b40f948
// { dg-do run } #include <typeinfo> template <typename T> const char *print_type (const T &) { return typeid(T).name(); } /* no template */ void pp1 (int) {} template <typename X> void pp2 (X) {} int main () { if (print_type (&pp1) != print_type (&pp2<int>)) return 1; }
google
chromium
crash1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/rtti/crash1.C
208
utf_8
7345c9463c7d47c7d425463846af6b14
// { dg-do compile } // PR 7788. ICE class foo; extern const foo bar; class bar;
google
chromium
predefined-rtti-macro-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/rtti/predefined-rtti-macro-1.C
163
utf_8
352a1ba9eb698ac9c7b5ff1d691318bb
// { dg-do compile } struct A { virtual ~A() { }; }; struct B : A { }; void f(B* bp) { bp = #ifdef __GXX_RTTI dynamic_cast<B*>(static_cast<A*>(0)); #endif }
google
chromium
darwin-builtin-linkage
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/rtti/darwin-builtin-linkage.C
530
utf_8
a30f80781bea4012b3066258d71adff2
/* { dg-do compile { target *-*-darwin* } } */ /* { dg-final { scan-assembler-not "\\.weak_definition __ZTI" } } */ /* Verify that none of the type_info structures for the fundamental types are emitted as weak on Darwin. */ #include <cxxabi.h> namespace __cxxabiv1 { using namespace std; // This has special mea...
google
chromium
crash4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/rtti/crash4.C
398
utf_8
d2801b8f989dad0612c1e7483b39be9d
/* { dg-do compile } */ /* { dg-options "-O" } */ class ios_base { public: virtual ~ios_base(); }; template<typename _CharT> class basic_ostream : virtual public ios_base { public: virtual ~basic_ostream() { } }; extern template class basic_ostream<char>; template <typename _CharT> class basic_ostringstream ...
google
chromium
cv1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/rtti/cv1.C
222
utf_8
7c2277ddbea5545cda84aae94fdb88ad
// { dg-do run } #include <typeinfo> #include <string.h> struct S {}; typedef S volatile T[4]; T t[3]; const std::type_info& ti = typeid (t); int main () { if (strcmp (ti.name (), "A3_A4_1S") != 0) return 1; }
google
chromium
typeid6
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/rtti/typeid6.C
219
utf_8
22af06883116fde7a979131b734afd60
// PR c++/33463 namespace std { class type_info {}; } template<int> void foo() { !typeid(void); // { dg-error "!typeid\\(void\\)|candidate is" } // { dg-message "" "match candidate text" { target *-*-* } 10 } }
google
chromium
redeclaration1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/guality/redeclaration1.C
385
utf_8
8773744d52f1fedc9192c4b6b54678d9
// { dg-do run } // { dg-options "-g" } // { dg-skip-if "" { *-*-* } { "-flto" } { "" } } volatile int l; namespace S { int i = 24; void __attribute__((noinline)) f() { int i = 42; l = i; // { dg-final { gdb-test 14 "i" "42" } } { extern int i; l = i; // { dg-final { gdb-test 17 "i" ...
google
chromium
pr46815
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/guality/pr46815.C
308
utf_8
9f6bd16255ea79978f41ff1fd8300ddc
// PR debug/46815 // { dg-do run } // { dg-options "-g" } // { dg-skip-if "" { *-*-* } { "*" } { "-O0" } } struct S { int i; S () { i = 42; } virtual void foo (void) {} }; S bar () { S s; return s; // { dg-final { gdb-test 17 "s.i" "42" } } } int main () { S s = bar (); return s.i - 42; }
google
chromium
init-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/tls/init-1.C
356
utf_8
e425d7fc584cf8535f3eee565f58f091
/* Valid initializations. */ /* { dg-require-effective-target tls } */ __thread int i = 42; static int j; __thread int *p = &j; /* Note that this is valid in C++ (unlike C) as a run-time initialization. */ int *q = &i; /* Valid because "const int k" is an integral constant expression in C++. */ __thread const in...
google
chromium
diag-5
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/tls/diag-5.C
194
utf_8
11481d47864021d1e3af511c6b632c29
// PR c++/30536 // Invalid __thread specifiers. // { dg-require-effective-target tls } struct A { __thread register int i; }; // { dg-error "multiple storage classes|storage class specified" }
google
chromium
diag-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/tls/diag-1.C
441
utf_8
ee5c01dd5d6ee9acf4d49c9a5a3191d0
// Valid __thread specifiers. // { dg-require-effective-target tls } __thread int g1; extern __thread int g2; static __thread int g3; void foo() { extern __thread int l1; static __thread int l2; } struct A { static __thread int i; }; __thread int A::i = 42; template <typename T> struct B { static __thread ...
google
chromium
diag-4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/tls/diag-4.C
311
utf_8
4e06600fe3c3221508c0f68b6530faa0
/* Invalid __thread specifiers. */ /* { dg-require-effective-target tls } */ __thread typedef int g4; /* { dg-error "multiple storage classes" } */ void foo() { __thread auto int l2; /* { dg-error "multiple storage classes" } */ __thread register int l4; /* { dg-error "multiple storage classes" } */ }
google
chromium
static-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/tls/static-1.C
393
utf_8
a9720fe58f11ddd0e2a21ab5df5a77bf
// { dg-do run } // { dg-options "-O2" } // { dg-require-effective-target tls_runtime } // { dg-add-options tls } // { dg-additional-sources "static-1a.cc" } extern "C" void abort (); extern int test (); struct A { static __thread int i; }; __thread int A::i = 8; int main () { if (A::i != 8) abort (); if...
google
chromium
init-2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/tls/init-2.C
324
utf_8
10343268e6f7694e905f1a28375376a7
/* Invalid initializations. */ /* { dg-require-effective-target tls } */ extern __thread int i; __thread int *p = &i; /* { dg-error "dynamically initialized" } */ extern int f(); __thread int j = f(); /* { dg-error "dynamically initialized" } */ struct S { S(); }; __thread S s; /* { dg-error "" } two errors here...
google
chromium
diag-3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/tls/diag-3.C
382
utf_8
d3a77f5144c1b5d84ba01e8256e86cb1
// Report invalid extern and __thread combinations. // { dg-require-effective-target tls } extern int j; // { dg-error "previously declared here" } __thread int j; // { dg-error "follows non-thread-local" } extern __thread int i; // { dg-error "previously declared here" } int i; // { dg-error "follows thread-loca...
google
chromium
trivial
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/tls/trivial.C
56
utf_8
7212556766805451a098e554a8ab648e
// { dg-require-effective-target tls } __thread int i;
google
chromium
diag-2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/tls/diag-2.C
1,129
utf_8
4948a33b82ca0e463d82c31ddb433ab5
/* Invalid __thread specifiers. */ /* { dg-require-effective-target tls } */ __thread extern int g1; /* { dg-error "'__thread' before 'extern'" } */ __thread static int g2; /* { dg-error "'__thread' before 'static'" } */ __thread __thread int g3; /* { dg-error "duplicate '__thread'" } */ typedef __thread int g4; /*...
google
chromium
truefalse
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/cpp/truefalse.C
470
utf_8
d80eeb1b5ab70a413bed1a37f44a69d6
/* Source: Neil Booth, 18 Apr 2003. */ /* { dg-do preprocess } */ /* { dg-options "-ansi -pedantic -Wundef" } */ /* Check that for C++ we handle true and false correctly, and do not treat them as undefined identifiers. */ #if true /* { dg-bogus "is not defined" } */ #error foo /* { dg-error "foo" } */ #endif #if...
google
chromium
c++_cmd_1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/cpp/c++_cmd_1.C
238
utf_8
7e8a47b64bd4b7100fb7912bb8130ffa
int main () { return 0; }
google
chromium
c++98-pedantic
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/cpp/c++98-pedantic.C
288
utf_8
8ce78309bd631829da82f2798d24d628
/* { dg-do preprocess } */ /* { dg-options "-std=c++98 -pedantic" } */ /* This file is for testing the preprocessor in -std=c++98 -pedantic mode. Neil Booth, 2 Dec 2000. */ #if 1LL /* { dg-warning "long long" } */ #endif
google
chromium
pragma-float-const-decimal64-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/cpp/pragma-float-const-decimal64-1.C
162
utf_8
3913be0d35b0c2d704cda15ffc55701e
// { dg-do compile } // { dg-options "-Wunknown-pragmas" } #pragma STDC FLOAT_CONST_DECIMAL64 ON // { dg-warning "not supported for C\\\+\\\+" } double d = 1.0;
google
chromium
string-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/cpp/string-1.C
292
utf_8
ead0ed22e4b6b79f8450b4a030173cbc
// Test location of diagnostics for interpreting strings. Bug 17964. // { dg-do compile } const char *s = "\q"; // { dg-error "unknown escape sequence" } const char *t = "\ "; // { dg-error "unknown escape sequence" } const char *u = "";
google
chromium
_Pragma1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/cpp/_Pragma1.C
257
utf_8
074cd02b7474e8119248041c10f08ad3
// PR c++/27748 // This is supposed to succeed only if // the target doesn't define HANDLE_PRAGMA_PACK_WITH_EXPANSION. // { dg-do compile { target { ! { *-*-solaris2* } } } } #define push bar #define foo _Pragma ("pack(push)") foo int i; #pragma pack(pop)
google
chromium
string-2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/cpp/string-2.C
224
utf_8
f84dfddf756951bbf37a1a9e3972a445
// Test diagnostics for interpreting strings: This is a pedwarn. // { dg-do compile } // { dg-options "" } const char *s = "\q"; // { dg-warning "unknown escape sequence" }
google
chromium
ucnid-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/cpp/ucnid-1.C
577
utf_8
b84d9012b6465e41dff6383936a93a52
/* { dg-do preprocess } */ /* { dg-options "-std=gnu++98 -pedantic -fextended-identifiers" } */ \u00AA /* { dg-error "not valid in an identifier" } */ \u00AB /* { dg-error "not valid in an identifier" } */ \u00B6 /* { dg-error "not valid in an identifier" } */ \u00BA /* { dg-error "not valid in an identifier" } */ \u0...
google
chromium
stringop-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/cpp/stringop-1.C
863
utf_8
9b49b49677814c73da8c0db6d2d2811c
/* Test for buffer overrun stringizing named operators longer than 4 characters. */ /* { dg-do compile } */ #define str(x) #x #define var(v,a,b,c,d) static const char v##a##b##c##d[] = str(xor_eq) #define var1(v,a,b,c) \ var(v,a,b,c,0); var(v,a,b,c,1); var(v,a,b,c,2); var(v,a,b,c,3); \ var(v,a,b,c,4); v...
google
chromium
c++98
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/cpp/c++98.C
232
utf_8
731959b0908b124d4eee4dab104d68bb
/* { dg-do preprocess } */ /* { dg-options "-std=c++98" } */ /* This file is for testing the preprocessor in -std=c++98 mode. Neil Booth, 2 Dec 2000. */ #if 1LL #endif
google
chromium
pedantic-errors
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/cpp/pedantic-errors.C
158
utf_8
5e10de393d1872d51958157aa6257743
/* { dg-do preprocess } */ /* { dg-options "-std=c++98 -pedantic-errors" } */ #if 1 #endif 1 /* { dg-error "extra tokens at end of #endif directive" } */
google
chromium
weak
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/cpp/weak.C
107
utf_8
388f26d66093d4cf51084fa41b5fbe6e
// { dg-options "-fno-weak" } #if __GXX_WEAK__ #error "__GXX_WEAK__ defined when -fno-weak in use" #endif
google
chromium
ucn-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/cpp/ucn-1.C
440
utf_8
2d4a7b99283dfb5d54412df06956412b
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2170.html // { dg-options "-std=c++0x -fextended-identifiers" } int main() { "\u0041"; // 'A' UCN is OK in string literal '\u0041'; // also OK in character literal int c\u0041c; // { dg-error "not valid in an identifier" } int c\u0024c; ...
google
chromium
ns1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/ns1.C
140
utf_8
f6c50007b333f25964b3ad2eb06e3773
// PR c++/14821 namespace A { namespace B {} } namespace A { namespace Alias = ::A::B; } namespace A { namespace Alias = ::A::B; }
google
chromium
gc2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/gc2.C
576
utf_8
bc5371eb8e8dcf79efb0889828991560
// PR c++/12316 // { dg-do compile } // { dg-options "--param ggc-min-expand=0 --param ggc-min-heapsize=0" } inline void FOO() {} template<typename> struct A { A() {} ~A() throw() {} }; template<typename> struct B { static void foo(); static void bar() { foo(); } }; struct C {}; template<typename> struc...
google
chromium
pr50212
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/pr50212.C
272
utf_8
ac3ba0e4d0da02a871ab3d83b9cc0bf2
// PR rtl-optimization/50212 // { dg-do compile } // { dg-require-effective-target freorder } // { dg-options "-O -fnon-call-exceptions -ftrapv -freorder-blocks-and-partition" } void foo (int n) { try { int i = 0; while (i++ < n); } catch (...) { } }
google
chromium
scope1
.C
native_client/pnacl-gcc/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
chromium
switch3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/switch3.C
262
utf_8
bb7141945a25ded3ef95f8a4fab53bff
// PR c++/39371 // { dg-do compile } void foo (bool b) { switch ((unsigned int) b) { case 1: case 2: break; } } void bar (unsigned char b) { switch ((unsigned int) b) { case 1: case 257: case 513: break; } }
google
chromium
pr27495
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/pr27495.C
162
utf_8
d135b9a72f0f848337f5db8cd4d42ca2
// Test to make sure we do not ICE on this invalid program. struct A { template<int> void foo(); void bar() { this.A::foo<0>(); } // { dg-error "" } };
google
chromium
spu2vmx-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/spu2vmx-1.C
310
utf_8
a9957b37b938af52bd091dea4f661da6
/* { dg-do compile { target powerpc*-*-* } } */ /* { dg-require-effective-target powerpc_spu } */ /* { dg-options "-maltivec" } */ #include <altivec.h> #include <spu2vmx.h> vec_uint4 f(vec_uint4 a, vec_uint4 b) { return spu_add(a, b); } vec_float4 f(vec_float4 a, vec_float4 b) { return spu_add(a, b); }
google
chromium
array1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/array1.C
204
utf_8
ceb0c0d2e878f1b7898a912bfe02d365
// Test typeid of multidimensional array with no bounds. // { dg-do compile } #include <typeinfo> int main() { const char *s = typeid(double[][]).name(); // { dg-error "bounds|confused" } return 0; }
google
chromium
pr42806
.C
native_client/pnacl-gcc/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
chromium
pr36944
.C
native_client/pnacl-gcc/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
chromium
anon-union
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/anon-union.C
273
utf_8
e7bda64a0fd9d0057a48814a978e1851
// { dg-do compile } // { dg-options -O2 } int foo (); double bar (void) { union { char a[8]; double b; }; a[0] = foo (); a[1] = foo (); a[2] = foo (); a[3] = foo (); a[4] = foo (); a[5] = foo (); a[6] = foo (); a[7] = foo (); return b; }
google
chromium
field1
.C
native_client/pnacl-gcc/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
chromium
infloop-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/infloop-1.C
294
utf_8
78e796e41e24a5aabf8b9d7868a3129a
// PR 18300: This sends old compilers into an infinite loop on x86_64 struct base1 { }; struct base2 { }; struct base3 { }; struct derived : base1, base2, base3 { }; void foo(derived); int main() { foo(derived()); }
google
chromium
error33
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/error33.C
240
utf_8
dc99910fb2d0aaf7a5c4306f76bad987
// Origin: PR c++/42218 // { dg-do compile } template<int> struct A { template<int> struct B; }; int i = A<0>::B<0>::X::Y; // { dg-error "'A<0>::B<0>::X' has not been declared" }
google
chromium
ctor1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/ctor1.C
227
utf_8
77b7a83e4c4a267c5a040e6fe91b27f2
/* { dg-do compile } */ // PR C++/30303 // This used to ICE because we did not return NULL // in grokfndecl when an error happened. class A { int i; }; A::A() { A(); } /* { dg-error "definition of implicitly-declared" } */
google
chromium
pr42685
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/pr42685.C
206
utf_8
17309afbd34e4b010edce7cdf8af0393
// { dg-do compile } // { dg-options "-O -funroll-loops -fcompare-debug" } void Remap(int n, int *src, int *dst, int *map) { do { int i = *src; if (i != 0) *dst = map[i]; } while (--n != 0); }
google
chromium
cv_func
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/cv_func.C
438
utf_8
cac7cfec370c32e609a24bd5d3bf9b4c
// { dg-do compile } typedef int FIC(int) const; typedef int FI(int); FIC f; // { dg-error "qualified" } 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; } i...
google
chromium
i386-7
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/i386-7.C
269
utf_8
a32a5af1b4c57aabcbdaa817835a698d
/* Test that x86intrin.h is usable with -O -pedantic-errors. */ /* We were using SSE4.2 builtins without the extension available. */ /* { dg-do compile { target i?86-*-* x86_64-*-* } } */ /* { dg-options "-O -pedantic-errors" } */ #include <x86intrin.h> int dummy;
google
chromium
pr39496
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/pr39496.C
928
utf_8
4b8017dcd67c2292d7907da186853fd6
// PR target/39496 // { dg-do compile { target { { i?86-*-linux* 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 optimizing. // { dg...
google
chromium
canon-31724
.C
native_client/pnacl-gcc/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
chromium
error7
.C
native_client/pnacl-gcc/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
chromium
i386-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/i386-1.C
440
utf_8
3ca5017faf45f39326ff4e30a1ec1ba8
/* { dg-do run { target i?86-*-* x86_64-*-* } } */ /* { dg-options "-msse2" } */ /* { dg-require-effective-target sse2_runtime } */ #include <xmmintrin.h> static void sse2_test (void) { float a = 1.0f; float b = 2.0f; float c = 3.0f; float r; __m128 v = _mm_set_ps(a, b, c, 0); v = (__m128)_mm_srli_si1...
google
chromium
ptrmem2
.C
native_client/pnacl-gcc/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
chromium
opaque-2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/opaque-2.C
391
utf_8
b4568481fda7d8fe66f09f6c78ec5fab
/* { dg-do compile } */ /* { dg-options "-mcpu=8540 -mspe -mabi=spe -mfloat-gprs=single" } */ /* { dg-skip-if "not an SPE target" { ! powerpc_spe_nocache } { "*" } { "" } } */ #define __vector __attribute__((vector_size(8))) typedef float __vector __ev64_fs__; __ev64_fs__ f; __ev64_opaque__ o; extern void bar (__ev6...
google
chromium
static1
.C
native_client/pnacl-gcc/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
chromium
error29
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/error29.C
661
utf_8
f6ef4e2724fa7ce062da94fa1778b050
// PR c++/35334 // { dg-do compile } // { dg-bogus "not supported by" "" { target *-*-* } 0 } __complex__ unsigned int i; int j; char k; __complex__ double l; double m; float n; void foo () { ((__complex__ int)i)(); // { dg-error "cannot be used as a function" } ((__complex__ int)j)(); // { dg-error "cannot be ...
google
chromium
friend1
.C
native_client/pnacl-gcc/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
chromium
error12
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/error12.C
126
utf_8
e1eac1beda3a4145544bb54bc5a9b600
//PR c++/28292 extern "Java" { struct A { void foo(void; // { dg-error "before|incomplete type|invalid use" } }; }
google
chromium
pr35011
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/pr35011.C
418
utf_8
4ab0218701107940b50c945a0965a43d
// { dg-do compile } // { dg-options "-O3 -fcheck-data-deps" } double foo(const double* p0, const double* p1, const double* q0) { double d; for (; p0 != p1; ++p0, ++q0) d += *p0 * *q0; return d; } struct A { double x[3]; const double* begin() const { return x; } }; struct B { A a0, a1; double d; ...
google
chromium
const2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/const2.C
379
utf_8
65c0a747dff974d4f19eda6304e002f9
// PR c++/3331: just because 'this' is readonly and bars[0].b is readonly // doesn't mean that the result of the member reference is readonly. struct foo { int a; struct bar { int foo::* b ;}; static const bar bars[]; void bad () { this->*(bars[0].b) = 42; // { dg-bogus "read-only" "" } } }; cons...
google
chromium
anon5
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/anon5.C
468
utf_8
8d0cf09289477bf71a9a598b9232dcef
// PR c++/34094 // { dg-do link { target { ! { *-*-darwin* *-*-hpux* *-*-solaris2.* alpha*-dec-osf* mips-sgi-irix* } } } } // { dg-options "-g" } namespace { struct c { static const bool t = 0; }; } const bool &f() { return c::t; // { dg-message "undefined" "undefined" { target *-*-* } 0 } // Some targe...
google
chromium
error13
.C
native_client/pnacl-gcc/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
chromium
warning1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/warning1.C
420
utf_8
9e7f10b53220241bf8fb8effdd4f6f96
// { 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-warning "1.0|float|initializ" } static const float nan = 0.0f / 0.0f; // { dg-warning "0.0|float|initializ" } }; int m...
google
chromium
pr39060
.C
native_client/pnacl-gcc/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
chromium
error2
.C
native_client/pnacl-gcc/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
chromium
default1
.C
native_client/pnacl-gcc/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
chromium
pragma-ep-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/pragma-ep-1.C
587
utf_8
fc6dc5d12ae16fd14b7d1c21901a935f
/* { dg-do compile { target *-*-osf5* } } */ /* { dg-final { scan-assembler "xyzzy_one" } } */ /* { dg-final { scan-assembler "xyzzy_two" } } */ /* { dg-final { scan-assembler "xyzzz_three" } } */ /* { dg-final { scan-assembler "four" } } */ /* { dg-final { scan-assembler-not "_four" } } */ #ifndef __PRAGMA_EXTERN_PRE...
google
chromium
error4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/error4.C
325
utf_8
2a54dfbc2f51bbaad10a9a32a8c1f212
// { dg-do compile } // PR 9898. Confusing error message struct Wrapper {}; void Foo(int const &); // { dg-error "in passing" "" } void Baz () { Foo (Wrapper ()); // { dg-error "Wrapper" "" } }
google
chromium
profile1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/profile1.C
1,302
utf_8
f804e6064a0c7cd94d73f58ba8f6e5e0
// PR 11767 // { dg-do run } // { dg-require-profiling "" } // { dg-options "-fnon-call-exceptions -fprofile-arcs" } #include <string> typedef unsigned long ACE_UINT32; extern "C" void abort(); static ACE_UINT32 const msc_maxCurrencyID = 9999; class ResourceBalanceType2 { public: explicit ResourceBalanceType2(...
google
chromium
pr33558
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/pr33558.C
106
utf_8
2bce0ecd468a573ab63f7d3a15c66bcf
/* { dg-do compile } */ class X { mutable int &q; /* { dg-error "cannot be declared 'mutable'" } */ };
google
chromium
canon-33194
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/canon-33194.C
356
utf_8
099265a43fd784d7e5904d87397cd678
// PR c++/33194 void c_translate_location ( void (*fail) ( const char *fmt, ...) __attribute__ ((noreturn, format (printf, 1, 2))) ); struct dwflpp { static void loc2c_error (const char *fmt, ...) { } void translate_location() { return c_transl...
google
chromium
error34
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/error34.C
190
utf_8
46ecc5d2a19353160c2de5ab62aaa45b
// PR c++/46538 // { dg-do compile } // { dg-options "" } S () : str(__PRETTY_FUNCTION__) {} // { dg-error "forbids declaration" } // { dg-error "only constructors" "" { target *-*-* } 5 }
google
chromium
crash-11
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/crash-11.C
324
utf_8
5d8d774628229a306ab795223b7c191d
// Origin: PR c++/43327 // { dg-do compile } template <typename _T> struct A { template <int _N, int _M> struct B; template <int _N> struct B<_N, _T::m> { static void f(); }; }; struct C { static int m; }; void m() { A<C>::B<1, 4>::f(); // { dg-error "incomplete type|not a valid" } } int C::m = ...
google
chromium
gc3
.C
native_client/pnacl-gcc/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
chromium
void2
.C
native_client/pnacl-gcc/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
chromium
stdarg3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/stdarg3.C
328
utf_8
3a012636be5f21fd2b652c229102e118
// { dg-options "-mlp64" { target "ia64-*-hpux*" } } union U { void *m[7]; }; struct C; void f(struct C *c, float f, union U, ...) { }
google
chromium
stdarg1
.C
native_client/pnacl-gcc/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
chromium
synth1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/synth1.C
502
utf_8
9bae0d01ef429f94e58c536f39c9ca7b
struct PTR { PTR (); PTR (PTR&); PTR& operator= (PTR&); private: PTR (const PTR&); PTR& operator= (const PTR&); }; struct XYZ { XYZ (PTR& p) : ptr(p) {} mutable PTR ptr; }; XYZ f1 (); XYZ f2 (void) { return f1(); } void f3 (XYZ& dst, const XYZ& src) { dst = src; }
google
chromium
offsetof2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/offsetof2.C
674
utf_8
f22bc611fe66c01c402c287704531f43
// { dg-do run } // { dg-options -Wold-style-cast } // DR273 POD can have an operator&, offsetof is still required to work #include <stddef.h> struct POD1 { int m; void *operator& () const {return 0;} // yes, still a pod! }; struct POD2 { int m; }; void *operator& (POD2 const &) {return 0;} // ouch! struct PO...
google
chromium
constref1
.C
native_client/pnacl-gcc/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
chromium
darwin-minversion-1
.C
native_client/pnacl-gcc/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
chromium
switch2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/switch2.C
443
utf_8
37c0f6f7c04f78d10db7b76974117a16
const int B = ~(~0u >> 1); #define b(x) (B + x) int Foo (int error) { switch (error) { case b (1): return 0; case b (2): return 0; case b (3): return 0; case b (4): return 0; case b (5): return 0; } return 0; }
google
chromium
fold1
.C
native_client/pnacl-gcc/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
chromium
pr37789
.C
native_client/pnacl-gcc/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
chromium
crash-10
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/crash-10.C
272
utf_8
9c5998180b3fe539eb2b8de2217f48d6
// Origin: PR c++/43327 // { dg-do compile } template <typename _T> struct A { template <int _N, int _M> struct B; template <int _N> struct B<_N, _T::m> { static void f(); }; }; struct C { static const int m = 4; }; void m() { A<C>::B<1, 4>::f(); }
google
chromium
ptrmem3
.C
native_client/pnacl-gcc/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
chromium
error3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/error3.C
198
utf_8
3820027b29c821fc3271c5cd12393a28
// Test for proper error message formatting; the throw() should go inside // the parens, as below. void (*g() throw())(); // { dg-error "g\\(\\) throw" "" } void (*g())(); // { dg-error "" "" }
google
chromium
ptrmem5
.C
native_client/pnacl-gcc/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
chromium
packed1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/packed1.C
682
utf_8
fa948c8a0f5a89bfe32c3bd980b2282b
// { dg-do run { xfail sh-*-* lm32-*-* } } // NMS:2003-04-21 this fails on strict aligned architectures again, // the patch was reverted because it broke something more important. // WRS SPR 63496, lost packed attribute when accessing a packed // field. This matters on aligned architectures like sh struct thing { int m...
google
chromium
unused1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/unused1.C
1,182
utf_8
702e8858ca83b0549c17217a3d609bac
/* { dg-do compile } */ /* { dg-options "-g" } */ /* { dg-skip-if "" { { hppa*-*-hpux* *-*-solaris2.[56]* } && { ! 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) { return ((struct fo...
google
chromium
pr35504
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/pr35504.C
2,468
utf_8
0a4dec0aed98e1bcb431b3643ea74a56
// { dg-do run { target { { i?86-*-* x86_64-*-* } && ia32 } } } #define ATTR0 __attribute__((__regparm__(0))) #define ATTR1 __attribute__((__regparm__(1))) #define ATTR2 __attribute__((__regparm__(2))) #define ATTR3 __attribute__((__regparm__(3))) #define ATTR4 __attribute__((__fastcall__)) #define ATTR5 __attribute__...
google
chromium
pr42645-2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/pr42645-2.C
340
utf_8
17a722f40fb7caa40b6a960f7c1b52e7
// PR tree-optimization/42645 // { dg-do compile } // { dg-options "-fcompare-debug -O1" } struct C { bool b; C (); }; static inline C *foo () {} extern void f4 (); static inline int f3 () { f4 (); } static inline void f2 (bool b) { int tmp = f3 (); if (C ().b && b) C (); } void f1 () { C *c = foo...
google
chromium
crash-2
.C
native_client/pnacl-gcc/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
chromium
copy2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/copy2.C
425
utf_8
a8c217652f569c1ecbce8d12397e9abb
// { dg-do run } // Test that A's copy assignment method is called when B's instance // member array of A is assigned. // Contributed by Brian Gaeke, public domain. int status = 1; class A { public: int i; A &operator =(const A &i) { status = 0; } }; class B { public: A arr[10]; }; int main (int argc...
google
chromium
static2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/static2.C
198
utf_8
87d669ec0ea49c18545b3b5213df2b0b
//PR c++/26573 void foo() { struct A { static int i; }; // { dg-error "shall not have" } } template<typename T> void bar() { struct B { static int j; }; // { dg-error "shall not have" } }
google
chromium
error6
.C
native_client/pnacl-gcc/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
chromium
virtual2
.C
native_client/pnacl-gcc/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
chromium
vararg-3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/other/vararg-3.C
341
utf_8
d70016b6360241c55db4eea300244bd5
// PR c++/31488: va_list considered non-POD on alpha // { dg-do compile } typedef __builtin_va_list __gnuc_va_list; typedef __gnuc_va_list va_list; extern int foo (int a, int b, ...); int bar (int a, int b, ...) { va_list args; __builtin_va_start(args,b); int result = foo (a, b, args); __builtin_va_end(args)...