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
chromium
900321_01
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.bugs/900321_01.C
967
utf_8
38428da15106725c9cdeec78d62f9def
// { dg-do assemble } // g++ 1.37.1 bug 900321_01 // cfront flags ERRORs on each of the lines indicated below. g++ does not // flag either ERRORs or warnings. // Although I cannot find where in the current C++ Reference Manual this // topic is covered, I am sure that these statements should get ERRORs in // a "stron...
google
chromium
900405_01
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.bugs/900405_01.C
658
utf_8
4df342af36e75b7594742a38d8d90ee7
// { dg-do assemble } // g++ 1.37.1 bug 900405_01 // The C++ Reference Manual says (in section 5.4) "Types may not be defined // in casts." // g++ fails to flag errors for cases where an attempt is made to define // a struct, class, union, or enum type within a cast. // keywords: casts, type definitions, tagged typ...
google
chromium
900211_04
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.bugs/900211_04.C
756
utf_8
f9519950e375f26419d30233dc4b7bcd
// { dg-do assemble } // g++ 1.36.1 bug 900211_04 // g++ fails to flag as errors attempts to compare pointer values against // (nonzero) integer values; // Since implicit conversions of pointer to integers (or vise versa) are // illegal, these comparisons are also illegal. // Cfront 2.0 passes this test. // keywor...
google
chromium
900127_01
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.bugs/900127_01.C
617
utf_8
8ad58394e9ae358d14f97dd7c4992759
// { dg-do assemble } // g++ 1.36.1 bug 900127_01 // g++ often fails to detect (and issue errors for) ambiguous overload // situations. In such cases, one of the possibilities is chosen // (apparently arbitrarily). Errors should be issued instead. // Cfront 2.0 passes this test. // keywords: function overloading, ...
google
chromium
900511_02
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.bugs/900511_02.C
609
utf_8
816e40831e0d42b36ac328d1c140f3b5
// { dg-do assemble } // g++ 1.37.1 bug 900511_02 // g++ does not properly shadow names of types with names of data members // in cases where the type names in question are used in the context of // formal parameters lists for member functions. // keywords: typedef names, shadowing, scope, formal parameter list // ...
google
chromium
900220_01
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.bugs/900220_01.C
894
utf_8
2d580aa45214c9c5624bc6140cf261b8
// { dg-do run } // g++ 1.36.1 bug 900220_01 // Ref: 12.8 // Section 12.8 says: // "That is, X::operator=() will be generated only if no assignment // operation is explicitly declared and an object of class X is actually // assigned an object of class X (or an object of a class derived from X) // or if the address ...
google
chromium
900220_03
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.bugs/900220_03.C
1,057
utf_8
581257e0732520f2bf2fdeb02256af41
// { dg-do run } // g++ 1.36.1 bug 900220_03 // g++ does not properly disambiguate calls to overloaded functions // which are nearly identical except that one take a reference to a // type `T' object and another takes a reference to a type `const T' // object. // (Note that the volatile stuff is commented out here bec...
google
chromium
900519_09
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.bugs/900519_09.C
847
utf_8
d00253d70a14469314393d169bec2c0e
// { dg-do assemble } // g++ 1.37.1 bug 900519_09 // g++ allows the allocation of const objects via operator new even when // these uses of operator new do not include initializations. // This is inconsistant within the restrictions placed on the construction // of class, struct, and union types which have constant ...
google
chromium
900330_01
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.bugs/900330_01.C
1,731
utf_8
955efbafb82b241dd6d4ba712693276f
// { dg-do assemble } // g++ 1.37.1 bug 900330_01 // // As indicated by the example at the end of the section 3.5.3 of the ANSI // C standard, when a type qualifier (i.e. "const" or "volatile") is applied // to an array type, the effect should be as if the element type had been // qualified with the given qualifier. /...
google
chromium
900210_02
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.bugs/900210_02.C
3,180
utf_8
339897012384e69ba0bf03042ca72e8f
// { dg-do assemble } // { dg-options "" } // g++ 1.36.1 bug 900210_02 // g++ allows integral type values to be assigned to variables of pointer // types. According to the C++ Reference Manual, this is illegal. // Cfront 2.0 passes this test. // keywords: integral types, pointer types, implicit type conversions //...
google
chromium
900212_02
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.bugs/900212_02.C
537
utf_8
c5d3a07860a418caf7cf6c28c8418e87
// { dg-do assemble } // g++ 1.36.1 bug 900212_02 // g++ fails to flag as errors attempts to take the difference of two values // of some compatible pointer-to-member type. // Cfront 2.0 passes this test. // keywords: pointer arithmetic, subtraction, member pointers struct struct0 { }; int struct0::*p0; int struc...
google
chromium
900331_04
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.bugs/900331_04.C
730
utf_8
49d0547019a4a915bdd9b4f5f87b134c
// { dg-do run } // g++ 1.37.1 bug 900331_04 // g++ is unable to correctly parse declarations of formal parameters and // local objects which have pointer-to-array types or reference-to-array // types. // Cfront 2.0 passes this test. // keywords: syntax, arrays, pointers, references, local, formal int array[10]; ...
google
chromium
900404_02
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.bugs/900404_02.C
594
utf_8
154a87b721d11ed1738fbab683ce754a
// { dg-do assemble } // g++ 1.37.1 bug 900404_02 // g++ fails to treat multicharacter literals as type "int" as required by // section 2.5.2 of the C++ Reference Manual. // The result is that the following program will exit with a nonzero // exit status. // keywords: character literals, multi-character literals, i...
google
chromium
900210_01
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.bugs/900210_01.C
3,116
utf_8
79390ee11aae50f0ebb8f4959b1d1e53
// { dg-do assemble } // g++ 1.36.1 bug 900210_01 // g++ allows pointer type values to be assigned to variables of integal // types. According to the C++ Reference Manual, this is illegal. // Cfront 2.0 passes this test. // keywords: pointer types, integral types, implicit type conversions int i; long l; short s;...
google
chromium
900324_05
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.bugs/900324_05.C
443
utf_8
c79225efeb1b5372067c4742a363bd3b
// { dg-do assemble } // g++ 1.37.1 bug 900324_05 // The following erroneous code causes g++ to segfault. // Cfront 2.0 passes this test. // keywords: segfault, arrays, references, assignment operator= typedef int int_array[]; extern int_array int_array_object; int_array &left = int_array_object; int_array &righ...
google
chromium
900321_02
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.bugs/900321_02.C
576
utf_8
2edfa97432f7032677694e75adc57ca8
// { dg-do run } // g++ 1.37.1 bug 900321_02 // The following program exits with a nonzero status because the constructor // is not called 3 times as it should be. This program exits with a zero // status when compiled with cfront 2.0. // Cfront 2.0 passes this test. // keywords: arrays, initialization, default co...
google
chromium
900324_04
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.bugs/900324_04.C
594
utf_8
4e0e41f367b26289726086977b1713af
// { dg-do assemble } // g++ 1.37.1 bug 900324_04 // This extension is not described in the current C++ Reference Manual, and // it is not implemented by cfront (2.0). // g++ should generate errors for the use of this extension when -pedantic // is used, however it does not. // Cfront 2.0 passes this test. // keywords...
google
chromium
900511_03
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.bugs/900511_03.C
548
utf_8
7c5fa26da82ab98b8a83c64d87bc1527
// { dg-do assemble } // g++ 1.37.1 bug 900511_03 // g++ does not properly shadow names of types with names of data members // in cases where the type names in question are used in the context of // formal parameters lists for member functions. // keywords: typedef names, shadowing, scope, formal parameter list cla...
google
chromium
parse4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/parse4.C
179
utf_8
8f9d1553897bdf7eca0984338ed83326
// { dg-do assemble } // Bug: g++ doesn't handle superfluous parentheses when redeclaring a TYPENAME. typedef int foo; class A { typedef int ((foo)); // { dg-bogus "" } };
google
chromium
enum4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/enum4.C
162
utf_8
743310178fbb706facf03822fb40e31e
// { dg-do assemble } // { dg-options "-Wall" } enum tristate { no = -1, maybe, yes }; tristate definite_tristate (int truth) { return (truth) ? yes : no; }
google
chromium
conversion8
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/conversion8.C
125
utf_8
1e7bb44d3765e5f813c41d5a36ba88cf
// { dg-do run } // PRMS id: 8279 int main () { char *const *p = 0; char **q = 0; (void)(p - q); (void)(q - p); }
google
chromium
access6
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/access6.C
172
utf_8
3b6c2594ca82c2df2368cad55253186e
// { dg-do assemble } // Simple testcase for access control. class A { public: void f (); }; class B: protected A { }; class C: protected B { void g() { f (); } };
google
chromium
pmftemp
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/pmftemp.C
323
utf_8
04c40742143bf931e76c03c636795daf
// { dg-do assemble } // PRMS Id: 4484 (bug 1) // Bug: g++ does not support templates involving method pointers. struct A { void f (); }; template <class T> void f (void (T::*p)()) // { dg-bogus "" } use of template parm as aggregate { } void g () { f (&A::f); // { dg-bogus "" } templates and method pointers...
google
chromium
tempparse
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/tempparse.C
405
utf_8
e4681da1536da14176b6242aa0cde9a4
// { dg-do assemble } /* PRMS Id: 3631 Bug is: g++ mangles template class names in a way that it won't accept, and then tries to feed them to itself. */ template<class T> struct A { A(); }; template<class T> struct B : A<T> { B(); }; // { dg-bogus "" } B<C<char>> template<class T> struct C { C()...
google
chromium
tempsub
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/tempsub.C
293
utf_8
0f465f011856318e4a82bae9e718ca27
// { dg-do assemble } // Distillation of crash1.C problem (PR 3633) template<class P> class A { P p; }; template<class Q> class B { A<Q> a; // bogus error - temp parm name propagating }; template<class R> class C { B<R> b; }; template<class S> class D { S s; }; C< D<int> > c;
google
chromium
access14
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/access14.C
205
utf_8
3a68f71ebcb0a8ae7de40208c5bd707b
// { dg-do assemble } template <class T> struct A { T t; }; template <class T> class B: private T { public: T::t; // { dg-bogus "" } doesn't recognize access decl }; template class B<A<int> >;
google
chromium
init3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/init3.C
760
utf_8
f2ff54cbad03f3b2bd95882368cc045d
// { dg-do run } // PRMS Id: 5652 // Bug: strings does not get initialized. #include <string.h> class My_string { char *str; int len; public: My_string(const char* string); My_string(const My_string &); ~My_string() { delete str; } char* char_p() { return str; } }; const My_string strings[4] = { ...
google
chromium
precedence
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/precedence.C
254
utf_8
a55282bfb97785a99ea82c5df50a774d
// { dg-do assemble } // Bug: g++ groups ->* before casts. // PRMS Id: 4484 (bug 4) struct A { }; struct B : public A { void f (); }; void g () { A* ap = new B; void (B::*p)() = &B::f; ((B*)ap->*p)(); // { dg-bogus "" } incorrect precedence }
google
chromium
cleanup2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/cleanup2.C
354
utf_8
5b6b6a6852bc47d56991bf44f3d18df8
// { dg-do assemble } // PRMS Id: 6303 // Bug: compiler crashes processing the cleanup for arrayOfClass. class Klasse { public: ~Klasse(); // This dtor MUST be declared to generate the error... }; Klasse varOfClass; int main() { // This MUST be 'const' to generate the error... const Klasse arrayOfClass[1] = ...
google
chromium
delete2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/delete2.C
230
utf_8
2c2af3538bbebd7769b8502247845d12
// { dg-do assemble } // PRMS Id: 5003 // Bug: g++ complains about calling the destructor for a const object. struct A { public: ~A(); }; const A foo (); void bar() { A n; n = foo(); // { dg-bogus "" } deleting const }
google
chromium
overload4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/overload4.C
150
utf_8
d8248eb864fb06ec9353707e9d4732bb
// { dg-do assemble } // Testcase for simple overloading resolution. void foo (int); void foo (int, int); void bar () { foo (1); foo (1, 2); }
google
chromium
thunk3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/thunk3.C
1,162
utf_8
945476c3cb8f0b60a4e8b09fa58c09c9
// { dg-do run { xfail rs6000-*-* powerpc-*-eabi m68k-*-coff mn10300-*-* v850-*-* sh-*-* sh64-*-* h8*-*-* xtensa*-*-* m32r*-*-* } } // Test that variadic function calls using thunks work right. // Note that this will break on any target that uses the generic thunk // support, because it doesn't support variadic functi...
google
chromium
opeq3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/opeq3.C
271
utf_8
09c3ec6b94aa200c1b5d465dddca959b
// { dg-do assemble } // Bug: g++ generates code for assignment in invalid situations. class X { // { dg-error "assignment" } int& a; public: X(int& i): a(i) { } }; void foo () { int one=1, two=2; X a(one), b(two); a = b; // { dg-message "synthesized" } }
google
chromium
cond
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/cond.C
1,360
utf_8
12cab1c7f36896b6b47255288d9c5e4d
// { dg-do assemble } // GROUPS passed rtti // Negative testcase for decls in conditions. int main() { float i; if (int i = 1) // { dg-error "" "" { xfail *-*-* } } , { char i; // { dg-error "" "" { xfail *-*-* } } , char j; } else { short i; // { dg-error "" "" { xfail *...
google
chromium
member
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/member.C
644
utf_8
c9185ef2db7e02de1682960f4077daaf
// { dg-do assemble } // GROUPS passed member-pointers error-reporting struct Y { struct X { int A; int Y::X::* foo () { undef1(1); return &Y::X::A; }// { dg-error "" } foo().* int bar () { return A; } }; }; int Y::X::* foo () { undef2(1);// { dg-error "" } foo().* return &Y::X::A; } ...
google
chromium
lineno4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/lineno4.C
373
utf_8
b21779b582953ad0e5d78c2b9d29b161
// { dg-do assemble } // { dg-options "" } // GROUPS passed error-reporting // Bug: # line directive in template definition interferes with growing obstack template <class T> class A { public: # 200 "lineno4.C" int foo () { undef1(); } // { dg-error "" "" { target *-*-* } 200 } // { dg-message "note" "not...
google
chromium
nested8
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/nested8.C
141
utf_8
a0fe56c8eaf78c345108e0aa50ba780a
// { dg-do assemble } struct A { }; struct B: public A { struct C { friend struct B; // { dg-bogus "" } base clause w/o members }; };
google
chromium
rfg21
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/rfg21.C
101
utf_8
13ebf23427fa18f4ee543a709e2a52be
// { dg-do assemble } char array0[4] = "abcde"; /* { dg-error "" } initializer too long */
google
chromium
cleanup
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/cleanup.C
360
utf_8
8609815143db722bd4431a37f59bb8dd
// { dg-do run } // Bug: continue over object decl calls destructor but not constructor. int c = 0; int d = 0; extern "C" int printf(const char *,...); class Foo { public: Foo(){ c++; } ~Foo(){ d++; } }; int main() { for(int i=0;i<2;i++){ continue; Foo bar; } printf ("%d %d\n", c, d); if (c == d...
google
chromium
overload12
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/overload12.C
239
utf_8
6641ce97a2ce97987c1ef099986f9747
// { dg-do run } // PRMS Id: 4066 // Bug: g++ doesn't notice the const on reference returns. struct B { int foo() { return 1; } int foo() const { return 0; } }; B b_; const B &b () { return b_; } int main() { return b().foo(); }
google
chromium
ctor1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/ctor1.C
211
utf_8
f758c99c01bf1e42fad8ce9ff974dad2
// { dg-do run } // PRMS Id: 5584 extern "C" { struct xx { void (*xx)(void); int x,y; }; } int r = 1; void f(void) { r = 0; } int main() { struct xx p; p.xx = f; p.xx(); return r; }
google
chromium
template3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/template3.C
248
utf_8
04bedf6df6ecdffcb63b9a43eb255c70
// { dg-do run } // PRMS Id: 4679 // Bug: g++ doesn't re-instantiate templates after definition is seen. template <class T> struct A; A<int> *a; template <class T> struct A { T t; }; int main() { if (a) a->t = 1; // { dg-bogus "" } }
google
chromium
offset4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/offset4.C
191
utf_8
cd67e3cc1defa75da9090ca742f2a1c4
// { dg-do assemble } // Bug: g++ complains about the use of A::p below. struct A { void *p; }; struct B: public A { int f () { if (A::p) return 1; return 0; } };
google
chromium
rfg12
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/rfg12.C
104
utf_8
b68e6789cb14c6dd5e693b769a6b3afb
// { dg-do assemble } int array[3] = { 1, 2, 3, 4 }; /* { dg-error "" } excess initializer elements */
google
chromium
overload29
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/overload29.C
243
utf_8
11a42fc661c310ee8e05bfb8f2769030
// { dg-do assemble } // Bug: we get an error trying to build up our ideal candidate. class C { public: C( const char * ); }; extern const char c1[]; void f2( const char * ); void f1() { C *fntp = new C(c1); // Line 10 f2( c1 ); }
google
chromium
delete1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/delete1.C
204
utf_8
770ac6962abed053d610c257880c8d9f
// { dg-do assemble } #include <stddef.h> struct A { virtual void operator delete (void *); // { dg-error "" } virtual delete virtual void * operator new (size_t); // { dg-error "" } virtual new };
google
chromium
offset1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/offset1.C
243
utf_8
0ad6e79ea07c5b8b452a371df31b9ce1
// { dg-do assemble } // PRMS Id: 5070 (testcase 1) struct foo { foo(int x = 0) {} int IsAlive(void) { return 1; } }; struct xx { int IsOk(int X); foo a; }; int xx::IsOk(int X) { return ((xx::a).IsAlive()); // { dg-bogus "" } }
google
chromium
pmem2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/pmem2.C
620
utf_8
c3c1e18d6e4fd9aea994df6ac4a17e8d
// { dg-do run } template <class Called> class aCallback { public: aCallback(Called& obj, int (Called::*met)()); int callback(); protected: private: Called& object; int (Called::*method)(); }; template <class Called> aCallback<Called>::aCallback(Called& obj, int (...
google
chromium
pmf9
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/pmf9.C
1,174
utf_8
8171159f376db7eadc528db5c33bbb00
// { dg-do assemble } // PRMS id: g++/13340 class rectangle { public: rectangle(); int overlaps() const; }; class region { friend class region_impl; public: region(); typedef int (region::* region_func)() const; }; class region_impl { friend class region; private: rectangle content, m...
google
chromium
scoping17
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/scoping17.C
127
utf_8
54afd2f673dc93e414b4cf73c33d2e03
// { dg-do run } // Test that the integer hides the struct in block scope. int main () { int A; struct A { }; A = 1; }
google
chromium
enum7
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/enum7.C
271
utf_8
81d5f64e78075ecaa09fbb1722bad849
// { dg-do assemble } // Yet Another testcase for signed/unsigned enums. enum A { AA = 0, AB = 1}; enum B { BA = -1, BB = 1}; void set(int a); void set(long a); void foo() { set(AA); // { dg-bogus "" } why is this ambiguous set(BA); // when this is not amibguous }
google
chromium
overload23
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/overload23.C
458
utf_8
a9d1014c3fd283f29e67f5958d0ddb77
// { dg-do assemble } // Date: Mon, 6 Jun 94 13:39:25 EDT // Subject: Problem with operator overloading class ostream { public: ostream& operator<<(double n); ostream& operator<<(float n); }; class X { public: operator long() const; operator double() const; }; ostream& operator<< (ostream& os, const X& x); int...
google
chromium
parse6
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/parse6.C
219
utf_8
431437488dcf70141c944af586f28f14
// { dg-do assemble } // PRMS id: 4653 // Bug: g++ tries to resolve declarator/expression ambiguities too soon. template<class T> struct A { }; void f () { void (A<int>::*pmf) (); // { dg-bogus "" } late binding }
google
chromium
parse12
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/parse12.C
223
utf_8
44598d99c92aed74b55f3f978bcc2506
// { dg-do run } // PRMS Id: 6821 struct A { int operator()(int i) { return i; } }; struct B { A* p; int f () { return (*p)(42); } // { dg-bogus "" } }; int main () { B b = { new A }; return b.f () != 42; }
google
chromium
template35
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/template35.C
216
utf_8
d0e4ae132818153928f40bc2612f14f8
// { dg-do assemble } // Bug: instantiation of D() corrupts declaration of basis[]. struct B { }; template <int t> struct D : public B { D() : B () { } }; B const * basis[] = { new D<0>, new D<1>, };
google
chromium
synth3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/synth3.C
170
utf_8
178748a5e7a2c50f62f87e26390a355e
// { dg-do assemble } // Testcase for wrongful generation of copy constructor. class A { }; class B: virtual private A { }; class D: public B { }; // { dg-bogus "" }
google
chromium
overload30
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/overload30.C
220
utf_8
17530076e02c91c8244aff7a2eaac36e
// { dg-do assemble } // PRMS Id: 6412 class Foo; template <class F> class Temp { F func_; public: Temp (F f) : func_(f) {} }; template <class T> T* func1 (T* t) { return t; } Temp<Foo*(*)(Foo*)> temp2(func1);
google
chromium
lvalue
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/lvalue.C
396
utf_8
0744b000765a926abafe72b512dad92f
// { dg-do assemble } // Bug: Scoped method calls don't propagate the constness of `this'. // PRMS Id: 4181 (second testcase) class D; class Bptr { public: Bptr& operator=(D*); const Bptr& operator=(const D*) const; }; class Dptr : public Bptr { public: const Dptr& operator=(...
google
chromium
ref9
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/ref9.C
377
utf_8
fb8ee4111550f7c7dd3d408557af7094
// { dg-do run } // Bug: g++ re-evaluates the initializer for r before calling f(); since i has // changed to an invalid index, this breaks. class C { public: void f () { } }; void foo (C * objs[]) { int i = 0; C & r = * objs[i]; /* make reference to element */ i = 666; r.f (); /* core dumps here */ } i...
google
chromium
scoping14
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/scoping14.C
209
utf_8
d49d9ed9b505bcd76004260d7a7ececa
// { dg-do assemble } // [class.scope0]: The scope of a name declared in a class consists // ... also of all ... default arguments ... in that class .... struct A { void f (int A::* = &A::i); int i; };
google
chromium
overload20
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/overload20.C
309
utf_8
ce7af250f7d97a916c309fcb7bdf5997
// { dg-do assemble } // Bug: this code causes an internal compiler error 4. void f (char *); void f (int); struct A { void f (); // { dg-error "" } candidate void f (int); // { dg-error "" } candidate void g () { void (*p)(char *) = f; // { dg-error "" } no matching function in scope } };
google
chromium
destruct3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/destruct3.C
704
utf_8
5e82655744d93ed8d108e0fdeb978c1a
// { dg-do assemble } // { dg-options "-w" } // PRMS Id: 4342 (second testcase) // Bug: g++ still can't deal with ambiguous inheritance in destructor calls. struct ccUnwind { ccUnwind (); virtual ~ccUnwind (); }; struct ccPersistent { virtual void bar(); }; struct ccImpExp : public ccPersistent, public...
google
chromium
crash3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/crash3.C
258
utf_8
94133fd75fcebe272d245020bbaacf2c
// { dg-do assemble } // Bug: g++ tries to generate initialization semantics for a Node from an int, // and fails. struct Node { // { dg-message "note" } Node* child[2]; }; void bug(int i) { Node* q = new Node(i); // { dg-error "no matching" } }
google
chromium
access21
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/access21.C
306
utf_8
025c267bbba39ff9c0d71eb929e2b0bf
// { dg-do assemble } // PRMS Id: 6877 typedef __SIZE_TYPE__ size_t; class aa { public: aa(); ~aa(); private: int iaa; void operator delete(void*, size_t); }; class bb { public: aa caa; }; // { dg-bogus "" } calling private delete void f(){ bb abb; }
google
chromium
new
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/new.C
485
utf_8
2f8cf707e649d01ed3a39588b1dadae9
// { dg-do assemble } // Bug: new doesn't make sure that the count is an integral value. #include <new> extern "C" int printf (const char *, ...); extern "C" void *malloc (size_t); size_t s; void * operator new (size_t siz) throw (std::bad_alloc) { if (s == 0) s = siz; else s = (s != siz); return mallo...
google
chromium
template36
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/template36.C
932
utf_8
e6113f8014999e52216f910eba291de1
// { dg-do run } // Testcase for implicit 'typename' and resolution of 'typename's in the // current scope. class base1 { public: int bar() const { return 1; } }; class base2 { public: int bar() const { return 0; } }; template<class X> struct base_trait { typedef base1 base; }; template<> str...
google
chromium
anon
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/anon.C
278
utf_8
8d11cb9a258c08aefb18a70b8e85fd27
// { dg-do run } typedef struct { int i; } foo; struct A : public foo { struct { int i; } x; }; int main () { A a; a.i = 5; a.x.i = 42; A b (a); a = b; if (a.i != 5 || a.x.i != 42) return 1; return 0; }
google
chromium
byval
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/byval.C
239
utf_8
36fc886b059d49d827435b551f7df603
// { dg-do run } // Bug: a is destroyed in both foo() and main() int count; struct A { double a,b; A(int) { count++; } A(const A&) { count++; } ~A() { count--; } }; void foo (A a) { } int main() { foo (1); return count; }
google
chromium
typeid1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/typeid1.C
286
utf_8
188c8510bf00a86d5eafaf2d0bc5eb8a
// { dg-do compile } #include <typeinfo> #include <iostream> struct foo { double f(int); }; int main() { double f (int); const std::type_info &r = typeid (f); std::cout << typeid(f).name() << std::endl; std::cout << typeid(foo::f).name() << std::endl; /* { dg-error "" } */ }
google
chromium
bool2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/bool2.C
199
utf_8
d2be927bf834ef05a3cf71bff558668e
// { dg-do run } // Make sure that bool bitfields promote to int properly. struct F { bool b1 : 1; bool b2 : 7; }; int main() { F f = { true, true }; if (int (f.b1) != 1) return 1; }
google
chromium
scoping4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/scoping4.C
455
utf_8
517cdd1880807390b89e0778aed186ad
// { dg-do assemble } // PRMS Id: 4375 // Bug: g++ fails to keep track of nested typedefs properly. class A { public: typedef const char * Ptr; Ptr s; Ptr get_string(); A(Ptr string); // { s = string; }; }; class B { public: typedef A * Ptr; Ptr a; Ptr get_A(); B(Ptr a_ptr); }; A::A(Ptr string) { /...
google
chromium
mutable1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/mutable1.C
101
utf_8
596ed7111f1a0227483c08bc6640b72a
// { dg-do run } struct X { X () { } mutable int x; }; int main () { const X x; x.x = 0; }
google
chromium
crash9
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/crash9.C
328
utf_8
475dd57d3a9da91920b33efd76753177
// { dg-do assemble } // PRMS Id: 5085 // Bug: TYPE_POINTER_TO wasn't set. class A { A(const A &); void operator=(const A &); public: inline A(); }; class B { A a; public: B(); virtual void f() const; }; class C : public B { }; class D : C { public: void f() const; }; void D::f() const { C:...
google
chromium
soverload
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/soverload.C
259
utf_8
8c4b6c23d8b38175065e5a17ddc5a1a5
// { dg-do assemble } // Bug: dfs_pushdecls doesn't create an overload list for member functions, // like it claims to. struct A { static int foo (int); static int foo (int, int); void bar () { foo (1, 2); } // { dg-bogus "" } broken overloading };
google
chromium
template6
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/template6.C
334
utf_8
fe7efb4be97a1c7553a5496a0ab7646a
// { dg-do run } // PRMS Id: 4656 // Testcase for use of member pointers in template resolution template <class T> class A { public: A() : a(1) {} T a; }; template <class T> int foo (T A<int>::*p) { return 0; } int main() { int A<int>::*pm = &A<int>::a; // { dg-bogus "" } failed temp resolution foo (pm); ...
google
chromium
lvalue3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/lvalue3.C
179
utf_8
0add9f87083749cc19c9e33240565f59
// { dg-do assemble } // Bug: C++ semantics for assignment don't match the backend semantics for // MODIFY_EXPR. void foo (int j) { (j = 1)++; // causes compiler segfault }
google
chromium
template5
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/template5.C
511
utf_8
1c153dc25602cb13a7bd443db69588bf
// { dg-do assemble } // Bug: g++ fails to compare integer constants properly. template <int X, int Y> struct Matrix { int base [X] [Y]; }; template <int M,int H,int N> Matrix<M,N>& Mul(Matrix<M,N>& Q,Matrix<M,H>& A,Matrix<H,N>& B) { for(int i=0;i<M;i++) { for(int j=0;j<N;j++) { Q.base[i][j]=0; ...
google
chromium
warning8
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/warning8.C
187
utf_8
a4a98da49e2e4b8c46f1e9653be42b53
// { dg-do assemble } struct A { A(); ~A(); }; struct B { B (const A&); ~B (); }; const B& f () { A a; return a; // { dg-warning "" } returning reference to temporary }
google
chromium
rfg20
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/rfg20.C
164
utf_8
1720f08ceaa708bf404f619250d37af0
// { dg-do assemble } typedef void func_type (); func_type *fp; void *vp; void example () { vp != fp; // { dg-error "" } no conversion from pfn to void* }
google
chromium
static1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/static1.C
586
utf_8
735379da08c8491416b9cab328b00c99
// { dg-do run } // PRMS id: 6863 extern "C" int printf(const char *, ...); extern "C" void abort(); enum ENUM {E1=0, E2 }; int d; class AAA{ public: AAA() {a = new char[10];printf("constructor AAA() called\n");} AAA(int) {printf("constructor AAA(int) called\n");} ~AAA(){ printf("destructor ~AAA() called\n"); d ...
google
chromium
lineno5
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/lineno5.C
196
utf_8
a11de2fe636242e28276ae01dfbca8c7
// { dg-do assemble } // GROUPS passed error-reporting // Bug: incomplete instantiation messes with lineno template <class T> class A; int main() { A<int> *p; undef1();// { dg-error "" } }
google
chromium
expr1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/expr1.C
173
utf_8
f64a776322f2d9ddc6a3bf1f0c01381b
// { dg-do assemble } // Bug: g++ doesn't figure out what to do. struct A { operator char *(); }; char foo(A a) { char c = a[0]; // { dg-bogus "" } return c; }
google
chromium
conversion11
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/conversion11.C
506
utf_8
88f108735b24db38195b7b99d09505e9
// { dg-do assemble } // PRMS Id: 8805 // Bug: The two-level conversion is not found when calling a global fn. class Int { public: Int(int A); }; class Ding { public: Ding(Int A); }; class Something { public: void DoSomething(Ding A); // { dg-message "candidates" } referred to }; void DoSomething(Ding A); v...
google
chromium
access24
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/access24.C
199
utf_8
993df71817c988157c121508d94e2381
// { dg-do assemble } // Bug: forward reference to friend doesn't work in template. template <class T> class A { static int i; friend struct B; }; struct B { void f () { A<int>::i = 0; } };
google
chromium
rfg4
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/rfg4.C
253
utf_8
85af30973ecd2ec16aeb9f8987fab9b4
// { dg-do assemble } // { dg-options "-ansi -pedantic-errors -w" } // Bug: f1 and f2 are treated as overloaded when they aren't. int i; void f1(double) { } void f2(double) { } void test () { i ? f1 : f2; // { dg-bogus "" } improper overloading }
google
chromium
template27
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/template27.C
616
utf_8
6e91adcf7521dd4621b538d210111b67
// { dg-do run } // PRMS Id: 6826 // Check that unnecessary templates are not instantiated. template <class T> class Test { public: void doThiss(); void doThat(); }; template <class T> void Test<T>::doThiss() { T x; x.thiss(); } template <class T> void Test<T>::doThat() { T x; x.that(...
google
chromium
mangle3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/mangle3.C
313
utf_8
8cc2e4106b3ea2061f36bc9b05cfb8de
// { dg-do run } // PRMS Id: 7563 // Bug: declaration at function scope causes mismangling. int main() { char ArrA[1][1][2][3], ArrB[1][1][2][3]; void HitMe(char [1][1][2][3], char [1][1][2][3]); HitMe(ArrA, ArrB); return 0; } void HitMe(char A[1][1][2][3], char B[1][1][2][3]) { return; }
google
chromium
template12
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/template12.C
191
utf_8
931735532f8fbdf340eb9d9ee7eac790
// { dg-do assemble } // Testcase for 'this is a type' syntax. struct B { typedef int A; }; template <class T> struct Y { void f() { typename T::A *d; } }; template class Y<B>;
google
chromium
pmf3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/pmf3.C
306
utf_8
23ab62e751a6cfb25832de68d75ddcde
// { dg-do assemble } // Subject: g++ 2.5.8: cannot cast member function pointers // Date: 27 Jan 1994 01:22:56 -0500 struct A { void f(char); void g(int); }; typedef void (A::*Ptr)(char); void q() { Ptr p; p = (Ptr) &A::f; p = (Ptr) &A::g; p = &A::f; }
google
chromium
const2
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/const2.C
328
utf_8
91182227b7766e96a08954312e68a85b
// { dg-do run } // Example of static member constants extern "C" int printf (const char *, ...); struct T { static const char letter = 'a'; // this is the new stuff! char x[letter]; void f(); }; void T::f() { printf ("%p", &letter); } const char T::letter; // still need def after class int mai...
google
chromium
template24
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/template24.C
331
utf_8
0095813e8809c346cf2bf57814a3b7e8
// { dg-do run } // Bug: g++ doesn't find the conversion from ostream_withassign to ostream. #include <iostream> template <class T> struct A { T t; }; template <class T> std::ostream & operator<< (std::ostream & os, A<T> & a) { os << a.t; return os; } int main () { A<int> a = { 1 }; std::cout << a << std...
google
chromium
crash7
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/crash7.C
229
utf_8
4a4d87f783c83344aedc703f45458a29
// { dg-do assemble } // Bug: g++ can't deal. typedef unsigned size_t; // { dg-error "" } previous declaration typedef unsigned long size_t; // { dg-error "" } redefining size_t void f (size_t); // causes compiler segfault -
google
chromium
warning1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/warning1.C
180
utf_8
63811b96a427481ed3e05bb30f3baefd
// { dg-do assemble } // Bug: g++ protests that foo was never defined. static void foo (); static void foo (); static void foo () { } void bar () { foo(); } // { dg-bogus "" }
google
chromium
enum6
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/enum6.C
1,041
utf_8
b17732cb073ab9e4d216d766a87a8c56
// { dg-do run } // { dg-options "-fshort-enums" } // On ARM EABI targets this testcase will cause a warning to be emitted // whilst EABI attributes are being merged at link time unless // the --no-enum-size-warning option is passed to the linker. Whilst the // enum-size attributes should only be emitted if there are...
google
chromium
access7
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/access7.C
267
utf_8
b7def766ff417373e755c602745a7f45
// { dg-do assemble } // Simple testcase for access control. class A { protected: static void f (); }; class B: public A {}; class C: public A {}; class D: public C, public B { void g () { A::f(); } // { dg-bogus "" } wrongly ambiguous static member call };
google
chromium
return3
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/return3.C
179
utf_8
81a3d447b3f7290c557ca0078ef4bfb4
// { dg-do run } // PRMS id: 10912 struct A { A() { i=10; } int i; }; struct B : public A {}; B b; A f() { return b; } int main () { A a = f (); return a.i != 10; }
google
chromium
complete1
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/complete1.C
156
utf_8
a2ab5a0a642d863a09e42f9a8e848ae2
// { dg-do assemble } // PRMS Id: 4695 // Bug: g++ wrongly requires A to be complete here. struct A; void foo(const A &); void bar(A *p) { foo(*p); }
google
chromium
overload
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/overload.C
359
utf_8
fd557f934b680b4c2089ad1660e60b12
// { dg-do assemble } // GROUPS passed overloading enum bar {}; void operator+ (int, int);// { dg-error "" } .* void operator+ (bar&, int); template <class T> void operator+ (int b, T& t) { return b; } void operator+ (int, bar&); template <class T> class foo { public: friend void operator+ <> (int, T&); }; class...
google
chromium
overload11
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/overload11.C
261
utf_8
ae5a0dfe48e368790442e81a8b9d8426
// { dg-do run } // PRMS Id: 4697 // Bug: g++ calls the non-const method for a const object. class A { public: void foo(int &i) const { i = 0; } void foo(int &i) { i = 1; } }; int main() { A a; const A& b = a; int i = 2; b.foo (i); return i; }
google
chromium
tempdest
.C
native_client/nacl-gcc/gcc/testsuite/g++.old-deja/g++.jason/tempdest.C
250
utf_8
7507cf741facabf703adfff61cf35788
// { dg-do assemble } // GROUPS passed templates destructors // Example of PR 3308 workaround template <class T> class A { T q; public: ~A() { (&q)->T::~T(); } }; typedef unsigned int ui; int main() { A<ui> *ap = new A<ui>; delete ap; }