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
alias-decl-attr2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/alias-decl-attr2.C
1,009
utf_8
59a7ecf5475cafe51a1f1159b986569c
// { dg-do compile { target c++11 } } 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_...
google
android
underlying_type6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/underlying_type6.C
744
utf_8
93e9f91e79578a6b15defdf39e6db298
// { 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
dllimport6
.C
toolchain/gcc/gcc-4.9/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.9/gcc/testsuite/g++.dg/ext/gnu-inline-global-reject.C
1,620
utf_8
250e029dc522f4bb52e990f182b032d6
/* 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-message "pr...
google
android
typeof6
.C
toolchain/gcc/gcc-4.9/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.9/gcc/testsuite/g++.dg/ext/utf32-1.C
953
utf_8
354a8b4e8e26ca1df2d8e1c4cd4aec1b
/* Test the support for char32_t character constants. */ /* { dg-do run { target c++11 } } */ /* { dg-options "-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 cha...
google
android
altivec-16
.C
toolchain/gcc/gcc-4.9/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.9/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.9/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.9/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.9/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.9/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.9/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.9/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.9/gcc/testsuite/g++.dg/ext/has_nothrow_copy-8.C
315
utf_8
957a747dcb57b75abba668e22763b617
// PR c++/56268 // { dg-do compile { target 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.9/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.9/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.9/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.9/gcc/testsuite/g++.dg/ext/mv9.C
294
utf_8
7610da3ac7479053e5453edaa297546d
// { dg-do compile { target i?86-*-* x86_64-*-* } } // { dg-options "" } void foo (); void foo () __attribute__((target ("sse4"))); void foo () __attribute__((target ("default"))); // { dg-message "previous declaration" } void foo () // { dg-error "attribute for multi-versioned" } { }
google
android
sync-2
.C
toolchain/gcc/gcc-4.9/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.9/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.9/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.9/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.9/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.9/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.9/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
android
attrib36
.C
toolchain/gcc/gcc-4.9/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
android
is_enum
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/is_enum.C
1,058
utf_8
03f82ac5f5b864878fa0ffa4383fa338
// { dg-do run } #include <cassert> struct A { double a; double b; }; class B { }; enum E { e0 }; template<typename T> bool f() { return __is_enum(T); } template<typename T> class My { public: bool f() { return !!__is_enum(T); } }; template<typename T> class My2 { public: ...
google
android
gnu-inline-class-static
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/gnu-inline-class-static.C
566
utf_8
3b39aa1a4010d4127a39b9443b421c4c
/* { 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 "fu...
google
android
mv7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/mv7.C
271
utf_8
d7e6a6acfdeef8fa4231626fa3e68f99
// { dg-do compile { target i?86-*-* x86_64-*-* } } // { dg-options "" } __attribute__((target ("default"))) void foo (void) // { dg-message "previously defined here" } { } __attribute__((target (128))) void foo (void) // { dg-error "(not a string|redefinition)" } { }
google
android
cleanup-11
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/cleanup-11.C
2,437
utf_8
4009d0d318d8dd0cfb0fbd35b0ae7c31
/* { 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 realtime signal frames on alternate stack. */ #include <unwind.h> #include <stdlib.h> #incl...
google
android
asm10
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/asm10.C
417
utf_8
82e001dc60a8f36b8affdc7210de5b60
// PR inline-asm/32109 // { dg-do compile } // { dg-options "-O2" } struct A { int i[3]; ~A (); }; struct A a; struct B { struct A c; int i; B (); } b; B::B () { __asm ("" : : "r" (a)); // { dg-error "impossible constraint|non-memory input" } __asm ("" : : "r" (b.c)); // { dg-error "impossible constraint|non-memory...
google
android
mv19
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/mv19.C
247
utf_8
73125ff09b85e6ba6339c1a0691b046b
/* 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 "mv14.C"
google
android
attrib37
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/attrib37.C
200
utf_8
d849127808e4deaa150bc4ee81a01d1e
// PR c++/43093 // { dg-do compile { target { { i?86-*-* x86_64-*-* } && ia32 } } } struct S { int x; S(const S &s) {} }; S __attribute__((__stdcall__)) getS(); void test() { S s = getS(); }
google
android
packed3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/packed3.C
662
utf_8
238ffa2ee564d6bf5c854871d9a259dd
// { dg-do compile } // Packed fields are unsuitable for direct reference binding. struct Unpacked { int i; }; void Ref (int &p); void Ref (Unpacked &p); struct __attribute__ ((packed)) Packed { char c; int i; Unpacked u; }; void Foo (Packed &p) { Ref (p.i); // { dg-error "cannot bind packed field" "" { target...
google
android
tmplattr6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/tmplattr6.C
192
utf_8
b2cbeefe0b660f19695decd8817dfef1
// Don't crash on an unknown attribute. struct foo { template <class T> void __attribute__((leafify)) bar() {} // { dg-warning "ignored" } }; void bar(void) { foo f; f.bar<int>(); }
google
android
is_base_of
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/is_base_of.C
1,696
utf_8
f15c22cabbedb731c2f01e04c0fc9309
// { dg-do run } #include <cassert> class A1 { double a; double b; }; class A2 { double a; double b; }; class B : private A1 { }; class C : private A1, private A2 { }; union U { double a; double b; }; template<typename T, typename U> bool f() { return __is_base_of(T, U); } template<typena...
google
android
attrib27
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/attrib27.C
169
utf_8
7a9cbe898bf9f2d20e888431b91e5c67
//PR c++/29980 struct A { typedef int X; }; // { dg-message "previous declaration" } struct __attribute__((unused)) A::X; // { dg-error "typedef-name" }
google
android
alignof1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/alignof1.C
312
utf_8
ae6df71fd3bee2754f2c1b710ca23b88
// { dg-do run } // Bug PR/7363. template<typename T> int my_alignof() { return __alignof__ (T); } template<typename> struct X { }; int main() { return !my_alignof<X<void> >(); }
google
android
pr57735
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/pr57735.C
3,917
utf_8
db6ceb60c85d19ebe96df1d062b22334
/* { dg-do compile { target arm*-*-* } } */ /* { dg-options "-march=armv5te -marm -mtune=xscale -mfloat-abi=soft -O1" } */ typedef unsigned int size_t; __extension__ typedef long long int int64_t; namespace WTF { template<typename T> class RefPtr { public: inline T* operator->() const { return m_ptr; }...
google
android
asm12
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/asm12.C
255
utf_8
e44c9c980378260d4b601d86e9cc1197
// PR c++/55619 // { dg-do compile } typedef int V __attribute__ ((vector_size (4 * sizeof (int)))); static const V C = { 0x201, 0, 0, 0 }; static const int D = 0x201; void f () { __asm volatile ("" : : "m" (D)); }
google
android
attrib47
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/attrib47.C
284
utf_8
1c7d85537c72737692a80f15c0701a2c
// { dg-do compile } // { dg-options "-O2" } class A { public: template <class T> T foo(T a) __attribute__ ((noinline)); }; template <class T> T A::foo(T a) { return a+1; } int bar(A a) { return a.foo(1); } // { dg-final { scan-assembler "_ZN1A3fooIiEET_S1_" } }
google
android
altivec-11
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/altivec-11.C
252
utf_8
11e05978299d38b5d2b835ef7303988d
/* Test handling of literal constant for dss operation. */ /* { dg-do compile { target powerpc*-*-* } } */ /* { dg-require-effective-target powerpc_altivec_ok } */ /* { dg-options "-maltivec" } */ #include <altivec.h> void foo () { vec_dss (1); }
google
android
typeof11
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/typeof11.C
249
utf_8
4d1f0cfba2837e6c477d300cc30990c4
// PR c++/37920 template<typename T> T& ensure_obj(const T&); template <typename T> void func2(T& t) { typedef __typeof__(ensure_obj(t)) ttt; struct ttt1 { ttt1( ttt arg0 ){} } tttt ( t ); } int main() { double d = 5; func2(d); }
google
android
tmplattr9
.C
toolchain/gcc/gcc-4.9/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
android
fixed2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/fixed2.C
97
utf_8
2dec269695cc75bd9f6561ca76c86464
// PR c++/35319 // { dg-options "" } void foo() { throw 0r; // { dg-error "not supported" } }
google
android
dllimport1
.C
toolchain/gcc/gcc-4.9/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
android
is_abstract
.C
toolchain/gcc/gcc-4.9/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
android
has_trivial_assign
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/has_trivial_assign.C
1,548
utf_8
c6f0545bc1364e6c2ba02db17185d224
// { dg-do run } #include <cassert> struct A { double a; double b; }; union U { double a; double b; }; struct B { B& operator=(const B&) { return *this;} }; struct C { virtual int f() { return 1; } }; struct D : public B { }; struct E : public A { }; struct F { A a; }; struct G { B b; }; template<typen...
google
android
underlying_type10
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/underlying_type10.C
613
utf_8
999bb6333438249f93af4d0c7b177d10
// { dg-do run { target c++11 } } #include <cassert> enum E1 : unsigned { E1_en = 1 }; enum E2 : char { E2_en = 1 }; enum class E3 { a = -1 }; enum class E4 : unsigned char { c = 1 }; enum class E5 : int { a = -1, b = 1 }; enum class E6 : long { c = __LONG_MAX__ }; template<typename T> struct underlying_type { t...
google
android
dllimport7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/dllimport7.C
813
utf_8
fb8210a8ae361b2f2903fa711da2a84f
// { dg-do compile { target i?86-*-cygwin* i?86-*-mingw* x86_64-*-mingw* } } // Report errors on definition of dllimport'd static data member . struct Baz { Baz(int a_ =0) : a(a_) {} int a; }; class __declspec(dllimport) Bar { public: enum {one = 1}; static const int two = 2; static const int ...
google
android
complex6
.C
toolchain/gcc/gcc-4.9/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
android
altivec-cell-2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/altivec-cell-2.C
2,503
utf_8
ee8876bb4c7e26216a124a7d6118d4ed
/* { 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_extract VMX intrinsics. */ #include <altivec.h> extern "C" void abort (void); vector ...
google
android
attrib8
.C
toolchain/gcc/gcc-4.9/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
android
vla4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/vla4.C
345
utf_8
ed33dc2d9d15f2684fe9377a6ae1b33d
// PR c++/29318 // { dg-options "" } #include <typeinfo> void f(int i) { try { int a[i]; throw &a; // { dg-error "int \\(\\*\\)\\\[i\\\]" } } catch (int (*)[i]) { // { dg-error "variable size" } } } int main() { int i = 5; int va[i]; const std::type_info& info(typeid(&va)); // { dg-error "variabl...
google
android
attribute-test-1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/attribute-test-1.C
860
utf_8
ca94f9782ff19bc2f53f5f625b6feffe
// { dg-do run } // { dg-options "" } // PR c++/13989 extern "C" void abort(); #define vector __attribute__((vector_size(16))) struct Constants { inline vector unsigned int deadbeef(void) const { return (vector unsigned int){0xdeadbeef, 0xabababab, 0x55555555, 0x12345678}; }; }; inline vector unsigned int ...
google
android
static1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/static1.C
363
utf_8
0cc2b837a96214f4ba420513a4d610a8
// PR c++/23699 // { dg-options "" } template<typename _CharT > class basic_string; typedef basic_string<char> string; template<typename _CharT> struct basic_string { static const int npos = -1; }; template<typename _CharT> const int basic_string<_CharT>::npos; extern template class basic_string<char>; struct A { ...
google
android
utf16-3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/utf16-3.C
1,301
utf_8
3d413c1a115fc49a6eed047d62327241
/* Test concatenation of 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"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"; con...
google
android
desig6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/desig6.C
234
utf_8
8d6356542b4a9a08cbf58a3a62006a65
// PR c++/57041 // { dg-do compile { target c++11 } } // { dg-options "" } template<typename T> union u { T a; char b; }; template<typename T> u<T> make_u(T t) { return { .a = t }; } int main() { return make_u<int>(1).a; }
google
android
desig3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/desig3.C
368
utf_8
6aa84e0888c3e522be50c83f640eb04f
// PR c++/51229 // { dg-do compile } // { dg-options "" } struct A { int i; }; int a[5] = { .foo = 7 };// { dg-error "used in a GNU-style designated initializer for an array" } int b[] = { .foo = 8 }; // { dg-error "used in a GNU-style designated initializer for an array" } A c = { [0] = {} }; // { dg-error "used in ...
google
android
gnu-inline-global
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/gnu-inline-global.C
1,265
utf_8
3e78535e0258846fa466a40475303131
/* Test __attribute__((gnu_inline)). Check that __attribute__((gnu_inline)) has no effect, in the absence of extern and/or inline. Check that we don't get out-of-line definitions for extern inline gnu_inline functions, regardless of declarations or definitions. Check that such functions can be overrid...
google
android
oper1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/oper1.C
449
utf_8
8f3e3432664712c939fe6dea74deb533
// { dg-do run } // Make sure the GNU extension of accepting dropping cv-qualifiers for // the implicit this argument does not kick in when taking the address // of an object, since this extension would change the meaning of a // well-defined program. struct A { A* operator&() { return 0; } }; int main () { const A...
google
android
is_pod
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/is_pod.C
1,136
utf_8
23bf9f19377330f98f34038ddb75c870
// { dg-do run { target c++11 } } #include <cassert> struct A { double a; double b; }; struct B { B() { } }; struct C : public A { }; template<typename T> bool f() { return __is_pod(T); } template<typename T> class My { public: bool f() { return !!__is_pod(T); } }; template<typename T> ...
google
android
vector18
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/vector18.C
235
utf_8
d8d10cb6135bd929018931d911b1ce3a
/* { dg-do compile { target c++11 } } */ typedef signed char __attribute__((vector_size(128) )) vec; template <class A, class B> auto f (A *a, B b) -> decltype (*a + b); void f (...) {} void g (vec *v, long long l) { f (v, l); }
google
android
attrib46
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/attrib46.C
169
utf_8
ad40278e44f810062402fc64b141c84f
// PR c++/40821 struct __attribute__((aligned(8)) S1 { int i; }; // { dg-error "expected" } struct __attribute__( aligned(8) S2 { int i; }; // { dg-error "expected" }
google
android
array2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/array2.C
257
utf_8
f1a9da555162b7ed9f63dd442d842c1c
// { dg-do compile } // Avoid -pedantic-error default // { dg-options "" } // PR 19989 - dependent array of size 0 fails to compile. template<int I> struct A { static const int zero = 0; }; template<int N> struct B { int x[A<N>::zero]; }; B<0> b;
google
android
interface1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/interface1.C
161
utf_8
3a16bb49d1e751989bc6c5980e68cc41
// PR c++/22252 // { dg-do link } // { dg-additional-sources "interface1a.cc" } // { dg-options "-fno-inline" } #pragma implementation #include "interface1.h"
google
android
fnname3
.C
toolchain/gcc/gcc-4.9/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
android
attrib29
.C
toolchain/gcc/gcc-4.9/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
android
pr57362
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/pr57362.C
6,279
utf_8
28722fa3c13492c8ff0657f2b54d3fab
/* { dg-do compile { target i?86-*-* x86_64-*-* } } */ /* { dg-require-ifunc "" } */ __attribute__((target("default"))) int foo(void) { return 1; } __attribute__((target("128bit-long-double"))) int foo(void) { return 1; } __attribute__((target("80387"))) int foo(void) { return 1; } __attribute__((target("96bit-long-d...
google
android
attr-ifunc-2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/attr-ifunc-2.C
594
utf_8
620342cf7dd87891e3a40fc63c98d22a
/* { dg-do run } */ /* { dg-require-ifunc "" } */ /* { dg-options "-Wno-pmf-conversions" } */ #include <stdio.h> struct Klass { int implementation (); int magic (); static void *resolver (); }; int Klass::implementation (void) { printf ("'ere I am JH\n"); return 0; } void *Klass::resolver (void) { int ...
google
android
altivec-types-3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/altivec-types-3.C
717
utf_8
30a07083e6958ecd6a518b18392c201d
/* { dg-do compile { target powerpc*-*-linux* } } */ /* { dg-require-effective-target powerpc_altivec_ok } */ /* { dg-require-effective-target lp64 } */ /* { dg-options "-maltivec -mno-vsx" } */ /* These should be rejected for 64-bit code. */ __vector long vl; /* { dg-error "invalid for 64" "" } */ __vector unsign...
google
android
label6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/label6.C
69
utf_8
ee824ccb1d507856d211f7e019df9eb0
// PR c++/32108 __label__ L; // { dg-error "not at the beginning" }
google
android
desig2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/desig2.C
569
utf_8
a3a3ed9db90b671ac74a4c8ad63238bd
// Test for C99-style designated array initializer union U { long l; const char *p; }; __extension__ U u = { .p = "" }; __extension__ int i[4] = { [0] = 1, [1] = 2 }; // Currently, except for unions, the C++ front end only supports // designators that designate the element that would have been initialized // an...
google
android
utf-cxx0x
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/utf-cxx0x.C
321
utf_8
bb128ce7c4aa022f8046c469bbe3faa3
/* Test parsing of u and U prefixes when also used as macros. */ /* { dg-do compile { target c++11 } } */ #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
android
traits1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/traits1.C
81
utf_8
5c82bcad933c856bb7bc2222cad5ff0f
// PR c++/58504 template<bool = __has_nothrow_assign(void)> struct A {}; A<> a;
google
android
cleanup-10
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/cleanup-10.C
2,416
utf_8
b3ade7e70b55fd412f8cc8c612a00fac
/* { 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 on alternate stack. */ #include <unwind.h> #include <stdlib.h> #include <sign...
google
android
complit6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/complit6.C
138
utf_8
493a8222f8737e0b1e764acebae321f4
// PR c++/20103 // { dg-options "" } struct A { A(const A&); }; struct B { A a; }; void foo(B); void bar(A &x) { foo((B){x}); }
google
android
asmspecValid
.C
toolchain/gcc/gcc-4.9/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
android
typeof2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/typeof2.C
516
utf_8
d4a84aa4c28cc592a1e9f2cc414b0de8
// Test typeof with __asm redirection // { dg-do compile } // { dg-options "-O2" } extern "C" { extern int foo1; extern int foo1 __asm ("bar1"); int foo1 = 1; extern int foo2 (int); extern int foo2 (int) __asm ("bar2"); int foo2 (int x) { return x; } extern int foo3; extern __typeof (foo3) fo...
google
android
altivec-15
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/altivec-15.C
588
utf_8
05aa93a27032c47400c1728d165f6aeb
/* { dg-do compile { target powerpc*-*-* } } */ /* { dg-require-effective-target powerpc_altivec_ok } */ /* { dg-options "-maltivec -mno-vsx" } */ /* This test was added for an internal compiler error. The number and content of error messages is irrelevant. */ struct SubData { inline const Float Clamp(Float ...
google
android
uow-1
.C
toolchain/gcc/gcc-4.9/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
android
fixed1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/fixed1.C
231
utf_8
cfd6fca862458e42100b9df11b48ee9e
// PR c++/35325 // { dg-options "" } template<int> struct A {}; template<typename> struct B : A<sizeof(0=0r)> {}; // { dg-error "not supported" } template<typename> struct C : A<sizeof(0=0r)> {}; // { dg-error "not supported" }
google
android
stmtexpr13
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/stmtexpr13.C
135
utf_8
a35a509e151456af5b8cfb76d49c85ed
// PR c++/35747 // { dg-do compile } // { dg-options "" } void foo () { ({ i; ({ i; }); 0; }); // { dg-error "was not declared" } }
google
android
asm1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/asm1.C
986
utf_8
d377fb4f9ef6d1ed2029c1551ddf7e3b
// Check that the 3.1 named operand syntax can be used in template functions. struct arg1 { int value; static const int info = 99; }; struct arg2 { int value; static const int info = 11; }; template<int j> int foo (void) { int i; asm ("# foo on %[third] %[second] %[fourth] %[first]" : [first] "=r"...
google
android
inline1
.C
toolchain/gcc/gcc-4.9/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
android
builtin9
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/builtin9.C
84
utf_8
9ec34b90151fc823df34413d59729df4
// PR c++/21619 // { dg-options "" } int f[__builtin_constant_p(&"Hello"[0])?1:-1];
google
android
asm11
.C
toolchain/gcc/gcc-4.9/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
android
typeof4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/typeof4.C
264
utf_8
bb35b4ce331483ff19b91d62234fac6b
// { dg-do compile } // { dg-options "" } // PR c++/9459: typeof in return type of template function void foo (int) {} void foo (double) {} template <typename C> typeof(foo(1)) bar () { return foo(1); }
google
android
pretty1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/pretty1.C
1,396
utf_8
ae2794e104309a224e228d70e4cede48
// PR c++/6794 // Test whether __PRETTY_FUNCTION__ works in templates, functions and // in initializers at global scope // { dg-do compile } // { dg-options "" } extern "C" void __assert_fail (const char *, const char *, unsigned int, const char *) throw() __attribute__((noreturn)); extern "C" void abort (v...
google
android
label7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/label7.C
225
utf_8
895ee2546695c14f3c38c7a1b79fbac1
// PR c++/32121 // { dg-do compile } int f (void) { a:; __label__ a; // { dg-error "not at the beginning" } int b; __label__ c; // { dg-error "not at the beginning" } a:; // { dg-error "duplicate label" } c:; }
google
android
attrib31
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/attrib31.C
201
utf_8
871bf59c89d9fdf913b212ba40c878a1
// PR c++/35097 template<int> struct A; template<> struct A<0> { typedef int X __attribute((aligned(4))); }; template<typename T> void foo(const A<0>::X&, T); void bar() { foo(A<0>::X(), 0); }
google
android
flexary1
.C
toolchain/gcc/gcc-4.9/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
android
flexary2
.C
toolchain/gcc/gcc-4.9/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
android
pr57548
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/pr57548.C
847
utf_8
9ca439cc6a120d7874cee5183ed8750c
/* { dg-do compile { target i?86-*-* x86_64-*-* } } */ /* { dg-require-ifunc "" } */ int fum (); // Extra declaration that is merged with the second one. int fum () __attribute__ ((target("default"))); int fum () __attribute__((target( "mmx"))); int fum () __attribute__((target( "popcnt"))); int fum () __attribute_...
google
android
asm4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/asm4.C
48
utf_8
f8da779ccf232ebdb2dee94530a1bf48
void f () { __asm__ __volatile__ ("" : : ); }
google
android
altivec-9
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/altivec-9.C
355
utf_8
5bc21f478c5c54165eb98a3afe01f181
/* Test for AltiVec function vec_ld, passing a pointer to const vector */ /* { dg-do compile { target powerpc*-*-* } } */ /* { dg-require-effective-target powerpc_altivec_ok } */ /* { dg-options "-maltivec" } */ #include <altivec.h> typedef vector unsigned char vuc_t; const vuc_t* p; vector unsigned char test_vec_ld(...
google
android
label12
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/label12.C
454
utf_8
0c4dee38ff36603320c2d05c89f20b89
// PR c++/39028 // { dg-do compile } void f () { int i; for (i = 0; i < 2; i++) { __label__ l; goto l; l:; } while (i++ < 5) { __label__ l; goto l; l:; } do { __label__ l; goto l; l:; } while (i++ < 8); if (1) { __label_...
google
android
bitfield4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/bitfield4.C
409
utf_8
27e7f277d640d9764e58437f0345ad9d
/* { dg-do compile } */ /* { dg-options "" } */ /* { dg-options "-Wno-packed-bitfield-compat -mno-ms-bitfields" { target { i?86-*-mingw* x86_64-*-mingw* } } } */ struct t /* { dg-message "note: offset of packed bit-field 't::b' has changed in GCC 4.4" "" { target pcc_bitfield_type_matters } } */ { char a:4; char b...
google
android
int128-4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/ext/int128-4.C
559
utf_8
3b33306d69b3ca18d4baf8c0846a03a3
// Test for int128 arithmetic conversions. // { dg-do compile { target int128 } } // { dg-require-effective-target c++11 } // { dg-options "" } template <class T, class U> struct same; template <class T> struct same<T,T> { }; #define assert_same(T,U) (same<T,U>()) int main() { long long ll; unsigned long long ull...