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
pr35011
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/pr35011.C
418
utf_8
4ab0218701107940b50c945a0965a43d
// { dg-do compile } // { dg-options "-O3 -fcheck-data-deps" } double foo(const double* p0, const double* p1, const double* q0) { double d; for (; p0 != p1; ++p0, ++q0) d += *p0 * *q0; return d; } struct A { double x[3]; const double* begin() const { return x; } }; struct B { A a0, a1; double d; ...
google
android
var_copy-1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/var_copy-1.C
169
utf_8
d94dedac2a05c257cba7f3d7bb2287f4
// { dg-do compile { target c++11 } } // Test to allow for va_copy with C++0x standard. #include <cstdarg> va_list x; va_list y; int main () { va_copy (y, x); }
google
android
crash-9
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/crash-9.C
214
utf_8
f0220e22e3cb835b39e2741a4acec08b
// Origin: PR c++/42915 // { dg-do compile } template <typename T> class A { template <typename U> class B { B foo(); }; }; template <typename T> template <typename U> A<T>::B<U> A<T>::B<U>::foo() {}
google
android
ptrmem8
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/ptrmem8.C
352
utf_8
2191563dd6d02eba9e6ba0c7da490226
// PR c++/33844 // { dg-do compile } struct A {}; template<int> void foo(void (A::* f)()) { A a; &(a.*f); // { dg-error "invalid use of\[^\n\]*\\.\\*\[^\n\]*to form|qualified-id is required" } } template<int> void bar(void (A::* f)()) { A *p; &(p->*f); // { dg-error "invalid use of\[^\n\]*->\\*\[^\n\]*to for...
google
android
opaque-1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/opaque-1.C
490
utf_8
d0fbce91ceffe38611bd7fe05b72ac2b
/* { dg-do run } */ /* { dg-options "-mcpu=8540 -mspe -mabi=spe -mfloat-gprs=single" } */ /* { dg-skip-if "not an SPE target" { ! powerpc_spe_nocache } { "*" } { "" } } */ #define __vector __attribute__((vector_size(8))) typedef float __vector __ev64_fs__; __ev64_fs__ f; __ev64_opaque__ o; int here = 0; void bar (_...
google
android
error27
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/error27.C
613
utf_8
147fa7e0ee5ec6d7d66166f8e2b74c62
// PR c++/35332 // { dg-do compile } // { dg-options "-fno-finite-math-only" { target sh*-*-* } } void foo (double x, double y) { __builtin_isgreater(x, y)(); // { dg-error "cannot be used as a function" } __builtin_isless(x, y)(); // { dg-error "cannot be used as a function" } __builtin_isgreaterequal(x, y)()...
google
android
mult-stor1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/mult-stor1.C
160
utf_8
6b0d71cb40f690a059f35fa91d64ee5f
// PR c++/20646 // { dg-do compile } struct A { extern static int i; // { dg-error "conflicting specifiers" } };
google
android
offsetof2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/offsetof2.C
674
utf_8
f22bc611fe66c01c402c287704531f43
// { dg-do run } // { dg-options -Wold-style-cast } // DR273 POD can have an operator&, offsetof is still required to work #include <stddef.h> struct POD1 { int m; void *operator& () const {return 0;} // yes, still a pod! }; struct POD2 { int m; }; void *operator& (POD2 const &) {return 0;} // ouch! struct PO...
google
android
i386-3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/i386-3.C
624
utf_8
b5cbc3ca0baf1ef1f22feb7db7fb8a00
/* { dg-do compile { target i?86-*-* x86_64-*-* } } */ /* { dg-options "-O -fkeep-inline-functions -march=k8 -msse4a -m3dnow -mavx -mavx2 -mfma4 -mxop -maes -mpclmul -mpopcnt -mabm -mlzcnt -mbmi -mbmi2 -mtbm -mlwp -mfsgsbase -mrdrnd -mf16c -mfma -mrtm -mrdseed -mprfchw -madx -mfxsr -mxsaveopt -mavx512f -mavx512er -mavx...
google
android
pr42645-2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/pr42645-2.C
340
utf_8
17a722f40fb7caa40b6a960f7c1b52e7
// PR tree-optimization/42645 // { dg-do compile } // { dg-options "-fcompare-debug -O1" } struct C { bool b; C (); }; static inline C *foo () {} extern void f4 (); static inline int f3 () { f4 (); } static inline void f2 (bool b) { int tmp = f3 (); if (C ().b && b) C (); } void f1 () { C *c = foo...
google
android
abstract4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/abstract4.C
241
utf_8
7ac72c1e4cfd61c68a7528160187b2f0
// PR c++/51184 template<typename T> struct S { }; template<typename T> void foo(); struct Abs { virtual void bar() = 0; }; int main() { S<Abs(int)> s; // { dg-error "abstract" } foo<Abs(int)>(); // { dg-error "abstract" } }
google
android
conversion1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/conversion1.C
302
utf_8
cfdc2115d36008e199bda75a789e43e3
// PR C++/2213 // { dg-do compile } class QObject { }; int main() { long long m; (void (QObject::*)()) m; // { dg-error "invalid cast" "" } }
google
android
anon-union3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/anon-union3.C
504
utf_8
c1daf3585c63314a131cec4afb411556
// PR c++/32054 class C { auto union // { dg-error "storage class" "" { target { ! c++11 } } } { int a; }; // { dg-error "multiple|specified" "" { target c++11 } } register union // { dg-error "storage class" } { int b; }; static union // { dg-error "storage class"...
google
android
new-size-type
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/new-size-type.C
189
utf_8
870dd50bee0d72f60475d1bf1979a635
// Origin: PR c++/36741 #include <stddef.h> const char* foo() { return new char[~static_cast<size_t>(0)];// { dg-bogus "large" } }
google
android
label1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/label1.C
78
utf_8
6e292e2bc85eea028b21b0cab55522ad
//PR c++/27820 void foo() { L: L: ; // { dg-error "duplicate label" } }
google
android
pr23205-2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/pr23205-2.C
437
utf_8
5c341a12ae31a27bda2a7bcaa37b26f8
/* { dg-do compile } */ /* { dg-skip-if "No stabs" { aarch64*-*-* mmix-*-* *-*-aix* alpha*-*-* hppa*64*-*-* ia64-*-* tile*-*-* nios2-*-* } { "*" } { "" } } */ /* { dg-options "-gstabs+ -fno-eliminate-unused-debug-types -ftoplevel-reorder" } */ const int foobar = 4; int foo () { return foobar + 1; } int main()...
google
android
error11
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/error11.C
161
utf_8
3c4bc8f8209191a16ce6898de421c3a9
/* { dg-options "-O1" } */ struct A { ERROR; /* { dg-error "ERROR" } */ ~A(); }; struct B { virtual ~B(); }; struct C : B, A {}; struct D : C {}; D d;
google
android
vararg-3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/vararg-3.C
341
utf_8
d70016b6360241c55db4eea300244bd5
// PR c++/31488: va_list considered non-POD on alpha // { dg-do compile } typedef __builtin_va_list __gnuc_va_list; typedef __gnuc_va_list va_list; extern int foo (int a, int b, ...); int bar (int a, int b, ...) { va_list args; __builtin_va_start(args,b); int result = foo (a, b, args); __builtin_va_end(args)...
google
android
pr37394
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/pr37394.C
215
utf_8
29dc51371e7e218914330b55739b55e1
// { dg-do compile { target ia64-*-* } } // { dg-options "-O -fschedule-insns2" } struct _Words { void *_M_pword; _Words (): _M_pword (0) { } } _M_word_zero;
google
android
switch3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/switch3.C
262
utf_8
bb7141945a25ded3ef95f8a4fab53bff
// PR c++/39371 // { dg-do compile } void foo (bool b) { switch ((unsigned int) b) { case 1: case 2: break; } } void bar (unsigned char b) { switch ((unsigned int) b) { case 1: case 257: case 513: break; } }
google
android
vararg-4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/vararg-4.C
259
utf_8
6e5312be3824af6659b39553a3f6a506
// PR c++/37404 typedef __builtin_va_list __gnuc_va_list; typedef __gnuc_va_list va_list; template <class> struct S { static void foo () { } }; template <class T, int N> struct S<T [N]> { static void foo () { T(); } }; int main () { S<va_list>::foo(); }
google
android
pr38706
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/pr38706.C
231
utf_8
e7318945c51d3bbaf1fa1d922b1661f3
// PR target/38706 // { dg-do compile } // { dg-options "-O2" } class ios_base { public: virtual ~ios_base (); }; class istrstream:virtual public ios_base { public: virtual ~istrstream (); }; istrstream::~istrstream () {}
google
android
pr28114
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/pr28114.C
237
utf_8
2435e2f760bdeb127d94ca3e33e5f948
// Test to make sure we do not ICE on this invalid program. template<int> void foo(struct {}*); // { dg-message "" } void bar() { foo<0>(0); // { dg-error "" } // { dg-message "candidate" "candidate note" { target *-*-* } 8 } }
google
android
ns1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/ns1.C
140
utf_8
f6c50007b333f25964b3ad2eb06e3773
// PR c++/14821 namespace A { namespace B {} } namespace A { namespace Alias = ::A::B; } namespace A { namespace Alias = ::A::B; }
google
android
default2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/default2.C
141
utf_8
0f56dd600fd360a08d419090d5c539f4
// PR c++/16829 // { dg-do compile } template<typename T> void foo(T, int = 0, int) {} // { dg-error "default" } void bar() { foo(0); }
google
android
offsetof3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/offsetof3.C
464
utf_8
b4ab86a9b47b685c240e9376c6f65667
/* { dg-do compile } */ struct X { int x, y; protected: int z; }; typedef X* pX; typedef __SIZE_TYPE__ size_t; size_t yoff = size_t(&(pX(0)->y)); /* { dg-warning "invalid access" "" } */ /* { dg-warning "macro was used incorrectly" "macro" { target *-*-* } 16 } */
google
android
pr33558-2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/pr33558-2.C
144
utf_8
eee8335ea07390d8a3289d098993c567
/* { dg-do compile } */ /* { dg-options "-fpermissive" } */ class X { mutable int &q; /* { dg-warning "cannot be declared 'mutable'" } */ };
google
android
pr27495
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/pr27495.C
162
utf_8
d135b9a72f0f848337f5db8cd4d42ca2
// Test to make sure we do not ICE on this invalid program. struct A { template<int> void foo(); void bar() { this.A::foo<0>(); } // { dg-error "" } };
google
android
pr47218-1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/pr47218-1.C
95
utf_8
e0e06cbf9366681f45c99562c024c9a4
#include "pr47218.h" Foo2::~Foo2 () { ((FooBaseBase1*)this)->Bar(); } void Foo2::Bar() { }
google
android
i386-7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/i386-7.C
269
utf_8
a32a5af1b4c57aabcbdaa817835a698d
/* Test that x86intrin.h is usable with -O -pedantic-errors. */ /* We were using SSE4.2 builtins without the extension available. */ /* { dg-do compile { target i?86-*-* x86_64-*-* } } */ /* { dg-options "-O -pedantic-errors" } */ #include <x86intrin.h> int dummy;
google
android
error24
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/error24.C
356
utf_8
c43f0a2b006172a836a80989792a28b6
// PR c++/34965 // { dg-do compile } // { dg-options "-O" } int foo (int); void bar (int i, int j, double k) { foo (i && j) (); // { dg-error "\\(\\(?i != 0\\)? \\&\\& \\(?j != 0\\)?\\)" } foo (!i || !j) (); // { dg-error "\\(\\(?i == 0\\)? \\|\\| \\(?j == 0\\)?\\)" } foo (!i == !j) (); // { dg-error "\\(\\(?i ...
google
android
builtin-unreachable-1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/builtin-unreachable-1.C
197
utf_8
ba848aa2a88ba59d1d57527eb8f55c01
// PR c++/40445 // Check that a function containing only __builtin_unreachable() // doesn't ICE. // { dg-do compile } // { dg-options "-O0" } const char * f (void) { __builtin_unreachable (); }
google
android
error16
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/error16.C
253
utf_8
ca264adcd1379493c0bceb26b7b18121
// PR c++/17763 template <typename U> struct Outer { struct Inner {}; Inner foo(); }; typedef int X; typedef Outer<X> XOuter; int main() { Outer<int> ab; ab.foo() == 1; // { dg-error "operand types are 'Outer<int>::Inner' and 'int'" } }
google
android
pr33601
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/pr33601.C
111
utf_8
47c3e5b8844cd1d867dcffd6b821201f
struct A { int membervar; }; typedef const A type; int type::* getmemberptr() { return &type::membervar; }
google
android
error26
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/error26.C
96
utf_8
9ef00053a92ca05523cd1c287fd795b3
// PR c++/35333 void foo(__complex__ double x) { __builtin_conj(x)(); // { dg-error "~x" } }
google
android
pr22003
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/pr22003.C
330
utf_8
45a2be25f7fc440c2cd2fc76af63be51
/* PR rtl-optimization/22003 */ /* { dg-do compile } */ /* { dg-require-effective-target freorder } */ /* { dg-options "-O2 -fno-exceptions -freorder-blocks-and-partition" } */ struct c1 { virtual ~c1(); }; class c4; struct c2 { virtual c4* func(); }; struct c3 : c1, c2 { c4* func(); }; c4* c3::fu...
google
android
assign1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/assign1.C
118
utf_8
327666cc7728d2edf1a48530ef433c9f
// PR c++/27716 // { dg-do compile } int foo() { return i ""= i; // { dg-error "not declared|string constant" } }
google
android
cv_func2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/cv_func2.C
294
utf_8
8304bda23e267a56d0383026bd73cc8c
typedef int ptr1() const; // no error void foo () { typedef int ptr2() const; // no error } class C { typedef int ptr3() const; // error void bar () { typedef int ptr4() const; // no error } }; void wibble () const { } // { dg-error "non-member function" }
google
android
error21
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/error21.C
99
utf_8
a2be38215425d44d563961ccb735829a
// PR c++/34273 struct A {}; struct B : A { B() : A()... {} // { dg-error "cannot expand" } };
google
android
stdarg2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/stdarg2.C
211
utf_8
6678e40619d5043af4bec1849f7634ae
// PR c++/11929 // Bug: We were complaining about the call to va_start because o is of // non-POD type. struct s { s(int); }; void test(s o, ...) { __builtin_va_list varg; __builtin_va_start(varg, o); }
google
android
array7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/array7.C
138
utf_8
06234a6c8c1c5a78689f7b10df173a6e
// PR c++/54038 extern const char *const v[]; typedef char T; void foo (const T *const[]); struct A { static const char *const a[]; };
google
android
new1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/new1.C
233
utf_8
88667285d39d29049b4e80cf22231d3f
// PR c++/28267 // { dg-do compile } struct A { A(); void* operator new(__SIZE_TYPE__, int = X); // { dg-error "not declared" } void operator delete(void*, int); }; void foo() { new A; // { dg-error "default argument" } }
google
android
i386-2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/i386-2.C
626
utf_8
a92cf1e9ee30095c8133d41e55014f96
/* { dg-do compile { target i?86-*-* x86_64-*-* } } */ /* { dg-options "-O -pedantic-errors -march=k8 -msse4a -m3dnow -mavx -mavx2 -mfma4 -mxop -maes -mpclmul -mpopcnt -mabm -mlzcnt -mbmi -mbmi2 -mtbm -mlwp -mfsgsbase -mrdrnd -mf16c -mfma -mrtm -mrdseed -mprfchw -madx -mfxsr -mxsaveopt -mavx512f -mavx512er -mavx512cd -...
google
android
ptrmem10
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/ptrmem10.C
454
utf_8
b0c8ed8d1b0b33a4572119b47d6bf3a1
// Origin PR c++/37093 template <class C, void (C::*M) ()> static void foo(void *obj) { C *p = static_cast<C*>(obj); (p->*M)(); } template <class C> static void bar(C *c, void (C::*m) ()) { foo<C,m>((void *)c);// { dg-error "(not a valid template arg|pointer-to-member|no matching fun|could not convert|constant)" ...
google
android
bitfield3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/bitfield3.C
374
utf_8
3fa385490ab4811d37b5716af91e8f6c
// PR c++/33841 // { dg-do compile } template<int> struct A { // multiple errors below: missing semicolon, no anonymous structs, etc. struct {} : 2; // { dg-error "" } }; template<int> struct B { int a; // multiple errors below: missing semicolon, no anonymous structs, etc. struct {} : 2; // { dg-error "" }...
google
android
redecl1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/redecl1.C
220
utf_8
22822b2c7eaa7d4e22eb88d6ce526a4c
// PR c++/5857 // This testcase failed because during duplicate_decls the type was promoted // to int. // { dg-do compile } typedef char baz; extern const char foo[]; const baz foo[] = "xyz"; const char bar[] = "abc";
google
android
ctor2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/ctor2.C
245
utf_8
d7844a4cf4cd40841244c6c728405a11
/* { dg-do compile } */ // PR C++/30303 // This used to ICE because we did not return NULL // in grokfndecl when an error happened. class A { int i; }; void foo() { A(); } A::A() {} /* { dg-error "definition of implicitly-declared" } */
google
android
error31
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/error31.C
324
utf_8
1fabd6378b7b1a06677aafca744f5f25
// PR c++/35335 // { dg-do compile } // { dg-options "" } // { dg-bogus "not supported by" "" { target *-*-* } 0 } struct A {}; // { dg-message "operator=|no known conversion" } void foo () { A a; a = ({ { 1; } }); // { dg-error "no match for" } // { dg-message "candidate" "candidate note" { target *-*-* } 12 ...
google
android
i386-8
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/i386-8.C
505
utf_8
6185c7fefa3b45be6654d24324c94f7d
// PR rtl-optimization/45400 // { dg-do compile { target i?86-*-* x86_64-*-* } } // { dg-options "-O2 -msse2" } // { dg-options "-O2 -msse2 -fpic" { target fpic } } #include <xmmintrin.h> static inline unsigned short bar (unsigned short x) { return ((x << 8) | (x >> 8)); } unsigned int foo (float *x, short *y) { ...
google
android
error12
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/error12.C
126
utf_8
e1eac1beda3a4145544bb54bc5a9b600
//PR c++/28292 extern "Java" { struct A { void foo(void; // { dg-error "before|incomplete type|invalid use" } }; }
google
android
cv_func3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/cv_func3.C
148
utf_8
37c1d9a28f4c0c2f55c8923ee549cb5b
// PR c++/58810 typedef int F() const; F f; // { dg-error "cv-qualifier" } struct A { friend F f; // { dg-error "cv-qualifier" } };
google
android
big-struct
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/big-struct.C
158
utf_8
dc1cf6dc500d953cbe68a0048105430f
// { dg-do compile { target i?86-*-* x86_64-*-* } } // { dg-require-effective-target ilp32 } struct A { }; struct B : public A { char b[0x20000000]; } e;
google
android
error34
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/error34.C
208
utf_8
e84f34f52c669d6f5d29a27ad14c664c
// PR c++/46538 // { dg-do compile } // { dg-options "" } S () : str(__PRETTY_FUNCTION__) {} // { dg-error "forbids declaration" "decl" } // { dg-error "only constructors" "constructor" { target *-*-* } 5 }
google
android
semicolon
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/semicolon.C
208
utf_8
a2a80603fcddfe63208d0fe7940f2149
// PR c++/18368 // { dg-do compile } // { dg-options "-fshow-column" } struct A { struct B { int i; } // { dg-error "after struct definition" } void foo(); };
google
android
error23
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/error23.C
220
utf_8
bd477bd638cf9bccaadfa542eff59056
// PR c++/34918 // { dg-do compile } int v __attribute ((vector_size (8))); bool b = !(v - v); // { dg-error "could not convert .\\(__vector.2. int\\)\\{0, 0\\}. from .__vector.2. int. to .bool.|in argument to unary" }
google
android
vector-compare
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/vector-compare.C
834
utf_8
bd077ca58097c230e0005df6028b4334
/* { dg-do compile { target c++11 } } */ /* { dg-options "-Wall" } */ // Check that we can compare vector types that really are the same through // typedefs. typedef float v4f __attribute__((vector_size(4*sizeof(float)))); template <class T> void eat (T&&) {} template <class T, int n> struct Vec { typedef T type ...
google
android
ptrmem7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/ptrmem7.C
89
utf_8
c7156668bb679049e5e609b54bbffecb
// PR c++/27447 // { dg-do compile } void (A::* p)(); // { dg-error "declared|token" }
google
android
error18
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/error18.C
104
utf_8
84a55a87245872ea0216ae776aa0a62e
// PR c++/33208 struct A { bool b; }; void f(A a) { a.b--; // { dg-error "Boolean expression" } }
google
android
armv7m-1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/armv7m-1.C
1,092
utf_8
9d297649b5a43f6461774469f0468593
/* { dg-do run { target arm*-*-* } } */ /* Test Armv7m interrupt routines. */ #include <stdlib.h> #ifdef __ARM_ARCH_7M__ void __attribute__((interrupt)) foo(void) { long long n; long p; asm volatile ("" : "=r" (p) : "0" (&n)); if (p & 4) abort (); return; } void __attribute__((interrupt)) bar(void) { ...
google
android
error4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/error4.C
327
utf_8
6d1f14da09aa48d7829a5bb7ece18577
// { dg-do compile } // PR 9898. Confusing error message struct Wrapper {}; void Foo(int const &); // { dg-message "in passing" "" } void Baz () { Foo (Wrapper ()); // { dg-error "Wrapper" "" } }
google
android
virtual1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/virtual1.C
103
utf_8
a6a9e2f5bcb753435ad581ee25ed4d6b
// PR c++/26070 // { dg-do compile } struct A { virtual static int i; // { dg-error "virtual" } };
google
android
typedef4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/typedef4.C
233
utf_8
b69dc2479f4dab741a9c03d2e626d4ea
// { dg-options "-g" } // { dg-do compile } // On some platforms like MIPS, __builtin_va_list is a // RECORD_TYPE. Make sure we don't wrongly try to generate debug info // for its TYPE_DECL and crash. typedef __builtin_va_list foo;
google
android
offsetof7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/offsetof7.C
212
utf_8
875d9ac66672e66bf6e0efdd9f6822b9
// PR c++/50608 // { dg-do compile } struct A { int offset; }; struct B: public A { }; struct C { A a; B b; }; int fails = __builtin_offsetof (C, b.offset);
google
android
ptrmem6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/ptrmem6.C
160
utf_8
6b08cb238dd6367be52907131a810d21
// PR c++/19666 // { dg-do compile } struct A { int i; }; int foo (A *p) { return &p->i - &(p->*&A::i); }
google
android
spu2vmx-1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/spu2vmx-1.C
310
utf_8
a9957b37b938af52bd091dea4f661da6
/* { dg-do compile { target powerpc*-*-* } } */ /* { dg-require-effective-target powerpc_spu } */ /* { dg-options "-maltivec" } */ #include <altivec.h> #include <spu2vmx.h> vec_uint4 f(vec_uint4 a, vec_uint4 b) { return spu_add(a, b); } vec_float4 f(vec_float4 a, vec_float4 b) { return spu_add(a, b); }
google
android
sized-delete-1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/sized-delete-1.C
193
utf_8
1c1b05b196c83e58b6c9181edf9d6bf4
// { dg-do link} // { dg-options "-O -fsized-delete" } // { dg-final { scan-assembler "_ZdlPv\[mj\]" } } struct A { int a[100]; }; int main(void) { A *a = new A; delete a; return 0; }
google
android
ucnid-1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/ucnid-1.C
611
utf_8
ba6518028576345919a1e9c87a39c36a
/* { dg-do run } */ /* { dg-options "-fextended-identifiers" } */ /* { dg-xfail-if "" { powerpc-ibm-aix* } { "*" } { "" } } */ /* { dg-skip-if "" { ! ucn } { "*" } { "" } } */ #include <cstdlib> int \u00C0(void) { return 1; } int \u00C1(void) { return 2; } int \U000000C2(void) { return 3; } int wh\u00ff(void) { return...
google
android
infloop-1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/infloop-1.C
294
utf_8
78e796e41e24a5aabf8b9d7868a3129a
// PR 18300: This sends old compilers into an infinite loop on x86_64 struct base1 { }; struct base2 { }; struct base3 { }; struct derived : base1, base2, base3 { }; void foo(derived); int main() { foo(derived()); }
google
android
main1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/main1.C
108
utf_8
7603e3e5185c1b4aaf6b806ea7dc4dee
// PR c++/30021 // { dg-do compile } int main(void,char**); // { dg-error "incomplete type|invalid use" }
google
android
i386-1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/i386-1.C
440
utf_8
3ca5017faf45f39326ff4e30a1ec1ba8
/* { dg-do run { target i?86-*-* x86_64-*-* } } */ /* { dg-options "-msse2" } */ /* { dg-require-effective-target sse2_runtime } */ #include <xmmintrin.h> static void sse2_test (void) { float a = 1.0f; float b = 2.0f; float c = 3.0f; float r; __m128 v = _mm_set_ps(a, b, c, 0); v = (__m128)_mm_srli_si1...
google
android
gc1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/gc1.C
644
utf_8
32f21e74c5b90dde8aa8adfc0d8ea6f0
// This test failed with GGC_ALWAYS_COLLECT because not all unparsed // inline methods were registered with GC. // { dg-do compile } const char *foo () { struct A { const char *a1 () { return "a1"; } const char *a2 () { struct B { const char *b1 () { return "b1"; } cons...
google
android
s390-1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/s390-1.C
444
utf_8
6c164a00f937e457895437563cb4fbc2
// { dg-do compile { target s390x-*-* } } // { dg-options "-O3 -fPIC" } class A { public: void f (void) { _M_a = 0; } void g (void) { _M_a = 1; } void h (void); private: int _M_a; }; class B : virtual public A { }; void test (B& x) { for (int i = 0; i < 17; i++) { x.f (); (x.*&A::g) (); x.h ...
google
android
ctor1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/ctor1.C
227
utf_8
77b7a83e4c4a267c5a040e6fe91b27f2
/* { dg-do compile } */ // PR C++/30303 // This used to ICE because we did not return NULL // in grokfndecl when an error happened. class A { int i; }; A::A() { A(); } /* { dg-error "definition of implicitly-declared" } */
google
android
dtor2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/dtor2.C
97
utf_8
a24d7cf3120e5c9c1cb8815c7c1afaf8
/* PR c++/35317 */ /* { dg-do compile } */ struct A { void operator delete[] (void*, ...); };
google
android
no-strict-enum-precision-2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/no-strict-enum-precision-2.C
403
utf_8
4a94b885ae890227ac3337e412c63d92
/* { dg-do run } */ /* { dg-options "-O2 -fno-strict-enums" } */ extern "C" void abort (void); enum X { X1, X2 }; int foo (enum X x) { switch (x) { case X1: return 0; case X2: return 1; } return x; } int main (int argc, char *argv[]) { int n = argc + 999; if (n == foo (static...
google
android
error15
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/error15.C
2,402
utf_8
c1ce9ac779aa6e9e4033383996b12dc2
// Test that duplicate function parameters are found in declarations. extern void g0 (int a, int b); extern void g1 (int a, float b); extern void f0 (int a, // { dg-message "previous" } int a); // { dg-error "redefinition" } extern void f1 (int a, // { dg-message "previous" } float ...
google
android
default6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/default6.C
413
utf_8
80f3c563ca108ca76b87c22fbe6a3685
// PR c++/30108 class BaseRobot { typedef void (BaseRobot::*PseudoState)(void); typedef PseudoState STATE; STATE initial (); int ready (); STATE stpOtherTask (); STATE commonEventProcessing (STATE pIdleTarget=(STATE)&BaseRobot::ready); }; BaseRobot::STATE BaseRobot::initial () { return commonEventProcess...
google
android
bitfield2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/bitfield2.C
119
utf_8
1c416edaf4596d6d655bbd79dbe1ca49
// PR c++/28052 // { dg-do compile } struct A { double d : 2; // { dg-error "non-integral" } A() {} ~A() {} };
google
android
java2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/java2.C
135
utf_8
cbeaf45e0171e3fe5619451df416f658
// PR c++/??? // { dg-do compile } extern "Java" { struct A {}; } typedef void* jclass; A* p = new A; // { dg-error "class\\$" }
google
android
typedef1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/typedef1.C
316
utf_8
b3cee6698f91dc967087653171b6e50b
// PR c++/27572 // { dg-do compile } void f1(typedef) {} // { dg-error "no type|typedef declaration" } void f2(typedef x) {} // { dg-error "type|typedef declaration" } void f3(typedef x[]) {} // { dg-error "type|typedef declaration" } void f4(typedef int x) {} // { dg-error "typedef declaration" }
google
android
default5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/default5.C
1,404
utf_8
add1c0ffb93257da6f83705218dd349e
// PR c++/28274 // { dg-do compile } void f1(int, int, int, int, int = 0); void f1(int, int, int, int = 0, int); void f1(int, int, int = 0, int, int); void f1(int = 0, int, int, int, int); // { dg-error "default" } void f2(int, int, int, int, int = 0) {} void f2(int, int, int, int = 0, int); void f2(int, int, int ...
google
android
pr25632
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/pr25632.C
325
utf_8
8ed27916cb5b71de34de304c8c46a014
/* PR c++/25632 */ /* { dg-do compile } */ __extension__ typedef __INTPTR_TYPE__ intptr_t; struct sockaddr_un { char sun_path[1]; }; const unsigned SI_SUN_HEAD_LEN = (intptr_t)(((struct sockaddr_un *)0)->sun_path); int SiGetPeerName () { return SI_SUN_HEAD_LEN; } int SiAccept () { return SI_SUN_HEAD_LEN...
google
android
vrp1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/vrp1.C
313
utf_8
7904744316bd21dc51afccc99c175c0f
// { dg-do compile } // { dg-options "-O2" } // This caused a crash in VRP because TREE_OVERFLOW was set for MIN. template<long long MIN> long long mod (long long l, long long r) { if (l == MIN && r == -1) return 0LL; return l % r; } template long long mod<-0x8000000000000000LL> (long long, long long);
google
android
cxa-atexit1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/cxa-atexit1.C
386
utf_8
5276b8901edfb83acb63fdaaaaa072fe
// { dg-do compile } // { dg-options "-O2 -fuse-cxa-atexit" } # 1 "cxa-atexit1.C" struct A { struct B { B (); ~B (); }; }; static A::B b; # 1 "cxa-atexit1.h" 1 #pragma interface template <class T> struct C { ~C (void); }; struct D : public C<bool> { D (void) : C<bool> () { } }; # 55 "cxa-atexit1.C" 2...
google
android
classkey1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/classkey1.C
455
utf_8
a33402d123eb961aa44a527290e451c2
// { dg-do compile } // PR 775. Some mismatches which were broken. template <class T> struct A {}; union A<int> a; // { dg-error "'union' tag" "" } template <> union A<float> {}; // { dg-error "'union' tag" "" } struct B {}; union B b; // { dg-error "'union' tag" "" } union C {}; class C c; // { dg-error "'class' tag" ...
google
android
nested-extern-2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/nested-extern-2.C
254
utf_8
2d4374350b7c46b467d19f44539be761
/* { dg-do run } */ // { dg-additional-sources "nested-extern.cc" } /* PR 31775 */ extern "C" void abort(); static int i; int *p = &i; int main() { int i; { extern int i; i = 1; *p = 2; if (i == 2) abort (); } return 0; }
google
android
anon3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/anon3.C
233
utf_8
8cf9ebc3f83dbe1add9e2345ef4acb59
// pr c++/15049 // Test that we can declare a global variable whose type is anonymous. // { dg-do compile } enum { a = 3 } x; // { dg-warning "anonymous type" "" { target { ! c++11 } } }
google
android
const3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/const3.C
529
utf_8
0f31e772471912bf15f7b8f02c2177e6
// PR middle-end/44101 // { dg-do compile } extern bool equal (int[], int[], const int[]); extern bool equal (wchar_t[], wchar_t[], const wchar_t[]); void foo(void) { const int A1[] = {3, 3, 3, 3, 3, 3, 3, 3, 3, 3}; const int N1 = sizeof(A1) / sizeof(int); int i1[N1]; if (equal(i1, i1 + N1, A1)) return; ...
google
android
anon-struct
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/anon-struct.C
138
utf_8
4a525e9796838f38d9c7110a0140c8eb
// { dg-do compile } namespace N { } namespace M { typedef struct { } N; }
google
android
return1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/return1.C
353
utf_8
e3e3485aa8a1172e3051d442252937c1
struct wxString; struct wxString* wxGetEmptyString(); struct wxString GetHeader() // { dg-error "return type" "" } { return *wxGetEmptyString(); }
google
android
friend4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/friend4.C
222
utf_8
20d8428bc67d92d86f3b9cfa527b7be3
// Misleading diagnostic struct A { friend void A::foo(); // { dg-error "implicitly friends" } friend A::~A(); // { dg-error "implicitly friends" } };
google
android
switch2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/switch2.C
443
utf_8
37c0f6f7c04f78d10db7b76974117a16
const int B = ~(~0u >> 1); #define b(x) (B + x) int Foo (int error) { switch (error) { case b (1): return 0; case b (2): return 0; case b (3): return 0; case b (4): return 0; case b (5): return 0; } return 0; }
google
android
pr28432
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/pr28432.C
199
utf_8
79811eb6886d2852fdf175ce1b1b1e20
// Test to make sure we do not ICE on this invalid program. // { dg-options "" } struct A {}; void A::foo(); // { dg-error "member function declared in class|outside of class is not definition" }
google
android
abstract3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/abstract3.C
198
utf_8
32f6a4ff28854973168944cb1ac27537
// PR c++/51431 struct A // { dg-message "note" } { virtual void foo() = 0; // { dg-message "note" } }; struct B { A a; // { dg-error "abstract" } B() : a() {} };
google
android
error32
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/error32.C
157
utf_8
c744ed5aaa2c2c1507e6c50193db38bb
// PR c++/33492 // { dg-options "" } void foo() { if (throw 0) // { dg-error "could not convert .\\<throw-expression\\>. from .void. to .bool." } ; }
google
android
ptrmem1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/ptrmem1.C
834
utf_8
aeacbd129aa91e6acca9b9022f8e03ba
// { dg-do run } // PR 4379. We created pointers to member references and pointers to // member fields when we shouldn't have. int gs; int gm; struct D { D () :m (gm) {} int &m; static int &s; int Foo (); }; int &D::s = gs; template<class T> int f1(T x) { return x != &gm; } template<class T> int f2(T x)...
google
android
dtor1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/dtor1.C
282
utf_8
1d7f492a5f6d9c2410071534745c8cc1
/* { dg-do compile } */ // PR C++/30303 // This used to ICE because we did not return NULL // in grokfndecl when an error happened. struct Ifoo { virtual ~Ifoo(){} }; struct foo : Ifoo { foo(){}; }; foo::~foo() // { dg-error "definition of implicitly-declared" } { delete this; }
google
android
void1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/void1.C
329
utf_8
397baf43a702343fe18c8c3822b6de3b
// PR c++/9278 // { dg-do compile } typedef void VOID; int foo(void); int bar(VOID); // { dg-error "type|invalid use" } template<int> int foo(void); template<int> int bar(VOID); // { dg-error "type|invalid use" } struct A { int foo(void); int bar(VOID); // { dg-error "type|invalid u...
google
android
enum2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/enum2.C
50
utf_8
c544bdd6560cc758c745269cd7fa1806
// PR c++/51248 enum E { e = sizeof(const E*) };
google
android
copy2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/other/copy2.C
425
utf_8
a8c217652f569c1ecbce8d12397e9abb
// { dg-do run } // Test that A's copy assignment method is called when B's instance // member array of A is assigned. // Contributed by Brian Gaeke, public domain. int status = 1; class A { public: int i; A &operator =(const A &i) { status = 0; } }; class B { public: A arr[10]; }; int main (int argc...