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
dllimport3
.C
toolchain/gcc/gcc-4.8.3/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.8.3/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.8.3/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.8.3/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.8.3/gcc/testsuite/g++.dg/ext/underlying_type5.C
1,627
utf_8
aa373ef8f7ed6d81df4213795dc84531
// { dg-do compile } // { dg-options "-std=c++0x" } 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 ch...
google
android
tmplattr8
.C
toolchain/gcc/gcc-4.8.3/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.8.3/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.8.3/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.8.3/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
va-arg-pack-1
.C
toolchain/gcc/gcc-4.8.3/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.8.3/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.8.3/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.8.3/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.8.3/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.8.3/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.8.3/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.8.3/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.8.3/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.8.3/gcc/testsuite/g++.dg/ext/alias-decl-attr4.C
811
utf_8
ad3367ffe73fb31ddff5ea746711bc47
// { dg-options "-std=c++0x" } // { dg-do run } 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 vec...
google
android
is_union
.C
toolchain/gcc/gcc-4.8.3/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.8.3/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.8.3/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.8.3/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.8.3/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
int128-3
.C
toolchain/gcc/gcc-4.8.3/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.8.3/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.8.3/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.8.3/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.8.3/gcc/testsuite/g++.dg/ext/utf-rtti.C
284
utf_8
f2f226beecfd8f6e19653afe7231d791
/* Ensure that typeinfo data is generated for char16_t/char32_t. */ /* { dg-do link } */ /* { dg-options "-std=c++0x" } */ #include <typeinfo> int main(void) { typeid(char16_t).name(); typeid(char32_t).name(); }
google
android
anon-struct6
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/ext/anon-struct6.C
283
utf_8
72746a0d7f31bf889b45b24a8426c590
// 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" } void foo() { i; } }; // { dg-error "prohibits anonymous structs" } };
google
android
attrib26
.C
toolchain/gcc/gcc-4.8.3/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.8.3/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.8.3/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.8.3/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.8.3/gcc/testsuite/g++.dg/ext/alias-decl-attr1.C
413
utf_8
47a36d447880d9aa5557830415cbe919
// { dg-options "-std=c++0x" } 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; template<> str...
google
android
builtin2
.C
toolchain/gcc/gcc-4.8.3/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
vector16
.C
toolchain/gcc/gcc-4.8.3/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.8.3/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.8.3/gcc/testsuite/g++.dg/ext/complex8.C
1,133
utf_8
d37fe8af857708cf2f55c2355feb521e
// PR libstdc++/48760 // { dg-options -std=c++0x } // { dg-do run } 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} { } const...
google
android
attribute-test-4
.C
toolchain/gcc/gcc-4.8.3/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.8.3/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.8.3/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.8.3/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.8.3/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.8.3/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
complit8
.C
toolchain/gcc/gcc-4.8.3/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.8.3/gcc/testsuite/g++.dg/ext/utf-array.C
1,683
utf_8
1b738e2aa49d357d5c68f897ec68f9f9
/* Expected errors for char16_t/char32_t string literals. */ /* { dg-do compile } */ /* { dg-options "-std=c++0x" } */ 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 "from wi...
google
android
altivec-4
.C
toolchain/gcc/gcc-4.8.3/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.8.3/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.8.3/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.8.3/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.8.3/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.8.3/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.8.3/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.8.3/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
weak2
.C
toolchain/gcc/gcc-4.8.3/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.8.3/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.8.3/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.8.3/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.8.3/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.8.3/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.8.3/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.8.3/gcc/testsuite/g++.dg/ext/alias-decl-attr3.C
364
utf_8
7e82f1fdbe84d0d1552e4437d19410dc
// { dg-options "-std=c++0x" } // { dg-do run } 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)) ...
google
android
complex1
.C
toolchain/gcc/gcc-4.8.3/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
complex2
.C
toolchain/gcc/gcc-4.8.3/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.8.3/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.8.3/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.8.3/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.8.3/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.8.3/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.8.3/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.8.3/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
max
.C
toolchain/gcc/gcc-4.8.3/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.8.3/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
android
alias-decl-attr2
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/ext/alias-decl-attr2.C
1,002
utf_8
67829171aa0948ef6a2e166585ee39f5
// { dg-options "-std=c++0x" } template<typename T> struct X { using layout_type __attribute ((aligned(__alignof(double)))) = char[sizeof(T)]; layout_type data; }; template<typename T> struct Y { using layout_type __attribute ((aligned(__alignof(T)))) = char[sizeof(T)]; layout_type da...
google
android
underlying_type6
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/ext/underlying_type6.C
758
utf_8
ecc2a7adc1574f7f6ce27d9c3d5c9458
// { dg-do compile } // { dg-options "-std=c++0x" } 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 ch...
google
android
dllimport6
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/ext/dllimport6.C
671
utf_8
fd3b6665cd27a15dcd7f9f07ad53481e
// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } } // Mark class static members as dllimport. struct Baz { Baz(int a_ =0) : a(a_) {} int a; }; class __attribute__ ((dllimport)) Bar { public: static const int two = 2; static const int three; static const Baz null_baz; }; ...
google
android
gnu-inline-global-reject
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/ext/gnu-inline-global-reject.C
1,602
utf_8
6d0638d007f41e1297f2bf2a29b20bd2
/* Test __attribute__((gnu_inline)). Check that we reject various forms of duplicate definitions. */ /* { dg-do compile } */ /* { dg-options " -ansi -Wno-long-long -ftrack-macro-expansion=0" } */ #include "gnu-inline-common.h" #undef fn #define fn pfx(func_decl_inline_before) decl(inline, fn) // { dg-error "prev...
google
android
typeof6
.C
toolchain/gcc/gcc-4.8.3/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
android
utf32-1
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/ext/utf32-1.C
947
utf_8
372b29c6fdb5613760a00a19b01a0604
/* Test the support for char32_t character constants. */ /* { dg-do run } */ /* { dg-options "-std=c++0x -Wall -Werror" } */ extern "C" void abort (void); const static char32_t c0 = U'a'; const static char32_t c1 = U'\0'; const static char32_t c2 = U'\u0024'; const static char32_t c3 = U'\u2029'; const static char32_t ...
google
android
altivec-16
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/ext/altivec-16.C
378
utf_8
1f347fa1c57370132e750e4fb8b77f9d
// PR c++/36662 // { dg-do compile { target powerpc*-*-* } } // { dg-require-effective-target powerpc_altivec_ok } // { dg-options "-maltivec" } #define vector __attribute__((altivec (vector__))) template <typename c> struct S {}; template <> struct S<vector float> { static vector float zero; }; template <int> vo...
google
android
dllexport2
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/ext/dllexport2.C
1,312
utf_8
662c7553988a2de47c6d0bea2a9a2e26
// { dg-do link } // { dg-require-dll "" } // { dg-additional-sources "dllexport2a.cc" } // { dg-options "-O2" } /* Test that inline functions declared "dllexport" appear in object files, even if they are not called. This behavior is required by the ARM C++ ABI: Exporting a function that can be inlined sh...
google
android
tmplattr2
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/ext/tmplattr2.C
388
utf_8
089638758b33bf99338184db0181179c
// PR c++/17743 template <unsigned Len, unsigned Align> struct aligned_storage { typedef char type[Len] __attribute__((aligned((Align)))); }; template<typename T> struct X { typename aligned_storage<sizeof(T),__alignof(T)>::type data; }; template<bool> struct StaticAssert; template<> struct StaticAssert<true> {}...
google
android
stmtexpr5
.C
toolchain/gcc/gcc-4.8.3/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
android
cleanup-2
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/ext/cleanup-2.C
342
utf_8
b225423f348683bb99a438ddffd8532e
/* { dg-do run } */ /* { dg-options "" } */ /* Verify that cleanup works in the most basic of ways. */ extern "C" void exit(int); extern "C" void abort(void); static void handler(void *p __attribute__((unused))) { exit (0); } static void doit(void) { int x __attribute__((cleanup (handler))); } int main() { d...
google
android
va-arg-pack-len-2
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/ext/va-arg-pack-len-2.C
1,184
utf_8
3da578ea7fb89ed9d7d870cd2355c8a1
// { dg-do compile } // { dg-options "-O2" } #include <stdarg.h> extern int error_open_missing_mode (void) __attribute__((__error__ ("open with O_CREAT needs 3 arguments, only 2 were given"))); extern int warn_open_too_many_arguments (void) __attribute__((__warning__ ("open called with more than 3 arguments"))); ...
google
android
always_inline-3
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/ext/always_inline-3.C
412
utf_8
501bf92c734eebe5c5c57a9e64a340e1
// { dg-options "-O0" } // { dg-do compile } // PR C++/34715 namespace X { template <class T> inline __attribute__ ((always_inline)) const T& min123(const T& a, const T& b); } template <class T> inline __attribute__ ((always_inline)) const T& X::min123(const T& a, const T& b) { return a < b ? a : b; } int main()...
google
android
init1
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/ext/init1.C
141
utf_8
853c0d1bb8c4ec806df7ecfff1c64c10
// PR c++/9623 // Test for trivial use of named initializer extension // { dg-options "" } struct S { int x; int y; }; S s = { x:1, y:2 };
google
android
has_nothrow_copy-8
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/ext/has_nothrow_copy-8.C
306
utf_8
45cdddfa9249380d0a8449336ca2526c
// PR c++/56268 // { dg-options -std=c++11 } template <class T> struct A { A(const A&) noexcept (T::value); }; struct B { static const bool value = true; }; template <class T> struct C { static const bool value = __has_nothrow_copy (T); }; #define SA(X) static_assert((X),#X) SA(C<A<B>>::value);
google
android
altivec-cell-4
.C
toolchain/gcc/gcc-4.8.3/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
android
has_nothrow_copy-2
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/ext/has_nothrow_copy-2.C
261
utf_8
ceb755ae5b6677631ae68a064bf15c2b
// PR c++/36871 // { dg-do run } #include <cassert> struct A { template <class T> A (T) throw (int); }; struct B { B (B&) throw (); template <class T> B (T) throw (int); }; int main () { assert (__has_nothrow_copy (A)); assert (__has_nothrow_copy (B)); }
google
android
label5
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/ext/label5.C
230
utf_8
223ef0f3f1278006edc68d3e9595115c
// { dg-options "" } // PR c++/24052 struct A { }; int main() { b: A() && && b; } // { dg-error "operand types are 'A' and 'void\\*'" } // { dg-message "candidate|operator&&|no known conversion" "additional" { target *-*-* } 5 }
google
android
mv9
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/ext/mv9.C
292
utf_8
1a77a3859b4627a1c19f57c86c0451b1
// { dg-do compile { target i?86-*-* x86_64-*-* } } // { dg-options "" } void foo (); void foo () __attribute__((target ("sse4"))); void foo () __attribute__((target ("default"))); // { dg-error "previous declaration" } void foo () // { dg-error "attribute for multi-versioned" } { }
google
android
sync-2
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/ext/sync-2.C
1,330
utf_8
7d2ab13d9258d8fc570367eacc626bf6
// Validate that the __sync builtins are overloaded properly in templates. // { dg-do compile } // { dg-options "-Werror" } #define TEST1(BUILTIN) \ template<typename T> \ void f##BUILTIN(T *p) \ { \ __typeof(BUILTIN(p, 1)) *pp; \ pp = p; \ } TEST1(__sync_fetch_and_add) TEST1(__sync_fetch_and_sub) ...
google
android
attrib33
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/ext/attrib33.C
277
utf_8
14f34254af296859ff097c2fd17c41ff
// PR c++/35546 // { dg-do compile } // { dg-options "-g" } template <int N> struct T { void foo (char const * ...) __attribute__ ((format (printf,2,3))); }; template struct T<3>; template <typename T> struct U { typedef T __attribute__((mode (SI))) V; }; U<int>::V v;
google
android
has_trivial_copy
.C
toolchain/gcc/gcc-4.8.3/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
android
pretty3
.C
toolchain/gcc/gcc-4.8.3/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
android
asm8
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/ext/asm8.C
352
utf_8
9c3b7de14ce6ac49627b91e2808376e5
/* { dg-do compile } */ /* Test that asm with no outputs are treated as volatile. */ void f(int x) { __asm__ ("extended asm not discarded" : : "r" (x)); } void g (void) { __asm__ ("simple asm not discarded"); } /* { dg-final { scan-assembler "extended asm not discarded" } } */ /* { dg-final { scan-assembler "si...
google
android
always_inline-4
.C
toolchain/gcc/gcc-4.8.3/gcc/testsuite/g++.dg/ext/always_inline-4.C
348
utf_8
2ac7c8bbdf5a3e29d0fe098818a73c8c
// { dg-options "-O0" } // { dg-do compile } // PR C++/34715 template <class T> const T& min123(const T& a, const T& b); template <class T> inline __attribute__ ((always_inline)) const T& min123(const T& a, const T& b) { return a < b ? a : b; } int main() { int a, b; return min123(a, b); } // { dg-final { scan...
google
android
attrib28
.C
toolchain/gcc/gcc-4.8.3/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" } }