plateform
stringclasses
1 value
repo_name
stringclasses
2 values
name
stringlengths
1
78
ext
stringclasses
2 values
path
stringlengths
15
1.11k
size
int64
1
8.55M
source_encoding
stringclasses
11 values
md5
stringlengths
32
32
text
stringlengths
0
8.49M
google
android
altivec-types-2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/altivec-types-2.C
705
utf_8
388ac873a0dd6cda0acbd564876dc2e9
/* { dg-do compile { target powerpc*-*-linux* } } */ /* { dg-require-effective-target ilp32 } */ /* { dg-require-effective-target powerpc_altivec_ok } */ /* { dg-options "-maltivec -mno-vsx" } */ /* These should get warnings for 32-bit code. */ __vector long vl; /* { dg-warning "deprecated" "" } */ __vector unsign...
google
android
pragmaweak1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/pragmaweak1.C
138
utf_8
ad117686eb16e680b29f2f5e45ebe0df
// PR c++/25999 // { dg-final { scan-assembler-not "_Z3Foov" } } extern "C" { void Foo(); } #pragma weak Random_Symbol void Foo() { }
google
android
selectany2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/selectany2.C
675
utf_8
af4cf9e10b51c0d0d85459ba3a539f33
// { dg-do compile { target i?86-pc-cygwin } } // { dg-do compile { target i?86-*-mingw* x86_64-*-mingw* } } // Check for errors with invalid usage of selectany attribute. extern int foo; __declspec (selectany) int foo = 1; // OK struct d { static int foo; }; __declspec (selectany) int d::foo = 1; // OK struct...
google
android
vla10
.C
toolchain/gcc/gcc-4.9/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
android
attrib22
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/attrib22.C
105
utf_8
833f8e3e0d22842c6ce92cb71319b39f
// PR c++/27648 void f() { static_cast<float *__attribute((unused))>(0); // { dg-error "expected" } }
google
android
utf-badconcat2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/utf-badconcat2.C
655
utf_8
4d3e1e2d76aabbc270bb762c8b9aab48
// Test unsupported concatenation of UTF-8 string literals. // { dg-do compile { target c++11 } } const void *s0 = u8"a" "b"; const void *s1 = "a" u8"b"; const void *s2 = u8"a" u8"b"; const void *s3 = u8"a" u"b"; // { dg-error "non-standard concatenation" } const void *s4 = u"a" u8"b"; // { dg-error "non-standar...
google
android
alias-canon
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/alias-canon.C
741
utf_8
7dfd2972b1402d4103976b061d5cbcd3
// PR c++/34935 /* { dg-do compile } */ /* { dg-final { scan-assembler "_Z1fi" } } */ /* { dg-final { scan-assembler "_Z1fb" } } */ /* { dg-final { scan-assembler "_Z1fd" } } */ /* { dg-final { scan-assembler "_Z1ff" } } */ /* { dg-final { scan-assembler "_Z1fw" } } */ typedef int INT __attribute((may_alias)); void f...
google
android
has_nothrow_copy-3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/has_nothrow_copy-3.C
191
utf_8
342fa7cf8c1da3204825904ac42f1aaa
// PR c++/36871 // { dg-do run } #include <cassert> struct F { F (const F&) throw () { } template <class T> F (T) throw () { } }; int main () { assert (__has_nothrow_copy (F)); }
google
android
stmtexpr1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/stmtexpr1.C
1,268
utf_8
40ecbac4d27075e4005c73ce57fc001d
// make sure statement expressions work properly // { dg-do run } // { dg-options "" } extern "C" int printf (char const *, ...); extern "C" void abort (); static unsigned order[] = { 1, 101, 2, 102, 3, 4, 104, 103, 5, 6, 105, 106, 7, 107, 8, 408, 9, 109, 108, 10, 11, 110, 411, 12, 112, 111, 13, 113, 14,...
google
android
packed7
.C
toolchain/gcc/gcc-4.9/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
android
asm9
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/asm9.C
91
utf_8
80820bd76c1fd511cf9092d43ccb5baf
// PR 27451 // { dg-do compile } void foo() { asm("" ::: X); // { dg-error "before" } }
google
android
cleanup-8
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/cleanup-8.C
1,962
utf_8
2c0a040f8982fab55d7fb8cb41b02b30
/* { dg-do run { target hppa*-*-hpux* *-*-linux* *-*-gnu* powerpc*-*-darwin* *-*-darwin[912]* } } */ /* { dg-options "-fexceptions -fnon-call-exceptions -O2" } */ /* Verify that cleanups work with exception handling through signal frames. */ #include <unwind.h> #include <stdlib.h> #include <signal.h> #include <str...
google
android
attrib44
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/attrib44.C
216
utf_8
a9b531299f7c87d3798a11d5ed6f2ecb
// PR c++/52671 // { dg-do compile } __attribute__ ((deprecated)) enum E { E0 }; // { dg-warning "attribute ignored in declaration of" "ignored" } // { dg-message "must follow the" "must follow" { target *-*-* } 3 }
google
android
utf16-2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/utf16-2.C
775
utf_8
1f262acf2497c4af664d97e90a6ac7d2
/* Test the support for char16_t* string literals. */ /* { dg-do run { target c++11 } } */ /* { dg-options "-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"; #de...
google
android
mv10
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/mv10.C
204
utf_8
6146d7776788bf2e3abb4675eb20c010
// { dg-do assemble { target i?86-*-* x86_64-*-* } } // { dg-options "" } __attribute__((target ("popcnt"), used)) void foo (void) { } __attribute__((target ("popcnt","avx"), used)) void foo (void) { }
google
android
asm6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/asm6.C
117
utf_8
0689b61a59bc7c15432dc6d704aebb9f
struct A { ~A(); }; int foo(A); void bar() { A a; asm("" : : "r"(foo(a)) );//<-- cleanup needed here. }
google
android
member-attr
.C
toolchain/gcc/gcc-4.9/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
android
asmspec1
.C
toolchain/gcc/gcc-4.9/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
android
dllimport3
.C
toolchain/gcc/gcc-4.9/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
android
stmtexpr10
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/stmtexpr10.C
214
utf_8
b1f2237b354111a738a7ac26e40fca77
/* { dg-do compile } " */ /* { dg-options "" } */ void foo(int i) { (i ? 1 : 2) = ({ X; }); /* { dg-error "" } */ } struct A { ~A (); void foo() { delete this = ({ X; }); /* { dg-error "" } */ } };
google
android
alias-canon2
.C
toolchain/gcc/gcc-4.9/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
android
bitfield5
.C
toolchain/gcc/gcc-4.9/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
android
underlying_type5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/underlying_type5.C
1,613
utf_8
210d66722587db657b9dbd70b1b6b6e5
// { dg-do compile { target c++11 } } template<typename T1, typename T2> struct is_same { static const bool value = false; }; template<typename T> struct is_same<T, T> { static const bool value = true; }; enum E1 : unsigned { }; enum E2 : char { }; enum class E3 { }; enum class E4 : unsigned char { c = 1 }; ...
google
android
tmplattr8
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/tmplattr8.C
182
utf_8
bcdc198bba142d390818f427b8129565
// PR c++/28560 template<typename> struct A {}; template<int> struct B; template<int N> struct C : A<typename B<N>::X __attribute__((unused))> {}; // { dg-warning "attribute" }
google
android
builtin10
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/builtin10.C
1,427
utf_8
8e27d5e71c6ca468b0da85a6f69c93ca
// { dg-do compile { target correct_iso_cpp_string_wchar_protos } } // { dg-options "-O2 -fdump-tree-optimized" } #include <cstring> const void *cv1; const char *cc1, *cc2, *cc3, *cc4; void *v1; char *c1, *c2, *c3, *c4; void f1 (void) { cv1 = memchr ("abcba", 'b', 3); cc1 = strchr ("abcba", 'b'); cc2 = strrchr...
google
android
vector11
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/vector11.C
102
utf_8
86631ce973fe08bf3f9ad84e595fb594
// PR c++/34913 template<typename T> struct A { int x[sizeof(T)] __attribute((vector_size(8))); };
google
android
transparent-union
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/transparent-union.C
138
utf_8
1b8acb86eb35f02c108334294530bd02
// PR c++/53761 typedef union { // { dg-error "type transparent" } double x; } __attribute__(( __transparent_union__ )) example_t;
google
android
complit13
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/complit13.C
189
utf_8
1ef2d5904216cc610d5c5dde143f79ac
// PR c++/10207 // { dg-options "" } typedef struct { } EmptyStruct; typedef struct { EmptyStruct Empty; } DemoStruct; void Func() { DemoStruct Demo; Demo.Empty = (EmptyStruct) {}; }
google
android
label13a
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/label13a.C
331
utf_8
789f2daa9fc252b495bedaa8a84f1621
// PR c++/41090 // { dg-do run } // { dg-options "-save-temps" } // { dg-final { scan-assembler "_ZN1CC4Ev" } } // { dg-final cleanup-saved-temps } int i; struct A { A() {} }; struct C: virtual A { C(); }; C::C() { static void *labelref = &&label; goto *labelref; label: i = 1; } int main() { C c; return (...
google
android
va-arg-pack-1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/va-arg-pack-1.C
2,664
utf_8
33d19c269a9e9108be7e58ebb9f5dba4
// __builtin_va_arg_pack () builtin tests. // { dg-do run } // { dg-options "-O2" } #include <stdarg.h> extern "C" void abort (void); int v1 = 8; long int v2 = 3; void *v3 = (void *) &v2; struct A { char c[16]; } v4 = { "foo" }; long double v5 = 40; char seen[20]; int cnt; __attribute__ ((noinline)) int foo1 (int x...
google
android
underlying_type2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/underlying_type2.C
194
utf_8
cd2c9017532711278e93d2ec37f32659
// { dg-do compile } enum E1 { }; enum E2 { a = -1, b = 1 }; enum E3 { c = __LONG_MAX__ }; __underlying_type(E1) e1 = 0; __underlying_type(E2) e2 = b; __underlying_type(E3) e3 = __LONG_MAX__;
google
android
dllexport3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/dllexport3.C
334
utf_8
468d10c1db9669784f9c2089e770bdcf
// PR c++/42870 // { dg-do compile { target i?86-*-cygwin *-*-mingw* } } // { dg-final { scan-assembler "-export:\[\\\\\"\]*_ZN2SaD1Ev" } } #define ATTRIBUTE __attribute__ ((dllexport)) class ATTRIBUTE Sa { public: Sa() {} ~Sa(); }; ATTRIBUTE Sa::~Sa() {return;} bool DllMain(void *a,void*b,int) { Sa s; r...
google
android
always_inline-1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/always_inline-1.C
429
utf_8
644c5b82757cda2bb4ab9658b9dff77a
// { dg-options "-O0" } // { dg-do compile } // PR C++/34715 namespace X { template <class T> const T& min(const T& a, const T& b); template <class T> inline __attribute__ ((always_inline)) const T& min(const T& a, const T& b) { return a < b ? a : b; } } template <class T> inline __attribute__ ((always_inlin...
google
android
align1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/align1.C
501
utf_8
8086207ba3911ed58a971e642fbfdd29
// Test that __attribute__ ((aligned)) is preserved. // The alignment used to be 64 but Cygwin does not // support an alignment greater than 16 and COFF // not support an alignment greater than 4. extern "C" int printf (const char *, ...); typedef float at[4][4] __attribute__ ((aligned)); float dummy[4][4][15]; st...
google
android
complit11
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/complit11.C
186
utf_8
ad9b04984e82c2e0e1fb2025de8f9a23
// { dg-do compile } // { dg-options "" } struct A { int i; }; template<int t> void foo() { ((struct A) { 0 }).i += 1; // { dg-error "temporary" } } void g(void) { foo<0>(); }
google
android
complex3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/complex3.C
364
utf_8
fc4c3dfc15df590705add4def1833513
// PR c++/31780 // { dg-do run } // { dg-options "" } // Test that we can implicitly convert to _Complex, but that it's worse // than a scalar arithmetic conversion. extern "C" void exit (int); int r = 0; void f (_Complex int) { ++r; } void f (double) { } void g (_Complex int) { } int main() { f (1); g (1); ...
google
android
attribute-test-3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/attribute-test-3.C
946
utf_8
6ed72516e9f4d78a022f1835bdb61857
// { dg-do run } #define vector __attribute__((vector_size(16))) extern "C" void abort(); class Star { public: inline vector float foo() const; Star() { data.f[0] = 1.0; data.f[1] = 2.0; data.f[2] = 3.0, data.f[3] = 4.0; } private: union { float f[4]; v...
google
android
ms-1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/ms-1.C
288
utf_8
8d8589b0df08fd0ae97cc680893df8f1
// MS allows more things to be pointers to member functions // { dg-options "-fms-extensions" } struct X { void Foo (X *); void Bar (); }; void Quux (void (X::*) ()); void X::Foo (X *ptr) // { dg-message "candidate" } { Quux (Foo); // { dg-error "no matches" } Quux (Bar); }
google
android
alias-decl-attr4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/alias-decl-attr4.C
797
utf_8
17cab23059528c2d6dc88e4abc14ff75
// { dg-do run { target c++11 } } using global_vector_type __attribute__((vector_size(16))) = float; template <class T> struct A { using type = T; }; template < typename Val > struct S { using vector_type __attribute__((vector_size(16))) = typename A<Val>::type; typedef Val vector_type2 __at...
google
android
is_union
.C
toolchain/gcc/gcc-4.9/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
android
vector27
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/vector27.C
127
utf_8
da6a6b67e5b0bd14588fbe068ec0af21
// PR c++/58845 void foo() { int v __attribute__((vector_size(8))); v = v || v; // { dg-bogus "" "" { xfail *-*-* } } }
google
android
stmtexpr4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/stmtexpr4.C
119
utf_8
7f4e8ebedb382ebc1349d7067b034121
// PR c++/20147 // { dg-do compile } // { dg-options "" } void foo() { ({x;}); // { dg-error "was not declared" } }
google
android
attrib34
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/attrib34.C
607
utf_8
6ca90338cc7b2eaecb90e6f07f49d349
// PR c/37171 // { dg-do compile } // { dg-options "-O2 -fdump-tree-optimized" } unsigned int f1 () __attribute__((const)); unsigned int f2 () __attribute__((__const)); unsigned int f3 () __attribute__((__const__)); unsigned int f4 () { return f1 () + f1 () + f1 () + f1 () + f2 () + f2 () + f2 () + f2 () + f3 (...
google
android
pretty2
.C
toolchain/gcc/gcc-4.9/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
android
sizeof-complit
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/sizeof-complit.C
135
utf_8
e0be742fef2cac09f63674d981302b5c
// PR c++/18126 // { dg-options "" } struct s { int a; int b; }; char x[((sizeof (struct s){ 1, 2 }) == sizeof (struct s)) ? 1 : -1];
google
android
int128-3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/int128-3.C
220
utf_8
8313f3d030293501382bb11536a8919a
// Test for int128 enums. // { dg-do compile { target int128 } } // { dg-options "" } enum E { e1 = 0xffffffffffffffff, e2, e3 } e = e3; #define SA(I,X) int a##I[(X)? 1 : -1] SA(1, sizeof(E) == sizeof(__int128));
google
android
weak5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/weak5.C
153
utf_8
3966d7feec90bb7ef5f1b9dd00c1f2fb
// PR c++/36107 // { dg-do assemble } // { dg-require-weak "" } class Test { public: Test() __attribute__((weak)); }; void test() { Test test; }
google
android
attr-alias-1
.C
toolchain/gcc/gcc-4.9/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
android
attrib11
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/attrib11.C
444
utf_8
7d199628520ab2d84e8e00fc3200e683
// { dg-do compile } // { dg-options "-Wall" } // PR c++/13507, spurious warning due to attribute clobbering extern "C" { extern int printf (__const char *__restrict __format, ...) throw (); extern int scanf (__const char *__restrict __format, ...) throw (); } void foo(unsigned int x) { printf ("%d\n", x); }
google
android
utf-rtti
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/utf-rtti.C
267
utf_8
17a640731b3326a9cc83378818c7526c
/* Ensure that typeinfo data is generated for char16_t/char32_t. */ /* { dg-do link { target c++11 } } */ #include <typeinfo> int main(void) { typeid(char16_t).name(); typeid(char32_t).name(); }
google
android
anon-struct6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/anon-struct6.C
296
utf_8
ee218be24254fe546d1263e5a6c1c644
// PR c++/33460 struct A { struct { // { dg-error "anonymous struct cannot have function members" } struct { static int i; }; // { dg-error "prohibits anonymous structs|non-static data members|unnamed class" } void foo() { i; } }; // { dg-error "prohibits anonymous structs" } };
google
android
attrib26
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/attrib26.C
296
utf_8
974eff96719a23fa80e58b0108eba0c3
// PR c++/28659 // The attribute was causing us to get confused in merge_types when // combining the template type with an uninstantiated version. template<class T> struct __attribute__((aligned(1))) A { A& operator=(const A &t); }; template<class T> A<T>& A<T>::operator=(const A<T> &t) { }
google
android
attrib38
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/attrib38.C
136
utf_8
6aad86aa351b64bdf2a3f9b4513ff87b
// PR c++/36625 template <int N> struct A { struct S { short f[3]; } __attribute__ ((aligned (N))); }; int main () { A<4>::S s; }
google
android
altivec-14
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/altivec-14.C
352
utf_8
35f5233dc3266b57653c840644e9cbd2
/* { dg-do compile { target powerpc*-*-* } } */ /* { dg-require-effective-target powerpc_altivec_ok } */ /* { dg-options "-maltivec" } */ void f (__attribute__((altivec (vector__))) signed int * a, __attribute__((altivec (vector__))) signed int * const b); int foo (void) { __attribute__((altivec (vector__))) signe...
google
android
no-gnu-keywords-1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/no-gnu-keywords-1.C
293
utf_8
d5f662860124db72994e984fae6aac16
// { dg-do compile } // { dg-options "-fno-gnu-keywords" } // Verify that the keyword asm is recognized and that the GNU // extension typeof is not recognized as a keyword when using // -fno-gnu-keywords. int asm; // { dg-error "before .asm." } int typeof; // { dg-bogus "before .typeof." }
google
android
alias-decl-attr1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/alias-decl-attr1.C
420
utf_8
648ba15a176674be601c02eee7b8625a
// { dg-do compile { target c++11 } } template <unsigned Len, unsigned Align> struct aligned_storage { using type __attribute__((aligned((Align)))) = char[Len]; }; template<typename T> struct X { typename aligned_storage<sizeof(T),__alignof(T)>::type data; }; template<bool> struct StaticAssert; templat...
google
android
builtin2
.C
toolchain/gcc/gcc-4.9/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
android
mv15
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/mv15.C
796
utf_8
3e6b1267576a829153da0cd024d376d2
/* Test case to check if Multiversioning works. */ /* { dg-do run { target i?86-*-* x86_64-*-* } } */ /* { dg-require-ifunc "" } */ /* { dg-options "-O2 -fPIC" } */ #include <assert.h> /* Default version. */ int foo (); // Extra declaration that is merged with the second one. int foo () __attribute__ ((target("def...
google
android
vector16
.C
toolchain/gcc/gcc-4.9/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
android
underlying_type4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/underlying_type4.C
755
utf_8
b7a8ecf75070cdd4647856d3d7028b3d
// { dg-do compile } #include <tr1/type_traits> using namespace std::tr1; enum E1 { }; enum E2 { a = -1, b = 1 }; enum E3 { c = __LONG_MAX__ }; typedef __underlying_type(E1) UTE1; typedef __underlying_type(E2) UTE2; typedef __underlying_type(E3) UTE3; template<typename T> struct underlying_type { typedef __und...
google
android
complex8
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/complex8.C
1,121
utf_8
2e8503f2c902483c4d675ad10faaf1b6
// PR libstdc++/48760 // { dg-do run { target c++11 } } constexpr _Complex int i{1,2}; constexpr _Complex int j{3}; #define SA(X) static_assert((X),#X) SA(__real i == 1); SA(__imag i == 2); SA(__real j == 3); SA(__imag j == 0); struct A { _Complex int c; constexpr A(int i, int j): c{i,j} { } constexpr A(int i...
google
android
attribute-test-4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/attribute-test-4.C
823
utf_8
fc54da8c09474e6aa630170df92c6131
// { dg-do run } #define vector __attribute__((vector_size(16))) extern "C" void abort(); union U { float f[4]; vector float v; } data; class Star { public: static vector float foo(); Star() { data.f[0] = 1.0; data.f[1] = 2.0; data.f[2] = 3.0, data.f[3] = 4.0; } ...
google
android
dllimport11
.C
toolchain/gcc/gcc-4.9/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
android
typeof1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/typeof1.C
346
utf_8
797d2045e8822a50b44635725cab1028
// Test typeof template argument substitution // { dg-do compile } // { dg-options "" } template <class T> struct A { void f() {} void g(T* t) { A<typeof(t)> a; a.f(); } }; int main() { A<int> a; int b; a.g(&b); }
google
android
dllimport8
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/dllimport8.C
612
utf_8
619d91e2e14d184184e55b956ce47635
// PR c++/8378 // Ignore dllimport of static members if marked inlined. // or if definition follows declaration in dllimported class. // { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } } // { dg-options { -Wall -W } } struct __attribute__((dllimport)) Foo { static int static_int; sta...
google
android
attrib17
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/attrib17.C
511
utf_8
5ce9613d48cc00994b9fa919e8cc1293
// { dg-do compile } // Origin: Benjamin Kosnik <bkoz at gcc dot gnu dot org> // PR c++/17743: Attributes applied to typedefs. struct A { typedef char layout_type[sizeof(double)] __attribute__((aligned(__alignof__(double)))); layout_type data; }; struct B { typedef char layout_type[sizeof(double)]; layout_t...
google
android
dllexport5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/dllexport5.C
1,378
utf_8
e15e69aa13aaf21f69fe2db927332420
// { dg-do link } // { dg-require-dll "" } // { dg-additional-sources "dllexport5a.cc" } // { dg-options "-O2 -fkeep-inline-dllexport" } /* Test that inline functions declared "dllexport" appear in object files, even if they are not called, when -fkeep-inline-dllexport is supplied. This behavior is required by ...
google
android
vector26
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/vector26.C
423
utf_8
90e2e9a7d8de41b91b36e73f97d2d368
// PR c++/59633 // In C++98, the definition of bar is an error. In C++11, bar implicitly // gets internal linkage. // { dg-options "-mmmx" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */ typedef enum { e } T __attribute__((vector_size(8))); static void foo(T t) {} void bar (T t) {} // { dg-error "no linkage" ""...
google
android
complit8
.C
toolchain/gcc/gcc-4.9/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
android
utf-array
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/utf-array.C
1,687
utf_8
b25f5b285a9c203d959991246b44aa0d
/* Expected errors for char16_t/char32_t string literals. */ /* { dg-do compile { target c++11 } } */ // { dg-options "" } const char s_0[] = "ab"; const char s_1[] = u"ab"; /* { dg-error "from wide string" } */ const char s_2[] = U"ab"; /* { dg-error "from wide string" } */ const char s_3[] = L"ab"; /* { dg-error "fro...
google
android
altivec-4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/altivec-4.C
263
utf_8
4f6acab6c14678a58ab3251c4c5a0ce1
/* { dg-do compile { target powerpc*-*-* } } */ /* { dg-require-effective-target powerpc_altivec_ok } */ /* { dg-options "-maltivec" } */ /* PR c++/14425 */ #include <altivec.h> vector unsigned int splat0(vector unsigned int x) { return vec_splat(x, 0); }
google
android
alias-mangle
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/alias-mangle.C
184
utf_8
3f2cd7f4b0f52c57ea6794f4ec24c54c
// PR c++/34936 // { dg-do compile } /* { dg-final { scan-assembler "_ZN1AIdEC1Ev" } } */ typedef double X __attribute((may_alias)) ; template<typename> struct A { A(); }; A<X> a;
google
android
stmtexpr15
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/stmtexpr15.C
109
utf_8
9b1b14cb509eb63fa5b3e30e98dc19b3
// PR c++/59097 // { dg-options "" } void foo() { int x[({ return; })]; // { dg-error "non-integral" } }
google
android
cleanup-3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/cleanup-3.C
580
utf_8
8947a9ede099a6adc4fdf950293341b9
/* { dg-do run } */ /* { dg-options "" } */ /* Verify that the cleanup handler receives the proper contents of the variable. */ extern "C" void exit(int); extern "C" void abort(void); static int expected; static void handler(int *p) { if (*p != expected) abort (); } static void __attribute__((noinline)) b...
google
android
builtin30
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/builtin30.C
728
utf_8
7c883048f0ed19d3dcbf405e1cf70cd0
// { dg-do compile } // { dg-options "-O2" } typedef __SIZE_TYPE__ size_t; extern "C" { extern void __chk_fail (void); extern int snprintf (char *, size_t, const char *, ...); extern inline __attribute__((gnu_inline, always_inline)) int snprintf (char *a, size_t b, const char *fmt, ...) { if (__builtin_object_size (...
google
android
typeof8
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/typeof8.C
263
utf_8
a9d136cfb86815cbf4d2e46089c90ce0
// PR c++/14116 // Any use of typeof in a templete was causing an ICE. // { dg-options "" } struct vector { typedef int iterator; }; vector read_queue; template <class T> void f(){ typedef typeof (read_queue) read_queue_t; read_queue_t::iterator it; }
google
android
altivec-cell-3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/altivec-cell-3.C
841
utf_8
141d17972ddb9632037c663fb3999e80
/* { 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 abo...
google
android
builtin8
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/builtin8.C
238
utf_8
f5cd77399383b76230ff688140e0b73d
// PR c++/19628 // Verify that __builtin_constant_p may appear in a constant-expression. // { dg-do compile } template <int I> int f(int x[__builtin_constant_p(I)]) { return x[0]; } int g() { int a[1] = { 7 }; return f<32>(a); }
google
android
mv14
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/mv14.C
794
utf_8
ef2a4c7dd07218d859f203c337fdfb39
/* Test case to check if Multiversioning works. */ /* { dg-do run { target i?86-*-* x86_64-*-* } } */ /* { dg-require-ifunc "" } */ /* { dg-options "-O2 -fPIC" } */ #include <assert.h> /* Default version. */ int foo (); // Extra declaration that is merged with the second one. int foo () __attribute__ ((target("def...
google
android
weak2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/weak2.C
309
utf_8
d2a31eb19f78eba07ebeb256b409141a
// Test for #pragma weak with declaration not at file scope. // { dg-do compile } // { dg-require-weak "" } // { dg-options "" } // { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?_Z3foov" } } #pragma weak _Z3foov int main (void) { extern int foo (void); if (&foo) return foo (); return 0; }
google
android
array1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/array1.C
159
utf_8
691a47a228a5fa12f281a771f2c53825
// PR c++/13574 // { dg-options "" } class A { public: A() : argc(0), argv() { }; private: int argc; char* argv[]; }; int main() { A y; }
google
android
packed10
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/packed10.C
248
utf_8
57293062af51d172446e19a8b1bd8167
// PR c++/13983, c++/17519 // The typedef and the array were causing us to miss that A<int> is // a packed type. template <class T> struct A { A(); } __attribute__((packed)); typedef A<int> Ai; struct B { Ai a[2]; } __attribute__((packed));
google
android
vector4
.C
toolchain/gcc/gcc-4.9/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
android
va-arg-pack-2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/va-arg-pack-2.C
1,002
utf_8
95df36aad68d70ccb06176f4d6386b01
// { dg-do compile } // { dg-options "-O2" } int bar (int, const char *, int, ...); int baz (int, const char *, long int); extern inline __attribute__((always_inline)) int f2 (int y, ...) { return bar (y, "", __builtin_va_arg_pack ()); /* { dg-error "invalid use of" } */ } extern inline __attribute__((always_inli...
google
android
complit10
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/complit10.C
321
utf_8
3cf8f5d118ccef5a3e2d44a12df39f35
// PR c++/36023 // { dg-do compile } // { dg-options "" } struct A; void f1 (int i) { (int[i]) { 1 }; // { dg-error "variable-sized compound literal" } (A[5]) { 1 }; // { dg-error "have incomplete type" } (A[i]) { 1 }; // { dg-error "have incomplete type" } } void f2 () { (int[]) { 1 }; (int[1]) { 1 }; }...
google
android
instantiate3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/instantiate3.C
360
utf_8
561bb7137df38a016a786156224c9769
// Test that 'inline template' instantiates the vtable. // { dg-do compile } // { dg-options "-O -fno-implicit-templates" } template <class T> struct A { virtual void f () { } }; inline template struct A<int>; // { dg-final { scan-assembler "\n_?_ZTV1AIiE(:|\n|\t)" } } A<int> a; // { dg-final { scan-assembler-not ...
google
android
alias-decl-attr3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/alias-decl-attr3.C
350
utf_8
59f1cd24cc6ed77618c23a140ae0a4a5
// { dg-do run { target c++11 } } template <class T> int align_of_type_wide_array() { using type_wide_array __attribute((aligned(__alignof(T)))) = unsigned char[sizeof (T)]; return __alignof(type_wide_array); } int main () { if (align_of_type_wide_array<int>() == __alignof(int)) return 0;...
google
android
complex1
.C
toolchain/gcc/gcc-4.9/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 ();
google
android
pr59706
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/pr59706.C
282
utf_8
8a247c6260aa77bd5f5f10a05e13a5eb
// PR middle-end/59706 // { dg-do compile } extern struct S s; struct T { T (); ~T (); int t; } t; void foo () { #pragma GCC ivdep while (s) // { dg-error "could not convert" } ; } void bar () { #pragma GCC ivdep while (t) // { dg-error "could not convert" } ; }
google
android
complex2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/complex2.C
53
utf_8
756c2a4b372550f3325f3e64e36de6a3
// PR c++/31388 // { dg-options "" } bool b = !0i;
google
android
conv1
.C
toolchain/gcc/gcc-4.9/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
android
vector6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/vector6.C
342
utf_8
9dca9632e59d179ee1b85a181a34cae7
// { dg-options "" } // { dg-do compile } // C++/30016, we were allowing conversion between vector types // and union types which is invalid. typedef float __v_4F __attribute__ ((vector_size (16))); typedef union {__v_4F v; float a[4];} __v4F; void f(void) { __v_4F b; (reinterpret_cast<__v4F>(b).a)[1] = 1;...
google
android
altivec-1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/altivec-1.C
284
utf_8
f94bcd708feb1a029065a7503b545f54
/* { dg-do compile { target powerpc*-*-* } } */ /* { dg-require-effective-target powerpc_altivec_ok } */ /* { dg-options "-maltivec" } */ #include <altivec.h> int main() { return 0; } class F32vec4 { public: vector float val; vector float operator++(void) { return val;} };
google
android
vla2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/vla2.C
515
utf_8
49846f72ca91a662a5aa8456ec34302c
// { dg-do compile } // { dg-options "" } // PR 9708. We unified a VLA size as a constant. Then issued bogus // errors. template <unsigned int N> char* begin(char (&a) [N] ); // { dg-message "note" } void bar(int i) { char d[i] ; begin(d); // { dg-error "no matching function" "" } // { dg-message "(candidate|...
google
android
utf-dflt
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/utf-dflt.C
732
utf_8
05d08cc3bcdff43b34792fac2bc3368c
/* 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
android
is_empty
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/is_empty.C
1,141
utf_8
deb5d60ce9955a69d116b30edd2cf933
// { dg-do run } #include <cassert> struct A { double a; double b; }; struct B { virtual ~B() { } }; class C { }; union U { }; template<typename T> bool f() { return __is_empty(T); } template<typename T> class My { public: bool f() { return !!__is_empty(T); } }; template<typename T> ...
google
android
dllimport10
.C
toolchain/gcc/gcc-4.9/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
android
mv20
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/mv20.C
247
utf_8
887f6a4056c42cfe32291a59c556a71f
/* Test case to check if Multiversioning works. */ /* { dg-do run { target i?86-*-* x86_64-*-* } } */ /* { dg-require-ifunc "" } */ /* { dg-require-effective-target pie } */ /* { dg-options "-O2 -fPIE -pie -march=x86-64" } */ #include "mv15.C"
google
android
max
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/max.C
80
utf_8
fc916d98d36fed4d9da40614102d5fdd
struct s_t { }; void foo(void) { s_t s; int i; s<?=i; // { dg-error "" } }
google
android
is_pod_incomplete
.C
toolchain/gcc/gcc-4.9/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];