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
dyncast5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/rtti/dyncast5.C
112
utf_8
3ab9a09d47a84110ec4939e3b62f240f
// PR c++/29273 struct A { virtual ~A () { } }; struct B: A { } b [1]; void foo () { dynamic_cast<B*>(b); }
google
android
typeid9
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/rtti/typeid9.C
420
utf_8
1f8ec1c3ba15e07e5cd63d52ea64abab
// Test that the typeid name for a local class is properly null-terminated. // { dg-do run } #include <string.h> #include <typeinfo> #include <stdio.h> int f() { struct A {}; struct B {}; const std::type_info &ti = typeid(A); const std::type_info &ti2 = typeid(B); puts (ti.name()); puts (ti2.name()); retu...
google
android
crash3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/rtti/crash3.C
142
utf_8
afdb3cc7ece3c7c60179cd6d1819ab81
// PR c++/23947 // { dg-do compile } class A {}; class B {}; class C : public A, public B {}; class D : public C {}; void f () throw (D) { }
google
android
tinfo1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/rtti/tinfo1.C
842
utf_8
daac611a89b8fa8aa874e3b9f2cc9663
// Test if a local definition is in a linkonce/comdat section. // { dg-do compile } // { dg-final { scan-assembler "_ZTIP9CTemplateIhE\[: \t\n\]" } } // { dg-final { scan-assembler-not "(.globl|.global)\[ \]+_ZTIP9CTemplateIhE" } } // { dg-final { scan-assembler-not ".section\[^\n\r\]*_ZTIP9CTemplateIhE\[^\n\r\]*" } }...
google
android
anon-ns1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/rtti/anon-ns1.C
228
utf_8
2bcb8e987d41c50dbd1de216296fd071
// PR c++/49440 // The typeinfo name for A should start with * so we compare // it by address rather than contents. // { dg-final { scan-assembler "\"\*N\[^\"\]+1AE" } } namespace { class A { }; } void f() { throw A(); }
google
android
dyncast1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/rtti/dyncast1.C
390
utf_8
1922780b3e3f1002f29284ad087d37d6
class JunkBase { public: virtual void DoSomething( void ) = 0; protected: virtual ~JunkBase( void ) {} JunkBase( void ) {} }; class Junk : protected JunkBase { public: Junk( void ) : JunkBase() {} virtual ~Junk( void ) {} protected: inline JunkBase * AsBase( void ) { return dynamic_cast< Ju...
google
android
typeid3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/rtti/typeid3.C
218
utf_8
3e23755748cd7e94d3bc13c5d2f78cc9
#include <typeinfo> template <template <class> class T> struct A { void error() { typeid(T).name(); // { dg-error "missing" } } }; template <class T> struct B {}; template void A<B>::error();
google
android
typeid1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/rtti/typeid1.C
109
utf_8
a4ca49fa3677bf87a27b0e961eab1cee
#include <typeinfo> struct A { virtual ~A() {} }; int main() { A* a = new A; typeid(*a).name(); }
google
android
typeid5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/rtti/typeid5.C
225
utf_8
81cc751e8ba06b5401bbaef96e3aa2e4
// PR c++/29928 // { dg-do compile } #include <typeinfo> struct S; void f() { const std::type_info& info1 = typeid(int []); const std::type_info& info2 = typeid(S [3]); const std::type_info& info3 = typeid(S []); }
google
android
bitfld2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/diagnostic/bitfld2.C
296
utf_8
f3c789df79994ad5c2e7bf06c592e5aa
// PR c++/33840 // { dg-do compile } template<int> struct A { struct {} : 2; // { dg-error "expected ';' after struct" "expected" } }; // { dg-error "ISO C.. forbids declaration" "declaration" { target *-*-* } 6 } // { dg-error "ISO C.. prohibits anonymous" "anonymous" { target *-*-* } 6 }
google
android
aka1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/diagnostic/aka1.C
296
utf_8
74a973a9bb2225ddd4f1d24ed76803df
// Basic test for typedef stripping in diagnostics. struct A { void f(); }; void A::f() { // We don't want an aka for the injected-class-name. A a = 0; // { dg-error "type .A. requested" } } typedef A B; // We do want an aka for a real typedef. B b = 0; // { dg-error "B .aka A." }
google
android
bindings1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/diagnostic/bindings1.C
381
utf_8
d7dcca6cdb24ff15a17be482e130bf4e
// PR c++/45487 // { dg-do run } extern "C" int strcmp(const char*, const char*); template <typename T> const char* foo(T, typename T::type c) { return __PRETTY_FUNCTION__; } struct x {typedef int type;}; int main() { if (strcmp (foo(x(), 3), "const char* foo(T, typename T::type) " "[with T = x; typename ...
google
android
pr59838
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/diagnostic/pr59838.C
111
utf_8
7447a4913a5c3f623216b378589bebc7
// PR c++/59838 // { dg-do compile } enum E { a, b = (E) a }; // { dg-error "conversion to incomplete type" }
google
android
pr58979
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/diagnostic/pr58979.C
96
utf_8
88fee03436512dbcf1e58122fba64aea
// PR c++/58979 // { dg-do compile } int i = 0->*0; // { dg-error "invalid type argument of" }
google
android
wrong-tag-1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/diagnostic/wrong-tag-1.C
166
utf_8
c7f8ff703c53611ffdb66eccc4747879
// Origin PR c++/51427 typedef struct _GMutex GMutex; // { dg-message "previously declared here"} typedef union _GMutex GMutex; // { dg-error "tag used in naming" }
google
android
expr1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/diagnostic/expr1.C
100
utf_8
3127905a449847bc27a84d6b88588e2a
// PR c++/50059 int i; struct A { }; void f(A); void g() { f(i = 0); // { dg-error "i = 0" } }
google
android
bitfld1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/diagnostic/bitfld1.C
211
utf_8
424dce5e3d57a2b34afe27e7bbf2592d
// PR c++/46001 // { dg-do compile } struct S { char *p; unsigned char f : 1; }; struct S s; void *a = s.p | s.f; // { dg-error "unsigned char:1" } // { dg-bogus "__java_boolean" "" { target *-*-* } 11 }
google
android
method1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/diagnostic/method1.C
189
utf_8
f3b416e81c428ee9582715ac61d2b3d7
// PR c++/44627 // { dg-do compile } struct A { A *foo (); }; template <class T> void bar () { A::foo ().anything; // { dg-error "without object" } } void baz () { bar <int> (); }
google
android
variadic1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/diagnostic/variadic1.C
235
utf_8
377fd16303af15e64634bcf5a5f91ddc
// PR c++/55241 // { dg-do compile { target c++11 } } template<int N> struct B { }; template<typename... T> struct A { B<sizeof...(T)> f(); // { dg-error "sizeof\\.\\.\\." } B<42> f(); // { dg-error "cannot be overloaded" } };
google
android
parm1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/diagnostic/parm1.C
254
utf_8
87d8d501c7c4afd85a94fca95720d273
// PR c++/44366 // While printing the operand of sizeof We were trying to print f as the // scope of t, causing infinite recursion. template <typename T> void f(T t, int(*)[sizeof(t)]) { struct A { void g() { foo; // { dg-error "foo" } } }; }
google
android
for
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cilk-plus/for.C
728
utf_8
f58699ded6009584b8858731f49bd826
/* { dg-do compile } */ /* { dg-options "-O3 -fcilkplus" } */ // Test storage classes in the initialization of a <#pragma simd> for // loop. int *a, *b; void foo() { #pragma simd for (static int tt=5; tt < 10; ++tt) /* { dg-error "before 'static'\|not declared\|expected" } */ a[tt] = b[tt]; #pragma simd for...
google
android
for2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cilk-plus/for2.C
643
utf_8
c4ff210b2769634505b0f862e57713cd
/* { dg-do compile } */ /* { dg-options "-fcilkplus" } */ int *p; extern int stuff(); template <int value> void foobar(int a) { #pragma simd for (int i=0; i < a; ++i) p[i] = value; } template <int value> void foobar2(int a) { int j = 123; #pragma simd linear(j : value) for (int i=0; i < a; ++i) { ...
google
android
ef_test
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cilk-plus/ef_test.C
762
utf_8
a58834f859442ba31d151cfeb191a901
/* { dg-do run } */ /* { dg-options "-fcilkplus" } */ __attribute__((vector (nomask), vector(mask), vector(mask,linear(x:1)))) int func (int x) { return x+5; } __attribute__((vector(mask,uniform (y), linear(x:1)))) __attribute__((vector (nomask, uniform (x), linear(y:1)))) int func2 (int x, int y) { return x+y...
google
android
for3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cilk-plus/for3.C
333
utf_8
c0d65f62061db17b009f51f0196f9cf8
/* { dg-do compile } */ /* { dg-options "-O3 -fcilkplus" } */ // Test storage classes in the initialization of a <#pragma simd> for // loop. int *a, *b; void foo() { #pragma simd for (int tt=5; tt < 10; ++tt) { a[tt] = b[tt]; if (tt == 8) throw 1; /* { dg-error "throw expressions are not allowed" ...
google
android
for4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.dg/cilk-plus/for4.C
302
utf_8
e329c2f412390ab80573c152ff1e9bb1
/* { dg-do compile } */ /* { dg-options "-fcilkplus" } */ int *p; extern int stuff(); template <int value> void foobar(int a) { int j = 123; #pragma simd linear(j : value + 1) for (int i=0; i < a; ++i) { p[i] = value; j += stuff(); } } void funky() { foobar <69> (1000); }
google
android
pr56184
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/gcc.target/arm/pr56184.C
7,733
utf_8
615ac88d5a7b5b46e195906f5b84318f
/* { dg-do compile } */ /* { dg-skip-if "incompatible options" { ! { arm_thumb1_ok || arm_thumb2_ok } } { "*" } { "" } } */ /* { dg-options "-fno-short-enums -O2 -mthumb -march=armv7-a -mfpu=neon -mfloat-abi=softfp -mtune=cortex-a9 -fno-section-anchors" } */ typedef unsigned int size_t; __extension__ typedef int __int...
google
android
pr59985
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/gcc.target/arm/pr59985.C
1,608
utf_8
3ace669afcaf511c82ca7b12804b2ccb
/* { dg-do compile } */ /* { dg-skip-if "incompatible options" { arm_thumb1 } { "*" } { "" } } */ /* { dg-options "-g -fcompare-debug -O2 -march=armv7-a -mtune=cortex-a9 -mfpu=vfpv3-d16 -mfloat-abi=hard" } */ extern void *f1 (unsigned long, unsigned long); extern const struct line_map *f2 (void *, int, unsigned int, c...
google
android
pr54300
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/gcc.target/arm/pr54300.C
1,742
utf_8
dd6fcf2d02dd51f43eca4035c2609ea3
/* { dg-do run } */ /* { dg-require-effective-target arm_neon } */ /* { dg-options "-O2" } */ /* { dg-add-options arm_neon } */ #include <arm_neon.h> #include <stdlib.h> struct __attribute__ ((aligned(8))) _v16u8_ { uint8x16_t val; _v16u8_( const int16x8_t &src) { val = vreinterpretq_u8_s16(src); } operator int...
google
android
pr55073
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/gcc.target/arm/pr55073.C
2,118
utf_8
342549b2c2e7198ce4650b879ad7bd28
/* { dg-do run } */ /* { dg-require-effective-target arm_neon } */ /* { dg-options "-O2" } */ /* { dg-add-options arm_neon } */ #include <arm_neon.h> #include <stdlib.h> struct __attribute__((aligned(16))) _v16u8_ { uint8x16_t val; _v16u8_() { } _v16u8_( const uint8x16_t &src) { val = src; } _v16u8_( const in...
google
android
pr60675
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/gcc.target/aarch64/pr60675.C
14,589
utf_8
e3c168f45423111f89f16b75f8973c92
/* { dg-do compile } */ /* { dg-options "-std=c++11 -w -O2 -fPIC" } */ namespace CLHEP { static const double meter = 1000.*10; static const double meter2 = meter*meter; static const double megaelectronvolt = 1. ; static const double gigaelectronvolt = 1.e+3; static const double GeV = gigae...
google
android
partspec1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.oliva/partspec1.C
335
utf_8
a656b8b55218fcec4683461b96e1edf2
// { dg-do assemble } template <typename A, int* P> struct X; int a; template <typename A> struct X<A,&a> {}; int b; template <typename A> struct X<A,&b> {}; X<int,&a> x;
google
android
delete3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.oliva/delete3.C
544
utf_8
11621d62ae5292283691c74f01072c97
// { dg-do run } // Test whether dtors of vbases are called on throw within new[]. // Variant of delete2.C. extern "C" void abort(); extern "C" void exit(int); struct Foo { static bool first; Foo() { if (first) first = false; else throw first; } ~Foo() { exit(0); } }; bool Foo::first ...
google
android
ext1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.oliva/ext1.C
523
utf_8
0207e523c92eab8efadd6a868b5b3fe1
// { dg-do run } // { dg-options "" } extern "C" void abort(); int main () { char x[1]; char *y = x ? /* implicit x */ : 0; /* For some reason, the array x is copied twice, and y points to the second copy (the first is never used). If x is explicit, no copy is created, and the program succeeds. */ ...
google
android
template5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.oliva/template5.C
257
utf_8
ca9037b495f56944f828e7c59cd45614
// { dg-do assemble } template <typename> class X { template <typename> class Z; }; X<void> a;
google
android
typeof1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.oliva/typeof1.C
372
utf_8
cb347c003d6bc4d2ac1cd3b8cb0a7ad5
// { dg-do assemble } struct B { int i; }; template <class T> void foo(T b) { b.T::i; // ok // b.__typeof__(b)::i; // parse error, should this be accepted? typedef T t1; b.t1::i; // ok typedef __typeof__(b) t2; } template void foo(B); // not needed for the crash
google
android
nameret1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.oliva/nameret1.C
292
utf_8
bfe4a3c085addec5f331484e5310a5e5
// { dg-do assemble } // { dg-options "-Wno-deprecated" } // distilled from libg++'s Rational.cc inline int bar () return r {} // { dg-error "" } int foo () { return bar (); }
google
android
ns3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.oliva/ns3.C
282
utf_8
9909ce1d76f79ca2d7e88855206eeffd
// { dg-do assemble } namespace N { template <typename T> class A { template <typename T_> friend class A; }; }
google
android
template7
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.oliva/template7.C
359
utf_8
653ffd8fb42a52f23da2a7d4afdb6109
// { dg-do assemble } template<class> struct A {}; template<template<class> class T> struct B { B() { T<B>(); // { dg-bogus "" } conversion from int to non-scalar } }; B<A> foo;
google
android
template2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.oliva/template2.C
418
utf_8
44b10a016f12e19d08675ac7ff78ec8e
// { dg-do assemble } template <template <typename> class C, typename T> class foo { typedef typename C<T>::bar bar; foo(bar); }; template <template <typename> class C, typename T> foo<C,T>::foo(bar) {} // { dg-bogus "" } C<T> not a class
google
android
template1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.oliva/template1.C
362
utf_8
d3c0217c97d967afab13f7e35a8f473e
// { dg-do assemble } template<int P = 0> struct foo { static void bar(double (*)[dim]) {} // { dg-error "'dim' was not declared|array bound" } }; void bar() { foo<>::bar(0); }
google
android
template9
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.oliva/template9.C
268
utf_8
ef1e6aaf314569aac27d4d7adfe2e4d2
// { dg-do assemble } struct foo { template <class> void bar() = 0; // { dg-error "virtual" } };
google
android
inline1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.oliva/inline1.C
400
utf_8
410d7d1fd1d6e3575100642f8c9a65e8
// { dg-do assemble } // Derived from GNU lilypond. struct foo { foo(); foo(const foo&); ~foo(); }; struct bar { foo foo_member; bar(); bar(const bar&); // ~bar(); }; struct baz { void error (bar s); }; void fail() __attribute__((noreturn)); void baz::error (bar s) { fail(); }
google
android
stkalign
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.oliva/stkalign.C
299
utf_8
745068a3dc92318a7514be58f3413cb0
// { dg-do assemble } // distilled from libg++'s Fix.cc struct Integer { ~Integer () {} }; void foo (const Integer& y); Integer bar (const Integer& x); void show (const Integer& x) { foo (bar (x)); }
google
android
linkage1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.oliva/linkage1.C
538
utf_8
a8c9e5697cb58c77260d29a245371e15
// { dg-do link } // { dg-additional-sources " linkage1-main.cc" } // Verify that a member of a class is given global linkage when it's a // member of a function whose name is taken from a typedef, by // checking that another translation unit can call it. We don't do // the right things on functions, but we do on data...
google
android
typename1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.oliva/typename1.C
360
utf_8
d4ea4be0f27972210ed708dce5e36278
// { dg-do assemble } template <class T> struct foo; template <class T> struct bar { typedef int foo; }; template <class T> struct baz { typedef bar<T>::foo foo; // { dg-error "" } missing typename };
google
android
template4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.oliva/template4.C
465
utf_8
4bf2b2de8531cb926b80c542226b064c
// { dg-do assemble } template <const int&> struct X {}; int a = 1; X<a> x; // ok, a has external linkage const int b = 2; X<b> y; // { dg-error "" } const b has internal linkage extern const int c; X<c> z; // ok, c has external linkage extern const int c = 3; X<c> z_; // { dg-bogus "" } using c as constant
google
android
expr1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.oliva/expr1.C
373
utf_8
f8dc1e3b047760a647ca3fc66b22ab14
// { dg-do assemble } // gcc 2.95 reports: // invalid operands `foo' and `int' to binary `operator !=' class foo {} bar; int i = void(bar) ? 1 : 0; // { dg-bogus "" "" { xfail *-*-* } } - operator!= -
google
android
expr2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.oliva/expr2.C
296
utf_8
c0514fbc4a06765f363ceaa37f304896
// { dg-do run } int i, j; const int &f(const int& I, const int& J) { // this must not be optimized to I because it's an lvalue return (I != J) ? I : J; } int main () { return (&f(i, j) != &j); }
google
android
template10
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.oliva/template10.C
732
utf_8
13f959e91589085e8519a7ce7cb5d4bc
// { dg-do assemble } // based on C++ Standard example in [temp.expl.spec]/5 /* Members of explicitly specialized template classes shall not be defined with template-specialization syntax. The example in the Standard contains a definition of a member function of the explicitly specialized class template, but...
google
android
nameret2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.oliva/nameret2.C
307
utf_8
adf17e0939d138a664dee53d472271fc
// { dg-do assemble } // { dg-options "-O1 -Wno-deprecated" } // distilled from libg++'s Integer.cc inline int bar () return r {} // { dg-error "" } int& foo (int& x) { bar (); return x; }
google
android
friend1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.oliva/friend1.C
249
utf_8
157f8168456e389ac4f34a5082e75a7c
// { dg-do assemble } // We shouldn't warn about bar referring to a non-template in this case. template <typename T> class foo { friend int bar(int); };
google
android
dwarf2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.oliva/dwarf2.C
196
utf_8
92860e45834b96d5710a5ff0a0506262
// { dg-do assemble } // Fails with dwarf debugging. typedef __java_boolean jboolean; void foo() {}
google
android
template6
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.oliva/template6.C
414
utf_8
5a12a509e3ad4f540060b19515931b54
// { dg-do assemble } template <typename> struct foo {}; template <> void foo(); // { dg-error "not a template function" } bad specialization struct baz {}; template <> void baz (); // { dg-error "not a template function" } bad specialization
google
android
delete4
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.oliva/delete4.C
426
utf_8
0616469546aadbf2505636e6282105c3
// { dg-do run } // Test whether dtors of vbases are called from dtor of aggregate of array. // Variant of delete2.C and delete3.C. extern "C" void abort(); extern "C" void exit(int); struct Foo { ~Foo() { exit(0); } }; struct Bar : virtual Foo { }; struct Baz { Bar i[1]; }; int main() { Baz(); abort(); ...
google
android
delete1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.oliva/delete1.C
907
utf_8
ddd61b85e58b3cbf7cecbf12a7cc6a79
// { dg-do assemble } // based on analysis by Martin v. Loewis // [class.dtor]/11: delete must be implicitly checked for // accessibility only in the definition of virtual destructors, // implicitly defined or not. struct foo { foo() {} private: void operator delete(void *) {} // { dg-error "" } private } foo_; st...
google
android
delete2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.oliva/delete2.C
431
utf_8
8c0b3f49c2e5d5c224c1e0aae235e1d8
// { dg-do run } // Test whether dtors of vbases are called on delete[]. extern "C" void abort(); extern "C" void exit(int); struct Foo { ~Foo() { exit(0); } }; struct Bar : virtual Foo { }; int main() { delete [] new Bar[1]; abort(); }
google
android
typename2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.oliva/typename2.C
784
utf_8
ec472660515f0ea9e6421d6212594f55
// { dg-do assemble } // { dg-options "" } // This is slightly different from typename1.C. This one tests // whether the implicit typename extension works. gcc 2.95 reports: // warning: lookup of `foo' finds `struct foo' // warning: instead of `baz<T>::foo' from dependent base class // warning: (use `typename ba...
google
android
template3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.oliva/template3.C
284
utf_8
443bfe7e24350c24cc6466f4ec914d30
// { dg-do assemble } template <class T> class C {}; class foo {} bar = bar.C(); // { dg-error "" } call to template
google
android
partord1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.oliva/partord1.C
610
utf_8
408f9597b6ef8fe3fdf42796fc8b4405
// { dg-do assemble } template <typename T> void foo(T); template <typename T> void foo(T*); template <typename T> class bar { private: int i; // { dg-error "" } this variable friend void foo<T>(T); }; template <typename T> void foo(T) { bar<T>().i; // ok, I'm a friend } template <typename T> void foo(T*) { b...
google
android
overload1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.oliva/overload1.C
728
utf_8
5fbe5d92eee3f25d37e4d0eead79c035
// { dg-do assemble } struct foo { static int bar(); // { dg-message "foo::bar" } void bar(int); // { dg-message "foo::bar" } }; /* gcc emits a hard error without -pedantic, and a warning with -pedantic, even in bad1. */ int (*ok1)() = foo::bar; void (foo::*bad1)(int) = foo::bar; // { dg-error "assuming pointe...
google
android
ns1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.oliva/ns1.C
281
utf_8
ad3eac5cce6247b57053146272ad863a
// { dg-do assemble } void foo(); namespace bar { class baz { friend void ::foo(); // { dg-bogus "" } parse error }; }
google
android
delete5
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.oliva/delete5.C
428
utf_8
5b756dec74fffa3f353f5ca224de4022
// { dg-do run } // Test whether dtors of vbases are called from dtor of auto array. // Variant of delete2.C, delete3.C and delete4.C. extern "C" void abort(); extern "C" void exit(int); struct Foo { ~Foo() { exit(0); } }; struct Bar : virtual Foo { }; void foo() { Bar i[1]; } int main() { foo(); abort()...
google
android
new1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.oliva/new1.C
502
utf_8
3d2970abfa048bad4c4b489daa7ae29b
// { dg-do run } // execution test #include <new> #include <stdlib.h> struct A { A() { throw 0; } void* operator new(size_t size, double = 0.0) { return ::operator new(size);} void operator delete(void* p, double) { exit(0); } void operator delete(void* p) { abort(); } }; int main() { try { new A; } catch(...)...
google
android
dwarf3
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.oliva/dwarf3.C
433
utf_8
71f5a0ec45bdcfe033c493171d92e5ee
// { dg-do assemble } // Fails with dwarf debugging. template <class T = void> struct foo { int data[1]; }; template <class T = void> struct bar { bar(foo<> *); }; template <class T> bar<T>::bar(foo<> *x) { *x; } void baz() { foo<> *baz; bar<> baar(baz); }
google
android
ns2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.oliva/ns2.C
332
utf_8
6145af5e9f76316b1d149f4bc47f97db
// { dg-do assemble } // variation of ns1.C void foo(); namespace bar { using ::foo; class baz { friend void foo(); // { dg-bogus "" "" { xfail *-*-* } } - conflict - }; }
google
android
ctor1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.oliva/ctor1.C
353
utf_8
c17ab5a5d39a20786219d5cb72e8a956
// { dg-do assemble } struct A { A() : x; // { dg-error "" } missing body }; struct B { void m() {} }; struct C { // The error message below says it is within A::B::m()! void n() {} };
google
android
template8
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.oliva/template8.C
468
utf_8
27a944f8490905502531cd05059b838f
// { dg-do assemble } struct B { template <class> void bar(); } b; template <class T> void foo() { b.bar<T>(); // no longer { dg-bogus "" } bar undeclared b.template bar<T>(); // no longer { dg-bogus "" } ditto b.B::bar<T>(); // ok } template void foo<void>(); // no longer { dg-bogus "" }
google
android
dwarf1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.oliva/dwarf1.C
329
utf_8
e0d3e8aef40e06d214dac0b24734a598
// { dg-do assemble } // Used to fail with dwarf debugging. template <class T = void> struct foo { static const int ELEMENTS = 1; int bar[ELEMENTS]; }; foo<> bar;
google
android
scope12
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.gb/scope12.C
482
utf_8
32a45a0b56c8fcf1bb6bf90a706fa9b3
// { dg-do assemble } // GROUPS passed gb scope template<class T, int N> class FixedArray_t { public: T _array[N]; FixedArray_t () { } }; typedef FixedArray_t<unsigned char, 4> IPAddress_t; class IPAddress { public: IPAddress (IPAddress_t ip) { } operator IPAddress_t () { IPAddress_t rv; return r...
google
android
scope02
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.gb/scope02.C
146
utf_8
8e3f1fdefb7607038f8846096d94f798
// { dg-do assemble } // GROUPS passed gb scope struct c { typedef int t; struct d { void foo (t &); }; }; void c::d::foo (t & x) { }
google
android
scope08
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.gb/scope08.C
215
utf_8
c93cf26371b7789f7b57b4c803605c7f
// { dg-do assemble } // GROUPS passed gb scope template <class X> class C { public: int f (X ob) { return 0; } int g (X ob) { return f (ob); } }; class D { public: class E { public: E (); }; C <E> x; };
google
android
scope10
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.gb/scope10.C
137
utf_8
bb9e514ad1e581841027a696c4bf8e47
// { dg-do assemble } // GROUPS passed gb scope void Foo (void) { class C { public: virtual int foo (void) { return 0; } }; }
google
android
scope05
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.gb/scope05.C
159
utf_8
6d3bb8b7bfd4eac932c4685708a70423
// { dg-do assemble } // GROUPS passed gb scope struct C { void foo (int); void foo (char); struct D { void foo (); }; }; void C::D::foo () { }
google
android
scope01
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.gb/scope01.C
108
utf_8
4d9cd810ad5cff69d049f09d2f729d45
// { dg-do assemble } // GROUPS passed gb scope struct c { typedef int t; }; struct d { typedef char t; };
google
android
scope07
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.gb/scope07.C
153
utf_8
0ab7c611473a180dc5a41d239cd5a80e
// { dg-do assemble } // GROUPS passed gb scope struct D { friend class A; friend class B; friend class C; void foo (); }; void D::foo () { }
google
android
scope04
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.gb/scope04.C
234
utf_8
b4d18f58489b4b47679251992da9ff25
// { dg-do assemble } // GROUPS passed gb scope struct a { struct c { struct d { static int foo (int); }; }; struct b { int foo (int x) { return c::d::foo (x); } }; }; int a::c::d::foo (int) { return 0; }
google
android
scope09
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.gb/scope09.C
227
utf_8
fc9de0cb191e65ca614f854c367b10bd
// { dg-do assemble } // GROUPS passed gb scope class enclose { int e; protected: class nested { int n; }; }; class derived : public enclose { protected: class nested_derived : public nested { int nd; }; };
google
android
scope13
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.gb/scope13.C
118
utf_8
c4d0daf10d710e65ae6ea4021b2c12b1
// { dg-do assemble } // GROUPS passed gb scope class X { public: }; class Y { public: void X(); ::X X(int); };
google
android
scope06
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.gb/scope06.C
317
utf_8
2d68490b58fb46e44dd6cbf8c37c4f56
// { dg-do assemble } // { dg-prune-output "non-static data member initializers" } // GROUPS passed gb scope struct C { struct D { int x; void foo (); }; const int Ok = 0; // { dg-error "" } initialization forbidden }; void C::D::foo () { // { dg-prune-output "from this location" } x = Ok; }
google
android
scope11
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.gb/scope11.C
420
utf_8
e5d1da0f71c705fa50bd4da154277f8a
// { dg-do assemble } // GROUPS passed gb scope template<class T, int N> class fixed_array { public: T _array[N]; }; class Hash { public: Hash (int); }; typedef fixed_array<char, 4> ipAddress_t; class IPAddress { protected: long _i; public: IPAddress (ipAddress_t ip) { } IPAddress () { } IPAddress netMa...
google
android
scope03
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.gb/scope03.C
144
utf_8
3f7b5c540163c41c97af5949f79d9d85
// { dg-do assemble } // GROUPS passed gb scope struct c { class t { }; struct d { void foo (t &); }; }; void c::d::foo (t & x) { }
google
android
p646
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p646.C
2,655
utf_8
05e8c7b1970fa70f65e311dfe64f4800
// { dg-do assemble } // { dg-options "-Wno-deprecated -Wreturn-type" } // GROUPS passed i960 /* Bug Id: bnr PMRS Id: p0000646 Bug is: Urgent Code Generation Problem in gcc-i960 V 1.95 */ extern "C" { int printf (const char *, ...); void abort (); } struct foo { static int si; int i; foo (); foo (con...
google
android
net1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/net1.C
250
utf_8
d8c035c73c2a5073c19014f1eec91dd9
// { dg-do assemble } // Here is a net bug class ivAllocation { public: ivAllocation(); int x_; }; class TBScrollBoxInfo { public: ivAllocation allocation_; }; TBScrollBoxInfo* items_; inline TBScrollBoxInfo item() { return items_[0]; }
google
android
p2793
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p2793.C
140
utf_8
6546e7c78bbe751072d6856ff094477f
// { dg-do assemble } // prms-id: 2793 void f(char&) { // { dg-message "" } referenced by error below f('c'); // { dg-error "" } }
google
android
pt2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/pt2.C
229
utf_8
50a97239455d4eb4ae2f1acb145c606a
// { dg-do run } class A { public: }; template <class T> class B: public virtual A { public: B (); ~B (); }; template <class T> B<T>::B () { } template <class T> B<T>::~B () { } int main () { B<int> ab; return 0; }
google
android
warn8
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/warn8.C
382
utf_8
676d0d9db79e163408df1584e178d536
// { dg-do assemble } // { dg-options "-Waddress" } struct foo { bool test(); }; bool func(); void test() { foo A; bool (foo::* pmf)() = &foo::test; bool (*pf)() = func; if (A.test) ; // { dg-error "" } if (func) ; // { dg-warning "" } if (bool(A.test)) ; // { dg-error "" } if (bool(func)) ;...
google
android
p8175
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p8175.C
241
utf_8
96f6e9e43b5a2118bfbd47489b1c0a5b
// { dg-do assemble } // prms-id: 8175 class AtoBoolC { public: AtoBoolC(const AtoBoolC& aBool); private: int myValue; }; struct TestCase { AtoBoolC is_call_on_unack; }; static TestCase the_cases[] = { { 0 } }; // { dg-error "" }
google
android
p9732a
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p9732a.C
456
utf_8
a0952ba86801c96af79b501d48bc6bba
// { dg-do run } // prms-id: 9732 class A { int i; public: A() { i = 1; } ~A() { } }; struct value { A x,y,z; }; int crash(const value* capt, value* jet) { return capt == jet; } class euler { public: value number() const { return _value; } int distance(); private: value _value; }; int euler::dist...
google
android
p4667
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p4667.C
415
utf_8
025f2bb36e8970a3d25b4ef3f0fd25b1
// { dg-do run } // prms-id: 4667 int counter = 0; int a = 0; int b = 0; int c = 0; struct A { A() { a = counter++; } }; struct B { B() { b = counter++; } }; struct C : public virtual B { C() { c = counter++; } }; struct D : public virtual A, public virtual C { }; extern "C" int printf(const char*,...); in...
google
android
p3041
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p3041.C
388
utf_8
f6372b326346bae5cb43cdbb5908973f
// { dg-do run } // prms-id: 3041 class A { public: A() { } virtual void a() = 0; static int b(A * p) { p->a(); return 1; } }; class B : virtual public A { public: B() { static int installed = b(this); } void a() { } }; class C : virtual public B { public: C() { static int installed ...
google
android
eh16
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/eh16.C
256
utf_8
2a1ad4ea9a5b8d754af1ff9d9bcd764a
// { dg-do run { xfail sparc64-*-elf arm-*-pe } } // { dg-options "-fexceptions" } int e = 1; struct A { ~A() { --e; } }; struct B { A a; B() { throw 1; } }; main() { try { B b; } catch (...) { return e; } return 1; }
google
android
bool2
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/bool2.C
1,066
utf_8
f19585983a37496c948e2daf8e18e3e6
// { dg-do run } // { dg-options "" } class A { public: operator bool () { return true; } } a; class A1 { public: operator int () { return true; } } a1; class A2 { public: operator const char * () { return ""; } } a2; class A3 { public: operator unsigned long long int () { return true; ...
google
android
p1567
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p1567.C
954
utf_8
b66461e3466bfee2d64e7eea6102171f
// { dg-do run } // GROUPS passed vtable extern "C" int printf (const char *, ...); extern "C" void exit(int); class A { public: virtual const char* f1() { return "A::f1"; } virtual const char* f2() { return "A::f2"; } virtual const char* f3() { printf("FAIL\n"); exit(1); return "A::f3"; } }; class B { public:...
google
android
eh57
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/eh57.C
416
utf_8
a0354fc7c1799eba103513523b8d4fdb
// { dg-do assemble } // { dg-options "-fno-exceptions" } class Calendar_Time { public: ~Calendar_Time (); int operator <= (const Calendar_Time& t) const; }; class Temporal_Model_Interval { public: Calendar_Time start_time (); }; int intersects_p (Temporal_Model_Interval* i1, Temporal_Model_Interval* i2) { ...
google
android
p784
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p784.C
105,055
utf_8
9ebae74f7c2c88e9ef735034e2bfa905
// { dg-do assemble } // { dg-require-effective-target ilp32 } */ // { dg-options "-w" } // prms-id: 784 //# 1 "GctSymbol.GctSymbol.CHMap.cc" // This may look like C code, but it is really -*- C++ -*- /* Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ //#pragma implementation //# 1 "GctSymb...
google
android
eh34
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/eh34.C
243
utf_8
ae2d5050c6eecb79b81353aaefb4465a
// { dg-do run { xfail sparc64-*-elf arm-*-pe } } #include <exception> #include <stdlib.h> void my_unexpected() { exit (0); } void foo() throw () { throw "Hi"; } int main() { std::set_unexpected (my_unexpected); foo(); return 1; }
google
android
net45
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/net45.C
347
utf_8
b4a7322753a54bde5aeda77887a9e4d4
// { dg-do assemble } template <class T1, class T2> struct pair { T1 first; T2 second; pair(const T1& a, const T2& b) : first(a), second(b) {} }; struct myint { myint() { } myint(const myint& mi) { } myint& operator=(const myint& mi) { return *this; } }; extern pair<const myint, myint> a; pair...
google
android
p5718
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/p5718.C
447
utf_8
a53415421f9c5d14bbcdc1a2a69b56f0
// { dg-do run } // prms-id: 5718 class Base { int i; public: Base() { i = 42; } }; class Mixin { int j; public: Mixin() { j = 42; } }; class Derived : public Base, public Mixin { public: Derived() { } Derived & operator=(Mixin & m) { return *this; } }; void testFunct(Derived * arg) { Mixin temp; ...
google
android
net41
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/net41.C
52
utf_8
12752e61452464ae4268c61794f128d7
// { dg-do run } int main() { int i = ~ false; }
google
android
align1
.C
toolchain/gcc/gcc-4.9/gcc/testsuite/g++.old-deja/g++.mike/align1.C
929
utf_8
f4c35f4219396ec58cfdd9b8b8f74b0e
// { dg-do run } // Check to make sure we align virtual base classes properly class eel_base { public: }; class markable_eel_base : public eel_base { private: int mark; }; class eel_edge : public markable_eel_base { public: private: int foo; }; class edge : public virtual eel_edge { public: edge() { _wei...