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
fnname2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/fnname2.C
538
utf_8
a06d181d1f37ed4bbf17112c988f9608
// Test whether __func__ works for ordinary member functions. // { dg-do run } struct y8a { const char* zqjx(int, char); }; const char* y8a::zqjx(int, char) { return __func__; } int main() { y8a tmp; const char* s = tmp.zqjx(16, 'x'); bool ok = true; ok = ok && s[0] == 'z'; ok = ok && s[1] == 'q'; ok = ...
google
chromium
utf32-4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/utf32-4.C
762
utf_8
993c9b9950651aca9d3859d5daa449a6
/* Expected errors for char32_t character constants. */ /* { dg-do compile } */ /* { dg-options "-std=c++0x" } */ const static char32_t c0 = U''; /* { dg-error "empty character" } */ const static char32_t c1 = U'ab'; /* { dg-warning "constant too long" } */ const static char32_t c2 = U'\U00064321'; const static char3...
google
chromium
stmtexpr7
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/stmtexpr7.C
156
utf_8
7e2b298f25a70913e3a563f97e4cf5b7
// PR c++/24686 // { dg-options "" } struct A { ~A(); }; bool h(int, const A&); int f(); int i; void g() { i && (A(), ({ static int l = f(); l; })); }
google
chromium
attrib36
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/attrib36.C
441
utf_8
3a70efd2f6593572ae9fb617a5b327c9
// PR c++/43031 // { dg-do compile { target { { i?86-*-* x86_64-*-* } && ia32 } } } class T; class L { }; class P : public L { typedef void (__attribute__((__stdcall__)) T::*F) (L*); void f(bool aAdd); }; class T { public: virtual void __attribute__((__stdcall__)) A(L *listener) = 0; virtual void __attribu...
google
chromium
attrib41
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/attrib41.C
386
utf_8
43c0336af5f4b4f8968c64cfc765d0cd
// PR c++/45267 // { dg-options "-O" } template<typename T> struct Vector { Vector(long long x); inline Vector<T> operator<<(int x) const __attribute__((always_inline)); }; long long bar (long long); template<> inline Vector<int> Vector<int>::operator<<(int x) const { return bar(x); } bool b; int main() { Vect...
google
chromium
packed9
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/packed9.C
330
utf_8
0932ad5ce3e0455a61e5bd35e5ed587a
// DR21166. unnecessary error on packed char struct s1 { char c1; } __attribute__((packed)); char& f(struct s1 *s) { return s->c1; } char * g(struct s1 *s) { return &s->c1; }
google
chromium
vector5
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/vector5.C
150
utf_8
1c3c5b3c715f584a5634252e1b73f6ec
// PR c++/30022 // { dg-do compile } void foo() { int __attribute__((vector_size(8))) v; v = 1/v; // { dg-error "invalid operands of types" } }
google
chromium
weak1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/weak1.C
440
utf_8
8c86ea641b4518800fb5154a1a151e06
// Test for #pragma weak where the weak alias symbol isn't declared, // although the symbol it is an alias for is defined in the // translation unit. Bug 7544. // { dg-do compile } // { dg-require-weak "" } // { dg-require-alias "" } // { dg-options "-fno-common" } // { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_...
google
chromium
tmplattr9
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/tmplattr9.C
330
utf_8
025a5972f75731b8e82a3214589eeedc
// PR c++/34937, 34962 // { dg-require-weak "" } // { dg-options "" } struct A { static const int i; }; template<int> void foo() { int x[A::i] __attribute((vector_size(8))); } template<int> struct B { enum { a, b = a }; void bar(B<b>) __attribute((weak)); }; void f() { foo<0>(); B<0> b; b.bar (B<B<0>:...
google
chromium
vector7
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/vector7.C
254
utf_8
499980717843a208168505a264f263e3
// { dg-options "" } // { dg-do compile } // PR C++/31721 and PR 14217 // the attribute vector_size would change a reference type into a pointer type which was wrong. #define vector __attribute__((__vector_size__(16) )) vector int b; vector int &a = b;
google
chromium
lvalue1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/lvalue1.C
179
utf_8
4d2204ac6e2ce03af82e6431536be376
// Test that we complain about the gcc cast-as-lvalue extension. int main () { char c; return c != 2; }
google
chromium
stmtexpr12
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/stmtexpr12.C
128
utf_8
9d43ea9a813c48446105372589470afa
// PR c++/29000 // { dg-options "" } template<int> int foo() { return ({foo;})==0; // { dg-error "insufficient context" } }
google
chromium
attr-alias-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/attr-alias-1.C
509
utf_8
f48f0952142f3f8ed8f9b4eb6628059f
/* { dg-do run } */ /* { dg-require-alias "" } */ #include <typeinfo> struct Klass { int implementation () const; int magic () const; }; int Klass::implementation (void) const { return 0; } int Klass::magic () const __attribute__ ((alias ("_ZNK5Klass14implementationEv"))); int __attribute__ ((noinline)) ...
google
chromium
utf8-2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/utf8-2.C
1,006
utf_8
0f0334583c43b4b8c6d28c72787f0e37
// { dg-do compile } // { dg-options "-std=c++0x" } const char s0[] = u8"ab"; const char16_t s1[] = u8"ab"; // { dg-error "from non-wide" } const char32_t s2[] = u8"ab"; // { dg-error "from non-wide" } const wchar_t s3[] = u8"ab"; // { dg-error "from non-wide" } const char t0[0] = u8"ab"; // { dg-erro...
google
chromium
int128-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/int128-1.C
259
utf_8
64c2566bddee53ad391dac93f9ac20f8
// PR c++/50454 // { dg-do compile { target int128 } } template<typename T> struct limits; template<> struct limits<__int128> { }; // { dg-error "does not support" } template<> struct limits<unsigned __int128> { }; // { dg-error "does not support" }
google
chromium
has_trivial_destructor-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/has_trivial_destructor-1.C
1,331
utf_8
e08978b76f3cf1a71d470561278cf5c9
// { dg-do run } #include <cassert> struct A { double a; double b; }; union U { double a; double b; }; struct B { ~B() { } }; struct C : public B { }; struct D : public A { }; template<typename T> bool f() { return __has_trivial_destructor(T); } template<typename T> class My { public: bool ...
google
chromium
altivec-types-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/altivec-types-1.C
4,626
utf_8
1db04504ce004854aaca0a08822acd51
/* { dg-do compile { target powerpc*-*-linux* } } */ /* { dg-require-effective-target powerpc_altivec_ok } */ /* { dg-options "-maltivec -mno-vsx -std=c++98" } */ /* Valid AltiVec vector types should be accepted with no warnings. */ __vector char vc; __vector unsigned char vuc; __vector signed char vsc; __vector __b...
google
chromium
dllimport11
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/dllimport11.C
348
utf_8
fae20ba9152986482587b9589087b60a
// PR target/23589 // Template member functions do not get dllimport status of class. // { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } } struct __attribute__((dllimport)) Foo { template <class T> Foo (T); }; void a (int i) { Foo f(i); } template <class T> Foo::Foo (T) {} // no dllimp...
google
chromium
packed7
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/packed7.C
322
utf_8
2e29b33d9b093b6a30a0e49d1b42c6c8
// PR c++/14124 // A packed enum uses the minimal underlying type. // { dg-do run } enum XXX { xyzzy = 3 } __attribute__((packed)); int main() { int enumsize = sizeof(xyzzy); return (enumsize == 1) ? 0 : 1; }
google
chromium
is_abstract
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/is_abstract.C
1,270
utf_8
313119f0af11c076d28d9802655e555a
// { dg-do run } #include <cassert> struct A { double a; double b; }; union U { double a; double b; }; class B { B(); }; class C { virtual void rotate(int) = 0; }; class D { virtual void rotate(int) { } }; template<typename T> bool f() { return __is_abstract(T); } template<typename T> class My ...
google
chromium
member-attr
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/member-attr.C
652
utf_8
76dc6abfdf7c1982462bb0cc9c44fb6f
/* Test to see if__attribute__'s are handled by inline member functions */ /* { dg-do compile } */ /* { dg-options "-fmessage-length=0" } */ /* Previously __attribute__'s were handled by the grammar but "dropped on the floor", these effectively ignoring them. This tests the fix to see that they are now handled....
google
chromium
inline1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/inline1.C
765
utf_8
f2cf0baaaf489aa15f22210e07d052d1
// { dg-do compile } // { dg-options "-O" } // Make sure inlined non-outlined functions aren't marked weak. // We'd get a ".weak xyzzy" annotation trigged by the second declaration. // { dg-final { scan-assembler-not "weak\[^ \t\]*\[ \t\]_?xyzzy" } } // The next check isn't really part of the actual test, just to make...
google
chromium
utf-dflt
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/utf-dflt.C
862
utf_8
018d05d404ee6a8a9103c5798fa005cd
/* Expected errors for char16_t/char32_t in default std. */ /* Ensure u and U prefixes are parsed as separate tokens in default std. */ /* { dg-do compile } */ /* { dg-options "-std=c++98" } */ const static char16_t c0 = 'a'; /* { dg-error "not name a type" } */ const static char32_t c1 = 'a'; /* { dg-error "not name a...
google
chromium
attrib10
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/attrib10.C
155
utf_8
7e9f8e5acd7da503c63f6342955e1873
// PR c++/12795 // { dg-require-alias "" } void foo() { extern void bar () __attribute__ ((__alias__ ("BAR"))); // { dg-warning "ignored" } bar (); }
google
chromium
stmtexpr11
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/stmtexpr11.C
130
utf_8
9b385207de7bf590c1ddd0d68c3ccea4
// PR c++/31337 // { dg-options "" } struct A { int i[0]; A(); A(const A&); ~A(); }; void foo() { A a = ({ A(); }); }
google
chromium
is_union
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/is_union.C
1,097
utf_8
f68f695366fe576aaf12aeac3127a68d
// { dg-do run } #include <cassert> struct A { double a; double b; }; class B { B() { } }; union U { double a; double b; }; template<typename T> bool f() { return __is_union(T); } template<typename T> class My { public: bool f() { return !!__is_union(T); } }; template<typen...
google
chromium
conv1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/conv1.C
304
utf_8
356f009d32e7c4d124b9aff9f08aa85b
// Test for backwards brain-damage compatibility with -fpermissive. // { dg-options "-fpermissive -w" } void f (); void f (int *); void g (int); int main () { void *v = 1234; void (*p)() = v; int i = v; f (i); f (v); g (v); enum { a } b = i; void (*p2)(int) = p; unsigned *ip = &i; }
google
chromium
attrib4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/attrib4.C
566
utf_8
0689e86022776421672cfd3ac67e3153
// Test for syntax support of various attribute permutations. int __attribute__((noreturn)) __attribute__((unused)) one(void); // OK __attribute__((noreturn)) __attribute__((unused)) int two(void); // OK int __attribute__((unused)) three (void) __attribute__((noreturn)); // OK __attribute__((unused)) int four (voi...
google
chromium
va-arg1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/va-arg1.C
117
utf_8
8f368ee52bff2600a087163d174828d3
// PR c++/33462 struct A {}; void foo() { ++__builtin_va_arg(0, A); // { dg-error "'\\+\\+va_arg\\(0, A\\)'" } }
google
chromium
utf32-2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/utf32-2.C
771
utf_8
c568d20fa8e2994282acbbf27946ca84
/* Test the support for char32_t* string constants. */ /* { dg-do run } */ /* { dg-options "-std=c++0x -Wall -Werror" } */ extern "C" void abort (void); const static char32_t *s0 = U"ab"; const static char32_t *s1 = U"a\u0024"; const static char32_t *s2 = U"a\u2029"; const static char32_t *s3 = U"a\U00064321"; #define ...
google
chromium
alias-canon2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/alias-canon2.C
658
utf_8
3edd13b80e6278657af7d13a3250a544
// { dg-do compile } // PR c++/37553 typedef unsigned int ui32; __extension__ typedef unsigned long long int ui64; typedef ui32 __attribute__ ((__may_alias__)) ui32a; typedef ui64 __attribute__ ((__may_alias__)) ui64a; union u_u32 { ui32a v; } __attribute__ ((__may_alias__)); union u_u64 { ui64a v; struct { ...
google
chromium
has_trivial_copy
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/has_trivial_copy.C
1,482
utf_8
d9e0cebda97324fdad74307ae42630de
// { dg-do run } #include <cassert> struct A { double a; double b; }; union U { double a; double b; }; struct B { B(const B&) { } }; struct C { virtual int f() { return 1; } }; struct D : public B { }; struct E : public A { }; struct F { A a; }; struct G { B b; }; template<typename T> bool f() { ...
google
chromium
complex6
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/complex6.C
130
utf_8
468b75000e57b0b297306048d98bbfcd
// PR c++/46304 // { dg-options "" } template<class T> void f() { __complex double d = 1.0 + 2.0i; } template void f<int>();
google
chromium
vla7
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/vla7.C
280
utf_8
f339c929810ba11885868c48c99722f6
// PR c++/40013 // { dg-options "" } template <class T> struct A { struct B { struct { int fn () { return 0; } } b; }; void test (); }; template <class T> void A <T>::test () { B a; int vla[a.b.fn ()]; } int main () { A <char> a; a.test (); }
google
chromium
stmtexpr9
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/stmtexpr9.C
106
utf_8
1a8af85002e8ca32cf0c099dd5920e54
// PR c++/28899 // { dg-options "" } void f() { unsigned l, l1; l1 = l = ({ unsigned __v; __v; }); }
google
chromium
utf-gnuxx0x
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/utf-gnuxx0x.C
340
utf_8
914ff28c3b3bf7ec6702854ab6a6a54b
/* Test parsing of u and U prefixes when also used as macros. */ /* { dg-do compile } */ /* { dg-options "-std=gnu++0x" } */ #define u L #define U L const unsigned short c2 = u'a'; const unsigned long c3 = U'a'; const void *s0 = u"a"; const void *s1 = U"a"; int main () {}
google
chromium
complit12
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/complit12.C
848
utf_8
cd39637cbec2b2507f9279554da9904c
// PR c++/40948 // { dg-do run } // { dg-options "" } int c; struct M { M () { ++c; } M (const M&) { ++c; } ~M () { --c; } }; struct S { S (); M m[1]; }; S::S () : m ((M[1]) { M () }) { } struct T { T (); M m[4]; }; T::T () : m ((M[4]) { M (), M (), M (), M () }) { } typedef M MA[1]; MA &bar (MA, MA...
google
chromium
dllimport1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/dllimport1.C
561
utf_8
54ffcfc4651d456f2bf3004134e3ea4d
// PR c++/7910 // { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } } // { dg-options { -Wall -W } } class __attribute__((dllimport)) Foo { public: virtual void dummy_foo_func(void) {} void dummy_foo_fun2(); virtual ~Foo(); // avoid warning }; void Foo::dummy_foo_fun2() // { dg-...
google
chromium
dllimport2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/dllimport2.C
678
utf_8
e66ac85f71f28ce1288c2b47423d944a
// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } } // PR c++/9738 Dllimport attribute is overriden by later definition/redeclaration void __attribute__((dllimport)) Bar(void); void __attribute__((dllimport)) Baz(void); __attribute__((dllimport)) int Biz; __attribute__((dllimport)) int Boz; ...
google
chromium
case-range3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/case-range3.C
488
utf_8
72c6bbae7ce0172b481cbf43eacbad4a
// { dg-do compile } // Tests if case ranges (a GNU extension) emit errors in ISO mode // { dg-options "-pedantic" } const int low = -2; const int high = 15; template <typename T> T f2 (T i) { switch (i) { case low ... high : return i + 1; // { dg-warning "non-standard" } default : return 0; } } int f (...
google
chromium
uow-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/uow-1.C
116
utf_8
28679c5e259c2a169fa3381ab32688b9
/* { dg-do compile } */ /* { dg-options "-Wall" } */ extern "C" { typedef int UOW; struct ABC { UOW UOW; }; }
google
chromium
pretty2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/pretty2.C
1,079
utf_8
faa8333681bedde3ba84daa60ec26ff8
// PR c++/6794 // Test whether __PRETTY_FUNCTION__ works in templates, functions and // in initializers at global scope // { dg-do run } // { dg-options "" } extern "C" void __assert_fail (const char *, const char *, unsigned int, const char *) throw() __attribute__((noreturn)); extern "C" void abort (void)...
google
chromium
has_nothrow_constructor_odr
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/has_nothrow_constructor_odr.C
218
utf_8
9ab0d0de30743cb9e3866cc5d6e0bea8
// PR c++/36870 // { dg-do run } #include <cassert> struct S { S (); }; bool f (); int main () { assert (__has_nothrow_constructor (S) == f ()); } S::S () { } bool f () { return __has_nothrow_constructor (S); }
google
chromium
dllimport3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/dllimport3.C
544
utf_8
185dd4cd3d582242c437e178f37ec4c8
// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } } // PR 10148 Dllimport attribute of object is overriden by later // redefinition without attribute. struct Foo { int a; }; __attribute__((dllimport)) struct Foo f; void Bar(void) { void* dummy = (void*) &f; } struct Foo f; // { dg-...
google
chromium
asmspecValid
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/asmspecValid.C
984
utf_8
5ee066fcb4d2f0a4b7244f6dfe4cf04b
// tests that the asm directive is correctly handled for static fields // in structures and classes. This only applies to C++; such // directives generate errors in C. Assembler directives for local // variables should be tested by the C test suite. // // { dg-do compile } struct Foo { // This should reference a ...
google
chromium
weak3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/weak3.C
305
utf_8
1a7816a666c363e8410710411e40ce26
// PR c++/20961 // Test for #pragma weak and __attribute__((weak)) being used together. // { dg-do compile } // { dg-require-weak "" } // { dg-options "" } // { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?_Z3foov" } } int foo (); #pragma weak foo int __attribute__((weak)) foo () { return 0; }
google
chromium
asm3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/asm3.C
318
utf_8
f25a72d1994945ee8d899c33d153dd11
// { dg-do compile } // PR 7015. ICE with asms int two(int in) { register int out; __asm__ ("" : "r" (out) : "r" (in)); return out; } // { dg-message "error:" "" { target *-*-* } 11 }
google
chromium
attrib16
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/attrib16.C
256
utf_8
1feb907828c5492b83a6bb325e5a8f9c
// { dg-do compile } // Origin: <rguenth at tat dot physik dot uni-tuebingen dot de> // PR c++/10479: use of non dependent expressions in attributes in templates template <int i> struct foo2 { float bar __attribute__((aligned(__alignof__(double)))); };
google
chromium
sync-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/sync-1.C
874
utf_8
e4a78d4631d98dda8d34b1baf828c158
// Validate that the __sync builtins are overloaded properly. // { dg-do compile } // { dg-options "-Werror" } #define TEST1(TYPE, BUILTIN) \ void t_##TYPE##BUILTIN(TYPE *p) \ { \ __typeof(BUILTIN(p, 1)) *pp; \ pp = p; \ } #define TEST2(BUILTIN) \ TEST1(int, BUILTIN) \ TEST1(long, BUILTIN) TEST2(...
google
chromium
builtin2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/builtin2.C
359
utf_8
4b79f0ca012fab75e5085a3acc4d333d
// PR c++/18514 // Test whether alternate 'asm' name is applied correctly to // builtin imported into namespace std. // { dg-do compile } // { dg-options "" } // { dg-final { scan-assembler "fancy_printf" } } extern "C" int printf(const char*, ...) __asm("_fancy_printf"); namespace std { using ::printf; } namespace...
google
chromium
dllimport10
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/dllimport10.C
267
utf_8
743e955c9c786c9d494355c0ef0a48d7
// PR c++/5287, c++/11021 // Inherit a virtual method from a dllimport'd base class. // { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } } struct __attribute__((dllimport)) A { virtual void vfunc(void); }; struct B : public A { }; B aB;
google
chromium
flexary2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/flexary2.C
98
utf_8
df5a32900f0ab827b9e8d0c72822964f
// PR c++/46688 // { dg-options "" } struct A { A(int); }; struct B { B() {} A a[]; };
google
chromium
stmtexpr8
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/stmtexpr8.C
317
utf_8
c24c0fb32082543dfc7b57bd392ba008
// PR c++/27115 // { dg-do run } // { dg-options "" } struct A { int i; A (int j) : i(j) {} A (const A &j) : i(j.i) {} A& operator= (const A &j) { i = j.i; return *this; } }; A foo(int j) { return ({ j ? A(1) : A(0); }); } int main() { return foo(1).i-1; } void foo2() { A b = ({ A a(1); a; }); }
google
chromium
label2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/label2.C
124
utf_8
4f5a16939771bbd392025ca98b00ad61
// { dg-options "" } template <typename T> void f() { l: void *p[] = { &&l }; goto *p[0]; } template void f<int>();
google
chromium
cleanup-11
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/cleanup-11.C
2,428
utf_8
2bf8b32daf9c23f251208697719631a4
/* { dg-do run { target hppa*-*-hpux* *-*-linux* powerpc*-*-darwin* *-*-darwin[912]* } } */ /* { dg-options "-fexceptions -fnon-call-exceptions -O2" } */ /* Verify that cleanups work with exception handling through realtime signal frames on alternate stack. */ #include <unwind.h> #include <stdlib.h> #include <sign...
google
chromium
attrib9
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/attrib9.C
350
utf_8
db629587302d47a98b453a1702e900c9
class __attribute__((unused)) C; struct __attribute__((unused)) S; union __attribute__((unused)) U; enum e {}; enum __attribute__((unused)) e; // { dg-warning "already defined" } struct __attribute((unused)) B *p; // { dg-warning "attributes" } template <class T> struct A { }; struct __attribute((unused)) A<int>; //...
google
chromium
dllimport5
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/dllimport5.C
698
utf_8
58751097980640095ac4ec8e8278dbee
// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } } // Report error if static symbol definition has dllimport attribute. __attribute__((dllimport)) int impvar; // OK, implicit "extern" static __attribute__((dllimport)) int static_impvar; // { dg-error "external linkage" } static __a...
google
chromium
altivec-7
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/altivec-7.C
1,456
utf_8
e63a3f726a9a2696be3fd48744dbe24b
/* Test for AltiVec type overloading and name mangling. */ /* { dg-do compile { target powerpc*-*-* } } */ /* { dg-require-effective-target powerpc_altivec_ok } */ /* { dg-options "-maltivec" } */ #include <altivec.h> void foo(vector unsigned char) { } void foo(vector signed char) { } void foo(vector bool char) ...
google
chromium
utf16-2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/utf16-2.C
769
utf_8
71db346237651bdbae8361a57bfc4a21
/* Test the support for char16_t* string literals. */ /* { dg-do run } */ /* { dg-options "-std=c++0x -Wall -Werror" } */ extern "C" void abort (void); const static char16_t *s0 = u"ab"; const static char16_t *s1 = u"a\u0024"; const static char16_t *s2 = u"a\u2029"; const static char16_t *s3 = u"a\U00064321"; #define A...
google
chromium
typeof6
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/typeof6.C
206
utf_8
cac7810767ae23faa6823a798e9c3cea
// { dg-options "" } template <class T> void test1() { int x = 0; const typeof(x) & t1 = x+0; } void test2() { int x = 0; const typeof(x) & t1 = x+0; } int main() { test1<int>(); test2 (); }
google
chromium
injected-ttp
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/injected-ttp.C
333
utf_8
04cb5500126619139ae126fdc51c8a1f
// Test for doing the right thing with injected-class-name used as template // type argument. This is an extension from DR 176. // { dg-options "-pedantic -std=c++98" } template <class T> struct A { }; template <template <class> class TTP> struct B { }; struct C: A<int> { B<A> b; // { dg-warning "injected-clas...
google
chromium
utf32-3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/utf32-3.C
1,288
utf_8
f0ce7d14c6af3b42645a73bd7a9fd205
/* Test concatenation of char32_t* string literals. */ /* { dg-do run } */ /* { dg-options "-std=c++0x -Wall -Werror" } */ extern "C" void abort (void); const static char32_t *s0 = U"a" U"b"; const static char32_t *s1 = U"a" "b"; const static char32_t *s2 = "a" U"b"; const static char32_t *s3 = U"a" "\u2029"; const sta...
google
chromium
builtin4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/builtin4.C
227
utf_8
36bf81cd8b85ba22d49014263cb3a3e2
// Verify that builtin is used when declared in global namespace // { dg-do compile } // { dg-options "-Wall" } extern "C" int printf(const char*,...); void foo() { printf("%d"); // { dg-warning "expects a matching" } }
google
chromium
complit8
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/complit8.C
215
utf_8
881ad6e29d36b40720a2247918f5770b
// PR c++/27270 // { dg-options "" } template<typename Entry> struct Array { Entry *array[32]; Array () : array ( (Entry*[1]) { 0, 0 } ) // { dg-error "initializers|incompatible" } {} }; Array<void*> a;
google
chromium
has_nothrow_copy_odr
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/has_nothrow_copy_odr.C
220
utf_8
326f3135872905cc190039b1e9eb418b
// PR c++/36870 // { dg-do run } #include <cassert> struct S { S (const S&); }; bool f (); int main () { assert (__has_nothrow_copy (S) == f ()); } S::S (const S&) { } bool f () { return __has_nothrow_copy (S); }
google
chromium
attrib29
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/attrib29.C
353
utf_8
f78a1283d2d4da5ad85040e153e6ee99
// PR c++/33506 // { dg-do compile } extern int f1 (char *) __attribute__ ((warn_unused_result)); extern int f2 (char *) throw () __attribute__ ((warn_unused_result)); extern int f2 (char *) throw (); extern int f3 (char *) __attribute__ ((nonnull (1))); extern int f4 (char *) throw () __attribute__ ((nonnull (1))); ...
google
chromium
is_pod_incomplete
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/is_pod_incomplete.C
100
utf_8
f316c6cb603f1746eab7e3d67e84b5c4
// PR c++/32158 template<typename T> struct A { A() { } }; int t[__is_pod(A<int>)?-1:1];
google
chromium
vector4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/vector4.C
162
utf_8
1d6b45dce331a414b31b64c5104ab383
/* { dg-options "" } */ /* { dg-do compile } */ // Testing if we can do a new of a vector // PR C++/28450 void* q = new int __attribute__((vector_size(8))) ();
google
chromium
has_nothrow_copy-5
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/has_nothrow_copy-5.C
171
utf_8
c7d029ba5056f7f575facbbb1d33c0ac
// PR c++/36872 // { dg-do run } #include <cassert> struct S { S (const S&) throw (); S (int) throw (int); }; int main () { assert (__has_nothrow_copy (S)); }
google
chromium
vector16
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/vector16.C
182
utf_8
35d5e735933a2ee8c67c9520df4ac250
/* { dg-do compile } */ #define vector __attribute__((vector_size(4*sizeof(int)) )) vector int a, b, c; /* Test that remainder works for vectors. */ void f(void) { a = b % c; }
google
chromium
always_inline-5
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/always_inline-5.C
428
utf_8
ffdb526972a39c85890c287c92939515
// { dg-do compile } struct f { inline f(void); inline void f1(void); int a; }; inline __attribute__((always_inline)) f::f(void) { a++; } inline __attribute__((always_inline)) void f::f1(void) { a++; } void g(void) { f a, b, c, d; a.f1(); } // f::f() should be inlined even at -O0 // { dg-final { sca...
google
chromium
altivec-cell-4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/altivec-cell-4.C
1,092
utf_8
a187c6adacfe593dd505a2340e53e439
/* { dg-do run { target { powerpc*-*-* && vmx_hw } } } */ /* { dg-do compile { target { powerpc*-*-* && { ! vmx_hw } } } } */ /* { dg-require-effective-target powerpc_altivec_ok } */ /* { dg-options "-maltivec" } */ /* Test the vec_splats and vec_promote VMX intrinsics. */ #include <altivec.h> extern "C" void ab...
google
chromium
attrib28
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/attrib28.C
149
utf_8
b125f534d4b8de943b8618985ccee9eb
// PR c++/28558 // { dg-options "" } struct A { A(int) { } }; int main() { A a = (A __attribute__((unused)))0; // { dg-warning "attribute" } }
google
chromium
fnname3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/fnname3.C
1,216
utf_8
9e62aa095a73cd8f1f5e3c31669594cd
// Test whether __func__ works for constructors and destructors. // { dg-do run } struct uk9i { uk9i(); ~uk9i(); static const char* fname; static bool obj_exists; }; uk9i::uk9i() { obj_exists = true; fname = __func__; } uk9i::~uk9i() { obj_exists = false; fname = __func__; } const char* uk9i::fname = 0;...
google
chromium
asmspec1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/asmspec1.C
166
utf_8
44f206100f55e5fc0a5d84d25bf00ce9
// PR c++/28343 // { dg-do compile } struct A { int i __asm__(int); // { dg-error "expected" } static int j __asm__(int); // { dg-error "expected" } };
google
chromium
vla8
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/vla8.C
165
utf_8
527f30cd7292076034b829d15a5232ca
// PR c++/42387 // { dg-options "" } template<class PF> struct AvlTreeIter { int Num(); AvlTreeIter() { new (void* [Num()]); } }; AvlTreeIter<int> a;
google
chromium
utf16-3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/utf16-3.C
1,295
utf_8
88060cfdc7c006f72fb8b6f665dfbcc8
/* Test concatenation of char16_t* string literals. */ /* { dg-do run } */ /* { dg-options "-std=c++0x -Wall -Werror" } */ extern "C" void abort (void); const static char16_t *s0 = u"a" u"b"; const static char16_t *s1 = u"a" "b"; const static char16_t *s2 = "a" u"b"; const static char16_t *s3 = u"a" "\u2029"; const sta...
google
chromium
altivec-13
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/altivec-13.C
1,748
utf_8
8269af4690723c041adba936c4db6226
/* Check that vec_step can be used with const vector types. This test is derived from parts of gcc.dg/vmx/8-02.c from Motorola's AltiVec testsuite. */ /* { dg-do compile { target powerpc*-*-* } } */ /* { dg-require-effective-target powerpc_altivec_ok } */ /* { dg-options "-maltivec" } */ #include <altivec.h>...
google
chromium
pretty3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/pretty3.C
387
utf_8
4433151c7bac2cb6a0ce24581b48c1e1
// PR c++/16630 // { dg-do compile } // { dg-options "" } extern "C" int printf (const char*, ...); template <class T> struct B { typedef T X; }; template <class U> struct D { const char* foo (typename B<U>::X) { return __PRETTY_FUNCTION__; } }; int main () { printf ("%s\n", D<int>().foo (0)); } // { dg-final { ...
google
chromium
typeof5
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/typeof5.C
133
utf_8
894af6b53e421663726a15c3ffb4145c
// { dg-options "" } int foo; template <class T> struct Base {}; template <class T> struct Derived : public Base<typeof(foo)> {};
google
chromium
vector12
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/vector12.C
88
utf_8
173dc80ba2834a9afdc07f599ac08c74
// PR c++/34917 // { dg-do compile } const int i __attribute ((vector_size (8))) = {};
google
chromium
attrib40
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/attrib40.C
159
utf_8
ce5067f997b2079a62b48ddd5f212db9
// PR c++/46803 int strftime(char *, int, const char *, const struct tm *) __attribute__ ((__bounded__(__string__,1,2))); // { dg-warning "ignored" }
google
chromium
gnu-inline-template-func
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/gnu-inline-template-func.C
562
utf_8
df8bb001c84f32307c935ddafd4b28e1
/* { dg-do compile } */ /* { dg-options "-O" } */ // such that static functions are optimized out /* { dg-final { scan-assembler "func1" } } */ /* { dg-final { scan-assembler "func2" } } */ /* { dg-final { scan-assembler-not "func3" } } */ /* { dg-final { scan-assembler "func4" } } */ /* { dg-final { scan-assembler-not...
google
chromium
vla1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/vla1.C
532
utf_8
1683fdde3c7877ca168f824f7b1eaedf
// { dg-do compile } // Crash tests from PR middle-end/6994. See also gcc.dg/vla-2.c. // A::A is acceptable extended C++ (VLA types brought over from C99); // B::B is not, but is closely related to acceptable extended C, though // not to acceptable C99. class A { A (int); }; A::A (int i) { int ar[1][i]; // { d...
google
chromium
altivec-3
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/altivec-3.C
3,484
utf_8
d3261ef497bef041056bc7661e3a3686
/* { dg-do run { target { powerpc*-*-* && vmx_hw } } } */ /* { dg-do compile { target { powerpc*-*-* && { ! vmx_hw } } } } */ /* { dg-require-effective-target powerpc_altivec_ok } */ /* { dg-options "-maltivec" } */ /* Test for correct handling of AltiVec constants passed through '...' (va_arg). */ #include <stda...
google
chromium
builtin6
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/builtin6.C
300
utf_8
b7c9d67e055f43c68752eb5dee97ef5b
// PR c++/19044 // Verify that alternate asm name for builtin named "foo" also gets // applied to its sibling "__builtin_foo". // { dg-do compile } // { dg-final { scan-assembler "fancy_sin" } } extern "C" double sin(double) __asm("_fancy_sin"); double foo(double x) { return __builtin_sin(x); }
google
chromium
attrib8
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/attrib8.C
237
utf_8
23c4a640241391acec5a1fd2c3fa5f25
// PR 8656 // { dg-do compile { target { { i?86-*-* x86_64-*-* } && ia32 } } } extern int * (__attribute__((stdcall)) *fooPtr)( void); int * __attribute__((stdcall)) myFn01( void) { return 0; } void snafu( void) { fooPtr = myFn01; }
google
chromium
anon-struct4
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/anon-struct4.C
231
utf_8
86e7d646e55c7bee7b11b67a8a155f11
// PR c++/14401 struct { struct { int& i ; } bar ; } foo ; // { dg-error "uninitialized" "uninit" } // { dg-warning "anonymous" "anon" { target *-*-* } 3 } // { dg-message "should be initialized" "ref-uninit" { target *-*-* } 3 }
google
chromium
va-arg-pack-len-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/va-arg-pack-len-1.C
2,565
utf_8
5767d28306995682901a8025cc09bcf5
// { dg-do run } // { dg-options "-O2" } #include <stdarg.h> extern "C" int error_open_missing_mode (void) __attribute__((__error__ ("open with O_CREAT needs 3 arguments, only 2 were given"))); extern "C" int warn_open_too_many_arguments (void) __attribute__((__warning__ ("open called with more than 3 arguments")...
google
chromium
complit7
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/complit7.C
81
utf_8
e710a424682710a7b643aeb0875d892d
// PR c++/27807 // { dg-options "" } int i = (int()){0}; // { dg-error "type" }
google
chromium
label5
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/label5.C
211
utf_8
6054e9cecfc7537d7c67fbc8cdd24caa
// { dg-options "" } // PR c++/24052 struct A { }; int main() { b: A() && && b; } // { dg-error "A\\(\\) && && *b" } // { dg-message "candidate|operator&&|no known conversion" "additional" { target *-*-* } 5 }
google
chromium
stmtexpr5
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/stmtexpr5.C
156
utf_8
a6cc01634e0bd707301c873f2d35f891
// PR c++/21440 // { dg-options "" } struct Foo { ~Foo(); int i; }; void bar() { Foo foo = ({ Foo bletch; bletch.i = 0; bletch; }); }
google
chromium
interface2
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/interface2.C
186
utf_8
869c6cc33c04831bc61047af9a9ac5fc
// PR c++/26195 // { dg-do link } // { dg-additional-sources "interface2b.cc" } // { dg-options "-fno-inline" } #pragma implementation "interface2-imaginary.h" #include "interface2a.h"
google
chromium
has_nothrow_copy-1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/has_nothrow_copy-1.C
1,997
utf_8
3dc9db6cec54556688b76a904376f944
// { dg-do run } #include <cassert> struct A { double a; double b; }; struct B { A a; }; struct C : public A { }; struct D { D(const D&) throw() { } }; struct E { E(const E&) throw(int) { } }; struct E1 { E1(const E1&) throw(int) { throw int(); } }; struct F { F() throw() { } }; struct G { G() throw(int...
google
chromium
bitfield5
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/bitfield5.C
310
utf_8
63134a6f65156e17a7ff7c98dfcea812
/* { dg-do compile } */ /* { dg-options "-Wno-packed-bitfield-compat" } */ /* { dg-options "-Wno-packed-bitfield-compat -mno-ms-bitfields" { target { i?86-*-mingw* x86_64-*-mingw* } } } */ struct t { char a:4; char b:8 __attribute__ ((packed)); char c:4; }; int assrt[sizeof (struct t) == 2 ? 1 : -1];
google
chromium
vla10
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/vla10.C
318
utf_8
1449869695dee3efea51f4669b837c49
// PR c++/48446 // { dg-options "" } template<typename T> struct A { ~A (); T *operator-> () const; }; struct B { typedef A <B> P; static P foo (int); }; struct C { typedef A<C> P; static const int c = 80; }; C::P bar (); void baz () { char z[bar ()->c]; { B::P m = B::foo (sizeof (z)); } }
google
chromium
typename1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/typename1.C
303
utf_8
a55635b999e217d4900dcb3975178408
// PR c++/6255 // { dg-options "-fpermissive -w" } template <class T> struct A { typedef int X; }; template <class T> struct B { typedef A<T> Y; void f (typename Y::X); }; template <class T, class T1, class T2, class T3> struct C : public B<T> { void g (typename B<T>::Y::X); }; template class B<int>;
google
chromium
asm11
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/asm11.C
862
utf_8
25fbbf0ac13b6baebc40ebabaedfe317
// PR c/37772 // { dg-do compile } // { dg-options "" } void foo () { int i; asm (); // { dg-error "expected string-literal before" } asm (1); // { dg-error "expected string-literal before" } asm (int); // { dg-error "expected string-literal before" } asm (: "=r" (i)); // { dg-error "expected stri...
google
chromium
flexary1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/flexary1.C
435
utf_8
c0dc41d4a72302e0ac9ef29725c83d30
// { dg-do compile } // PR c++ 11614 typedef int ary_t[]; struct test { ary_t *b; int (*a)[]; // this is not a flexible array member }; void test(void) { struct test s; int (*a)[] = 0; ary_t *b = 0; a = s.a; a = s.b; s.a = a; s.b = a; b = s.a; b = s.b; s.a = b; s.b = b; }
google
chromium
complex1
.C
native_client/pnacl-gcc/gcc/testsuite/g++.dg/ext/complex1.C
148
utf_8
15f53dad7ebd6c04a3f9232631c7a032
/* { dg-options "" } */ /* { dg-do compile } */ // Testing if we can do a new of a complex type // PR C++/28450 void* q = new __complex__ int ();