OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /openrisc/trunk/gnu-old/gcc-4.2.2/gcc/testsuite/g++.old-deja/g++.robertl
    from Rev 154 to Rev 816
    Reverse comparison

Rev 154 → Rev 816

/eb44.C
0,0 → 1,38
// { dg-do assemble }
// spurious 'const' in error.
// For egcs-2.91.34, the warning message refers to
// class ostream & operator <<(class ostream &, const class Vector<T> &)
// Also, the template instantiation does not provide the missing
// friend function, the non-template function does
 
#include <cstdio>
#include <cstdlib>
#include <iostream>
 
using namespace std;
 
template <class T>
class Vector
{
friend ostream& operator<< (ostream& out, const Vector<T> & vec); // { dg-warning "" }
};
 
template <class T>
ostream& operator<< (ostream& out, const Vector<T> & vec)
{
abort(); // this should not be called
}
 
template class Vector<char>;
template ostream& operator<< (ostream& out, const Vector<char> &);
 
ostream& operator<< (ostream& out, const Vector<char>&)
{
return out;
}
 
int main()
{
Vector<char> vc;
cout << vc;
}
eb44.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb27.C =================================================================== --- eb27.C (nonexistent) +++ eb27.C (revision 816) @@ -0,0 +1,42 @@ +// { dg-do assemble } +// { dg-options "-Wno-deprecated" } +/* bug.cc */ +/* simple program to demonstrate the bug with named return values in gcc +*/ +/* (w) 4.9.97 by Kurt Garloff */ +// 8/28/1998 - This dies in add_conversions from dfs_walk, null CLASSTYPE_METHOD_VEC +// for the test record_type. This is marked as an expected failure for now, +// until we actually fix it. + +#include + +template class test; +template test operator + (const test& a, const test& b); + +// A simple numerical class +template +class test +{ + T elem; + public: + test () { elem = 0; }; + test (const T& a) { elem = a; }; + test& operator += (const test& a) { elem += a.elem; return *this; }; + friend test operator + <> (const test&, const test&); + friend std::ostream& operator << (std::ostream& os, const test& a) + { return os << a.elem; }; +}; + +// named return value version +template +test operator + (const test& a, const test& b) return c(a);// { dg-error "" } named return value +{ c += b; } // { dg-error "" } c undeclared + +int main() +{ + test x, y; + x += 5; + std::cout << x << std::endl; + y = x + test(2); + std::cout << y << std::endl; +}
eb27.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb82.C =================================================================== --- eb82.C (nonexistent) +++ eb82.C (revision 816) @@ -0,0 +1,13 @@ +// { dg-do assemble } +#include + +template +double val () // { dg-error "" } bogus code +{ + return (double) n1; +} + +int main () +{ + printf ("%d\n", val<(int)3> ()); // { dg-error "" } val undeclared +}
eb82.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb65.C =================================================================== --- eb65.C (nonexistent) +++ eb65.C (revision 816) @@ -0,0 +1,25 @@ +// { dg-do run } +#include + +using namespace std; + +template struct PartialDotProduct { + template + static T Expand(T* a, T* b) { return T(); } +}; + +const int N = 10; + +template +typename iterator_traits::value_type +dot(In1 f1, In2 f2) +{ + return PartialDotProduct::Expand(f1, f2); // line 14 +} + +int main() +{ + double a[N], b[N]; + + double s = dot(&a[0], &b[0]); +}
eb65.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb48.C =================================================================== --- eb48.C (nonexistent) +++ eb48.C (revision 816) @@ -0,0 +1,10 @@ +// { dg-do assemble } +char *t1 (const char *s) +{ + return const_cast(s); +} + +char *&t1 (const char *&s) +{ + return const_cast(s); +}
eb48.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb86.C =================================================================== --- eb86.C (nonexistent) +++ eb86.C (revision 816) @@ -0,0 +1,7 @@ +// { dg-do assemble } +template void foo (); + +template +class Q { + friend void foo (); +};
eb86.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb69.C =================================================================== --- eb69.C (nonexistent) +++ eb69.C (revision 816) @@ -0,0 +1,21 @@ +// { dg-do assemble } +// Test that g++ complains about referring to a builtin type in a +// mem-initializer. +// Contributed by Kevin Buhr + +int r = 0; + +struct foo { // { dg-error "" } candidate + foo(int x) { r = 1; } // { dg-error "" } candidate +}; + +struct bar : foo { + typedef int an_int; + bar() : bar::an_int(3) {} // { dg-error "" } not a base +}; + +int +main() { + bar b; + return r; +}
eb69.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: ebnull-oldcast.C =================================================================== --- ebnull-oldcast.C (nonexistent) +++ ebnull-oldcast.C (revision 816) @@ -0,0 +1,18 @@ +// { dg-do run } +class null { + null (null const&); + void operator& (); + + public: + null () {} + + template + operator T* () const { return 0; } +} const null; + +int main () +{ + int *p = (int*) null; + + return 0; +}
ebnull-oldcast.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb121.C =================================================================== --- eb121.C (nonexistent) +++ eb121.C (revision 816) @@ -0,0 +1,21 @@ +// { dg-do assemble } +class A { +private: + int i1_; +public: + void f(int const i1 = 1); // { dg-error "previous specification" } +}; + +void +A::f(int const i1 = 1) // { dg-error "default argument given" } +{ + i1_ = i1; +} + +int +main() +{ + A a; + a.f(); + return 0; +}
eb121.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb104.C =================================================================== --- eb104.C (nonexistent) +++ eb104.C (revision 816) @@ -0,0 +1,30 @@ +// { dg-do run } +#include + +class SomeClass_t { +public: + SomeClass_t () : x (11) {} +protected: + float x; +}; + +class DynamicOnly_t { +public: + static DynamicOnly_t* create (const char* name = "UNDEF", + const SomeClass_t& somec = *(new SomeClass_t +())) { + return new DynamicOnly_t (name, somec); + } + DynamicOnly_t (const char* name, const SomeClass_t& somec) : + m_somec (somec) { + strncpy (m_Name, name, sizeof (m_Name)); + } +private: + SomeClass_t m_somec; + char m_Name[255]; +}; + +int main (int argc, char* argv[]) { + DynamicOnly_t* ptr = DynamicOnly_t::create (); + return 0; +}
eb104.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb125.C =================================================================== --- eb125.C (nonexistent) +++ eb125.C (revision 816) @@ -0,0 +1,22 @@ +// { dg-do assemble } + +struct test_box + { + void print(void); + }; + +void test (test_box *); // { dg-error "" } illegal code + +class test_square + { + friend void test (test_box *); // { dg-error "" } does not match + } + + + +template void test(BOX *the_box) // { dg-error "" } semicolon missing + {x + the_box->print(); + }; + +template void test<> (test_box *); // { dg-error "" }
eb125.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb108.C =================================================================== --- eb108.C (nonexistent) +++ eb108.C (revision 816) @@ -0,0 +1,21 @@ +// { dg-do assemble } +class X +{ + public: + virtual void f() const = 0; +}; + +template +class Y: public X +{ + public: + virtual void f() const; +}; + +template +void Y::f() const +{ +} + +template <> +void Y::f() const;
eb108.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb129.C =================================================================== --- eb129.C (nonexistent) +++ eb129.C (revision 816) @@ -0,0 +1,23 @@ +// { dg-do assemble } +// Gives ICE on EGCS release branch as of 98/06/08 on i686-pc-linux-gnulibc1) +// From: Klaus-Georg Adams +// Message-Id: <199806081358.PAA02505@achibm5.chemie.uni-karlsruhe.de> +#include +#include +#include +#include +using namespace std; +int main() +{ + list l; + l.push_back(1); + l.push_back(2); + + list::iterator it = + find_if( l.begin(), l.end(), + // This is a typo, it should be bind2nd, but an + // ICE is not a very helpful diagnostic! + binder2nd( equal_to(), 2 ) ); // { dg-error "" } + assert( *(it) == 2 ); +} +
eb129.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb129a.C =================================================================== --- eb129a.C (nonexistent) +++ eb129a.C (revision 816) @@ -0,0 +1,22 @@ +// { dg-do assemble } +// Gives ICE on EGCS release branch as of 98/06/08 on i686-pc-linux-gnulibc1) +// From: Klaus-Georg Adams +// Message-Id: <199806081358.PAA02505@achibm5.chemie.uni-karlsruhe.de> +#include +#include +#include +#include +int main() +{ + std::list l; + l.push_back(1); + l.push_back(2); + + std::list::iterator it = + std::find_if( l.begin(), l.end(), + // This is a typo, it should be bind2nd, but an + // ICE is not a very helpful diagnostic! + std::binder2nd( std::equal_to(), 2 ) ); // { dg-error "" } + assert( *(it) == 2 ); +} +
eb129a.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb11.C =================================================================== --- eb11.C (nonexistent) +++ eb11.C (revision 816) @@ -0,0 +1,29 @@ +// { dg-do assemble } + +template +struct meta_max { + enum { max = (N1 > N2) ? N1 : N2 }; +}; + +struct X { + enum { + a = 0, + n = 0 + }; +}; + +template +struct Y { + + enum { + a = T1::a + T2::a, + + // NB: if the next line is changed to + // n = (T1::n > T2::n) ? T1::n : T2::n + // the problem goes away. + + n = meta_max::max + }; +}; + +int z = Y::a;
eb11.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: ice990323-1.C =================================================================== --- ice990323-1.C (nonexistent) +++ ice990323-1.C (revision 816) @@ -0,0 +1,9 @@ +// { dg-do assemble } + +//test 2 +struct A {}; +void f() +{ + struct A; // { dg-error "" } forward ref + throw *(new A); // { dg-error "" } invalid use of undefined type +}
ice990323-1.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb32.C =================================================================== --- eb32.C (nonexistent) +++ eb32.C (revision 816) @@ -0,0 +1,12 @@ +// { dg-do assemble } +class A { +public: + void malloc(unsigned int); +}; + +void A::malloc(unsigned int) {} + +void foo() { + A a; + a.malloc(3); // <-- line 10 +}
eb32.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: ice990323-5.C =================================================================== --- ice990323-5.C (nonexistent) +++ ice990323-5.C (revision 816) @@ -0,0 +1,12 @@ +// { dg-do assemble } +// check attempting to throw an overloaded function + +struct A { + void f(int); + void f(long); +}; + +void g() +{ + throw &A::f; // { dg-error "" } insufficient context +}
ice990323-5.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb15.C =================================================================== --- eb15.C (nonexistent) +++ eb15.C (revision 816) @@ -0,0 +1,28 @@ +// { dg-do assemble } +#include +#include + +struct A { + A() { + std::cerr<<"A constructing\n"; + throw 1; + } + void *operator new(size_t sz) { + std::cerr<<"A allocated\n"; + return ::operator new(sz); + } + void operator delete (void *p) { + std::cerr<<"A deleted\n"; + ::operator delete (p); + } +}; + +int main() { + try { + new A(); + } catch (...) { + } +} + + +
eb15.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb70.C =================================================================== --- eb70.C (nonexistent) +++ eb70.C (revision 816) @@ -0,0 +1,17 @@ +// { dg-do assemble } +// conversion ops should be treated as coming from the most derived class +// for overload resolution. See [over.match.funcs]. + +class X { +public: + operator bool() const; +}; + +class Y : public X { +private: + operator void*() const; +}; + +int f(Y const& y) { + return bool(y); +}
eb70.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb36.C =================================================================== --- eb36.C (nonexistent) +++ eb36.C (revision 816) @@ -0,0 +1,19 @@ +// { dg-do assemble } +#include +using namespace std; + +template class foo { +public: + foo(); + foo(vector v); +private: + vector v; + T t; +}; + +template +foo::foo() :v(), t() {} +template +foo::foo(vector v_) :v(v_), t() {} // { dg-error "" } default arg for member template + +foo a;
eb36.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb19.C =================================================================== --- eb19.C (nonexistent) +++ eb19.C (revision 816) @@ -0,0 +1,16 @@ +// { dg-do assemble } + +#define CRASH 1 +#ifdef CRASH +#define VIRTUAL virtual +#else +#define VIRTUAL +#endif + +class A {}; +class B : public VIRTUAL A {}; +template class C : public /*virtual*/ Imp {}; +// define CRASH and uncomment here ^^^^^^^^^^^ +// and the crash goes away!!!! + +template class C;
eb19.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb91.C =================================================================== --- eb91.C (nonexistent) +++ eb91.C (revision 816) @@ -0,0 +1,86 @@ +// { dg-do run } +#include +#include +typedef short _eb91_int16_t; +typedef char _eb91_int8_t; +typedef unsigned char _eb91_u_int8_t; +typedef unsigned short _eb91_u_int16_t; + +template +class other_endian +{ +private: + + INT value; + + + _eb91_u_int16_t change_endian(_eb91_u_int16_t x) + { + union { + _eb91_u_int16_t i; + _eb91_u_int8_t c[2]; + } val; + val.i = x; + std::swap(val.c[0], val.c[1]); + return val.i; + }; + + _eb91_int16_t change_endian(_eb91_int16_t x) + { + union { + _eb91_int16_t i; + _eb91_int8_t c[2]; + } val; + val.i = x; + std::swap(val.c[0], val.c[1]); + return val.i; + }; +public: + other_endian(const INT i = 0) + { + value = change_endian(i); + } + + operator INT() + { + return change_endian(value); + } +}; + +template +class same_endian +{ + INT value; + +public: + same_endian(const INT i = 0) + { + value = i; + } + + operator INT() + { + return value; + } +}; + + + + + + + + + + + + + + + + + +int main() { + other_endian <_eb91_u_int16_t> little_endian_16_bit_int; + return 0; +}
eb91.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb74.C =================================================================== --- eb74.C (nonexistent) +++ eb74.C (revision 816) @@ -0,0 +1,33 @@ +// { dg-do assemble } +class base { +public: + virtual ~base(); +}; + + +class foo : public base { + +public : + + foo (char *cs); + + virtual void op (unsigned char dummy = false); + unsigned char m_dummy; +}; + + +void foo :: op ( unsigned char dummy) + +{ + bool bar; + + if (dummy) { + foo IT_tempPhase( 0 ); + return; + } + + if ((m_dummy || bar)) { + + } + +}
eb74.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb57.C =================================================================== --- eb57.C (nonexistent) +++ eb57.C (revision 816) @@ -0,0 +1,7 @@ +// { dg-do assemble } +#include +//using namespace std; +class A { + class B : public std::exception {} + ; +};
eb57.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb95.C =================================================================== --- eb95.C (nonexistent) +++ eb95.C (revision 816) @@ -0,0 +1,18 @@ +// { dg-do run } +struct A {}; + +template +void operator+ (A &i, T &b) {} + +template +void func (A &a, T &b) {} + +int main() +{ + A a; + +#if STRANGE + func(a, "egcs"); +#endif + a+"egcs"; +}
eb95.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb99.C =================================================================== --- eb99.C (nonexistent) +++ eb99.C (revision 816) @@ -0,0 +1,135 @@ +// { dg-do assemble } + + + + + + + + + + + + + + + + + +class ref_counted +{ + +protected: + ref_counted( void ) : _count( 0 ) {} + +public: + + unsigned int add_ref( void ) { return ++_count; } + unsigned int release( void ) { return --_count; } + unsigned int count( void ) const { return _count; } + + +protected: + unsigned int _count; +}; + + + + + +template < class T > +class ref_ptr +{ + +public: + ref_ptr( T* ptr = 0 ) : _ptr( ptr ) + { + add_ref(); + } + + ref_ptr( const ref_ptr & rptr ) : _ptr( rptr.get() ) + { + add_ref(); + } + + ~ref_ptr( void ) { release(); } + + + T* get( void ) const { return _ptr; } + T* operator->( void ) const { return get(); } + T& operator*( void ) const { return *get(); } + + bool operator!( void ) const { return get() == 0; } + bool operator==( const ref_ptr & rptr ) const { return *get() == *rptr; +} + bool operator<( const ref_ptr & rptr ) const { return *get() < *rptr; } + + + bool operator==( T* ptr ) const { return *get() == *ptr; } + bool operator<( T* ptr ) const { return *get() < *ptr; } + + const ref_ptr & operator=( const ref_ptr & rptr ) + { + release(); + _ptr = rptr.get(); + add_ref(); + + return *this; + } + + T* operator=( T* ptr ) + { + release(); + _ptr = ptr; + add_ref(); + + return _ptr; + } + +protected: + void add_ref( void ) + { + if( _ptr ) + _ptr->add_ref(); + } + + void release( void ) + { + if( _ptr && 0 == _ptr->release() ) + { + delete _ptr; + _ptr = 0; + } + } + + +protected: + T * _ptr; +}; + + +template< class T > +bool operator==( T* ptr, const ref_ptr< T > & rptr ) +{ + return *ptr == *rptr; +} + +template< class T > +bool operator<( T* ptr, const ref_ptr< T > & rptr ) +{ + return *ptr < *rptr; +} + + + +class Baz : public ref_counted { + int dummy; +}; + + +class Bar; + +int main() { + ref_ptr foo; + static_cast (foo)->DoSomething; //{ dg-error "" } invalid cast +}
eb99.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb3.C =================================================================== --- eb3.C (nonexistent) +++ eb3.C (revision 816) @@ -0,0 +1,11 @@ +// { dg-do assemble } +#include +template +class Vec { +public: + Vec() { data = new T; } + Vec split() { Vec tmp; operator=(tmp); return tmp; } + void operator=(const Vec &v) { data = new T; } + T *data; +}; +template class Vec >;
eb3.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb130.C =================================================================== --- eb130.C (nonexistent) +++ eb130.C (revision 816) @@ -0,0 +1,11 @@ +// { dg-do assemble } +// { dg-options "-Wall" } +// Gives spurious warnings when compiled with -Wall +// EGCS 06/08/98 i686-pc-linux-gnulibc1 +// Message-Id: <199806081358.PAA02505@achibm5.chemie.uni-karlsruhe.de> +// From: Klaus-Georg Adams + + +#include +__gnu_cxx::hash_set foo; +
eb130.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb113.C =================================================================== --- eb113.C (nonexistent) +++ eb113.C (revision 816) @@ -0,0 +1,6 @@ +// { dg-do assemble } +#include + +class X : public std::streambuf +{ +} ;
eb113.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb7.C =================================================================== --- eb7.C (nonexistent) +++ eb7.C (revision 816) @@ -0,0 +1,16 @@ +// { dg-do assemble } +#include + +class T +{ + public: + T(); + +}; + +std::vector tp; + +void f() +{ + tp.insert(tp.begin(), 10 , T()); +}
eb7.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eh990323-3.C =================================================================== --- eh990323-3.C (nonexistent) +++ eh990323-3.C (revision 816) @@ -0,0 +1,30 @@ +// { dg-do run } +// try throwing 0 cast to a class object +extern "C" void abort (); +extern "C" void exit (int); + +struct A {}; + +void f() +{ + throw (A*)0; +} + +int +main() +{ + int flag; + + flag = 0; + try { + f(); + } + catch (A*) { + flag = 1; + } + + if (!flag) + abort(); + + exit (0); +}
eh990323-3.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb20.C =================================================================== --- eb20.C (nonexistent) +++ eb20.C (revision 816) @@ -0,0 +1,33 @@ +// { dg-do assemble } +// Error: ICE on 2.7.2.3 and EGCS 1.0.0. + +template +struct meta_max { + enum { max = (N1 > N2) ? N1 : N2 }; +}; + +struct X { + enum { + a = 0, + n = 0 + }; +}; + +template +struct Y { + + enum { + a = T1::a + T2::a + T3::a, + n = meta_max::max, T3::n>::max + }; +}; + +template +struct Z { + enum { + a = T::a, + n = T::n + }; +}; + +Z > z;
eb20.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb41.C =================================================================== --- eb41.C (nonexistent) +++ eb41.C (revision 816) @@ -0,0 +1,14 @@ +// { dg-do run } +#include +#include +#include + +std::ostream_iterator oo(std::cout); + +int main() +{ + *oo = "Hello, "; + ++oo; + *oo = "world!\n"; +} +
eb41.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb24.C =================================================================== --- eb24.C (nonexistent) +++ eb24.C (revision 816) @@ -0,0 +1,23 @@ +// { dg-do assemble } +#include + +template < class T > +class X +{ + protected: + + union { + int x; + double y; + }; +}; + +template < class T > +class Y : public X +{ + public: + + using X::x; + + void f () { std::cout << this->x << std::endl; } +};
eb24.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb62.C =================================================================== --- eb62.C (nonexistent) +++ eb62.C (revision 816) @@ -0,0 +1,7 @@ +// { dg-do assemble } +#include + +void f(void) +{ + std::vector l(5, 0); +}
eb62.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb45.C =================================================================== --- eb45.C (nonexistent) +++ eb45.C (revision 816) @@ -0,0 +1,6 @@ +// { dg-do assemble } +class A {}; +class B : public virtual A {}; +template class C : public Imp {}; + +template class C;
eb45.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb28.C =================================================================== --- eb28.C (nonexistent) +++ eb28.C (revision 816) @@ -0,0 +1,20 @@ +// { dg-do assemble } +#include + +using namespace std; + +enum s { S }; +class a +{ + vector vs; + friend class b; +}; +struct b +{ + vector va; + operator vector< vector >() + { + vector< vector > vvs(va.size()); + return vvs; + } +};
eb28.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb83.C =================================================================== --- eb83.C (nonexistent) +++ eb83.C (revision 816) @@ -0,0 +1,18 @@ +// { dg-do run { target native } } +// { dg-options "-fprofile-arcs -ftest-coverage" } +void +test_swap(int& x, int& y) throw() +{ + int tmp = x; + x = y; + y = tmp; +} + +main() +{ + int i = 5; + int j = 7; + test_swap(i, j); +} + +/* { dg-final { cleanup-coverage-files } } */
eb83.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb66.C =================================================================== --- eb66.C (nonexistent) +++ eb66.C (revision 816) @@ -0,0 +1,27 @@ +// { dg-do run } +#include +#include + +int bar () +{ + throw 100; +} + +int main () +{ + int i = 0; + try + { + i = bar (); + } + catch (...) + { + } + +// std::cout << "i = " << i << std::endl; + assert (i == 0) ; +} + + + +
eb66.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb49.C =================================================================== --- eb49.C (nonexistent) +++ eb49.C (revision 816) @@ -0,0 +1,48 @@ +// { dg-do assemble } + +// Here we declare ::S +typedef struct s1 *S; + +struct s1 +{ + int s; +}; + +struct A +{ + // Here we declare A::S + typedef struct s1 *S; +}; + +template class XX; + +template +class X +{ +public: + static T *do_something (); + friend class T; // { dg-error "" } `T' is a template parameter + friend class XX; +}; + +struct N +{ + // Here we declare N::S + class S + { + }; + + // Should use N::S and A::S. + typedef X X_S; + + void bug (); +}; + +void +N::bug () +{ + // X_S is template class X + // `s' is N::S. + S *s = X_S::do_something (); +} +
eb49.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb87.C =================================================================== --- eb87.C (nonexistent) +++ eb87.C (revision 816) @@ -0,0 +1,7 @@ +// { dg-do assemble } +template struct Foo { + friend void operator<<(int, Foo const &) {} +}; +template class Bar : public Foo {}; +inline Bar<0> bar(int,int,int) { return Bar<3>(); } // { dg-error "" } no conversion +
eb87.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb122.C =================================================================== --- eb122.C (nonexistent) +++ eb122.C (revision 816) @@ -0,0 +1,10 @@ +// { dg-do assemble } +// { dg-options "" } +// Disable -ansi -pedantic-errors because of GNU extension +template +class bar { +public: + void baz() { (({ while( foo::baz() );})); } +}; +template +void baz() { (({ while( foo::baz() );})); }
eb122.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb105.C =================================================================== --- eb105.C (nonexistent) +++ eb105.C (revision 816) @@ -0,0 +1,13 @@ +// { dg-do assemble } +template< class T > +void sort( T* t, int n ) + { + struct +/*line5*/ { + int operator()(T i, T j) + { + return (i < j) ? -1 : ((j < i) ? 1 : 0) ; + } + } c ; + sort(t, n, c, 0) ; + }
eb105.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb133a.C =================================================================== --- eb133a.C (nonexistent) +++ eb133a.C (revision 816) @@ -0,0 +1,16 @@ +// { dg-do assemble } +// Gives ICE 109 +// From: Klaus-Georg Adams +// Reported against EGCS snaps 98/06/28. + +int main() +{ + try { + } + catch (std::bad_alloc) { // { dg-error "" } parse error + return 1; + } + return 0; +} + +
eb133a.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb126.C =================================================================== --- eb126.C (nonexistent) +++ eb126.C (revision 816) @@ -0,0 +1,30 @@ +// { dg-do run } +#include + +class SomeClass_t { +public: + SomeClass_t () : x (11) {} +protected: + float x; +}; + +class DynamicOnly_t { +public: + static DynamicOnly_t* create (const char* name = "UNDEF", + const SomeClass_t& somec = *(new SomeClass_t +())) { + return new DynamicOnly_t (name, somec); + } + DynamicOnly_t (const char* name, const SomeClass_t& somec) : + m_somec (somec) { + strncpy (m_Name, name, sizeof (m_Name)); + } +private: + SomeClass_t m_somec; + char m_Name[255]; +}; + +int main (int argc, char* argv[]) { + DynamicOnly_t* ptr = DynamicOnly_t::create (); + return 0; +}
eb126.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb109.C =================================================================== --- eb109.C (nonexistent) +++ eb109.C (revision 816) @@ -0,0 +1,74 @@ +// { dg-do assemble } +#include +#include +#include +#include + +using namespace std; + +// empty parameter class with a minimal set of operations +// if there are no weights for edges necessary +struct Empty +{ + public: + Empty(int=0) {} + bool operator<(const Empty&) const { return true;} +}; +inline ostream& operator<<(ostream& os, const Empty&) { return os;} +inline istream& operator>>(istream& is, Empty& ) { return is;} + + +template +class Graph +{ // { dg-error "" } candidates + public: + // public type interface + typedef std::map Successor; + typedef std::pair vertex; + typedef std::vector GraphType; + typedef typename GraphType::iterator iterator; + typedef typename GraphType::const_iterator const_iterator; + + // a lot of stuff deleted .... + + private: + bool directed; + GraphType C; // container + ostream* pOut; +}; + +// all graph-methods delet +template +ostream& operator<<(ostream& os, Graph& G) +{ + // display of vertices with successors + for(int i = 0; i < G.size(); ++i) // { dg-error "" } no size function + { + os << G[i].first << " <"; // { dg-error "" } no index operator + + // The compiler does not like this line!!!!!! + typename Graph::Successor::iterator + startN = G[i].second.begin(), // { dg-error "" } no index operator + endN = G[i].second.end(); // { dg-error "" } no index operator + + while(startN != endN) + { + os << G[(*startN).first].first << ' ' // { dg-error "" } no index operator + << (*startN).second << ' '; + ++startN; + } + os << ">\n"; + } + return os; +} + +int main() +{ + // no edge weighting, therefore type Empty: + Graph V(true); // { dg-error "" } no bool constructor + // ReadGraph(V, "gra1.dat"); + + // display of vertices with successors + cout << V; + +}
eb109.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: ebnull.C =================================================================== --- ebnull.C (nonexistent) +++ ebnull.C (revision 816) @@ -0,0 +1,18 @@ +// { dg-do run } +class null { + null (null const&); + void operator& (); + + public: + null () {} + + template + operator T* () const { return 0; } +} const null; + +int main () +{ + int *p = null; + + return 0; +}
ebnull.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb12.C =================================================================== --- eb12.C (nonexistent) +++ eb12.C (revision 816) @@ -0,0 +1,32 @@ +// { dg-do assemble } +// Error: Internal Compiler Error in 2.7.2. & egcs 1.0.0 + +#ifndef NO_META_MAX +template +struct meta_max { + enum { max = (N1 > N2) ? N1 : N2 }; +}; +#endif + +struct X { + enum { + a = 0, + n = 0 + }; +}; + +template +struct Y { + + enum { + a = T1::a + T2::a, + + // NB: if the next line is changed to + // n = (T1::n > T2::n) ? T1::n : T2::n + // the problem goes away. + + n = meta_max::max + }; +}; + +int z = Y::a;
eb12.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: ice990323-2.C =================================================================== --- ice990323-2.C (nonexistent) +++ ice990323-2.C (revision 816) @@ -0,0 +1,88 @@ +// { dg-do run } +// check EH with templates +extern "C" void abort (); +extern "C" void exit (int); + +template struct A { + A() {} + A(const char*) {} +}; + +void f1() +{ + throw *(new A >); +} + +void f2() +{ + throw *(new A >); +} + +void f3() +{ + throw A > ("howdy"); +} + +void f4() +{ + throw A > ("hi michey"); +} + +int main() +{ + int flag; + + flag = 0; + try { + f1(); + } + catch (A >) { + abort(); + } + catch (A >) { + flag = 1; + } + if (!flag) + abort(); + + flag = 0; + try { + f2(); + } + catch (A >) { + abort(); + } + catch (A >) { + flag = 1; + } + if (!flag) + abort(); + + flag = 0; + try { + f3(); + } + catch (A >) { + abort(); + } + catch (A >) { + flag = 1; + } + if (!flag) + abort(); + + flag = 0; + try { + f4(); + } + catch (A >) { + abort(); + } + catch (A >) { + flag = 1; + } + if (!flag) + abort(); + + exit(0); +}
ice990323-2.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb50.C =================================================================== --- eb50.C (nonexistent) +++ eb50.C (revision 816) @@ -0,0 +1,17 @@ +// { dg-do run } +struct foo { }; +int f(int a, int b) +{ + if (b == 0) + throw foo(); + return a / b; +} +int main() +{ + try { + f(0, 0); + return 1; + } catch (foo x) { + return 0; + } +}
eb50.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb33.C =================================================================== --- eb33.C (nonexistent) +++ eb33.C (revision 816) @@ -0,0 +1,12 @@ +// { dg-do run } +#include +#include + +int +main() +{ + std::printf("If you see this, you don't have a problem!\n"); +#ifdef EXPOSE_BUG + std::ifstream a; +#endif +}
eb33.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb16.C =================================================================== --- eb16.C (nonexistent) +++ eb16.C (revision 816) @@ -0,0 +1,14 @@ +// { dg-do assemble } +template +struct A { + typedef T T1; +}; + +template +struct B : T::T1 { // insert `typename' before T::T1 +}; + +struct C { }; + +B > z; +
eb16.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb71.C =================================================================== --- eb71.C (nonexistent) +++ eb71.C (revision 816) @@ -0,0 +1,37 @@ +// { dg-do assemble } +typedef __SIZE_TYPE__ size_t; + +class A { + +public: + void operator delete(void*, size_t); + void* operator new(size_t); +}; + +class B : public A { +friend class D; + + B(); + unsigned counter; +}; + +class D { + + int ins( B*&); +}; + +int +D::ins( B*& tempN) +{ + unsigned i; + + if (i == 10) { + } + else { + } + + tempN = new B(); + tempN->counter = 20; + + return 0; +}
eb71.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb54.C =================================================================== --- eb54.C (nonexistent) +++ eb54.C (revision 816) @@ -0,0 +1,10 @@ +// { dg-do run } +#include +#include +#include + +int main() +{ + std::cout << std::setbase(3) << std::endl; + std::exit (0); +}
eb54.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb37.C =================================================================== --- eb37.C (nonexistent) +++ eb37.C (revision 816) @@ -0,0 +1,26 @@ +// { dg-do assemble } +template +struct A { + typedef T T1; +}; + +template +struct B { + typedef T T2; +}; + +template +struct C { +}; + +template +C +foo (E) +{ + return C(); +} + +void test() +{ + foo(B >()); +}
eb37.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb92.C =================================================================== --- eb92.C (nonexistent) +++ eb92.C (revision 816) @@ -0,0 +1,2 @@ +// { dg-do assemble } +template f<0>(){} // { dg-error "" } invalid code
eb92.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb75.C =================================================================== --- eb75.C (nonexistent) +++ eb75.C (revision 816) @@ -0,0 +1,19 @@ +// { dg-do assemble } +int*& foo (int const *& x) +{ + return const_cast (x); +} + +/* +If the references in this example are changed to pointers (change +all `&''s to `*'), no warnings result. + +I think this is incorrect according to CD2 5.2.11, para 4: + +4 An lvalue of type T1 can be explicitly converted to an lvalue of type + T2 using the cast const_cast (where T1 and T2 are object types) + if a pointer to T1 can be explicitly converted to the type pointer to + T2 using a const_cast. The result of a reference const_cast refers to + the original object. + +*/
eb75.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb58.C =================================================================== --- eb58.C (nonexistent) +++ eb58.C (revision 816) @@ -0,0 +1,15 @@ +// { dg-do run } +// { dg-options "-w -fpermissive" } +// Test for g++ array init extension + +class A { +public: + A(int i) {} +private: + A( const A & ) {} +}; + +main() +{ + A *list = new A[10](4); +}
eb58.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb79.C =================================================================== --- eb79.C (nonexistent) +++ eb79.C (revision 816) @@ -0,0 +1,26 @@ +// { dg-do assemble } +// Makes bogus x86 assembly code. +#include + +using namespace std; + +template +T max(T a, T b) +{ + return (a > b) ? a : b; +} + +// Prototypes (enable one or the other) +double max<>(double, double); // { dg-error "" } bogus code +// int max(int, int); + +int main() +{ + int i = 123; + double d = 1234.5678; + + cout.precision(12); + cout << max(d, i) << endl; // { dg-error "" } + cout << max(i, d) << endl; // { dg-error "" } + return 0; +}
eb79.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb110.C =================================================================== --- eb110.C (nonexistent) +++ eb110.C (revision 816) @@ -0,0 +1,26 @@ +// { dg-do assemble } +class X +{ + public: + virtual void f() const = 0; +}; + +template +class Y: public X +{ + public: + virtual void f() const; +}; + +template +void Y::f() const +{ +} + +template <> +void Y::f() const; + +template <> +void Y::f() const +{ +}
eb110.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb4.C =================================================================== --- eb4.C (nonexistent) +++ eb4.C (revision 816) @@ -0,0 +1,49 @@ +// { dg-do assemble } +// Error: Internal Compiler Error in GCC 2.7.2 and EGCS 1998/05/28 snapshot. + +#include + +class some_base + { +public: + class base_func_args; + virtual void func(base_func_args &) = 0; // { dg-error "" } referenced below + }; + +class some_base::base_func_args + { +public: + int i; + }; + +class some_derived : public some_base + { // { dg-error "" } note +public: + class derived_func_args; + void func(derived_func_args &); + }; + + +class derived_func_args : public some_base::base_func_args + { +public: + float f; + }; + +class some_derived::func(derived_func_args &a) // { dg-error "" } illegal member syntax + { + std::cout << a.i << ' ' << a.f << std::endl; + } + +int +main() + { + some_derived d; // { dg-error "" } abstract class + some_derived::derived_func_args dfa; // { dg-error "" } incomplete class + some_base *b = &d; + + dfa.i = 10; + dfa.f = 20; + b->func(dfs); // { dg-error "" } dfs not declared + return 0; + }
eb4.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb131.C =================================================================== --- eb131.C (nonexistent) +++ eb131.C (revision 816) @@ -0,0 +1,20 @@ +// { dg-do assemble } +// From: Klaus-Georg Adams +// Reported against EGCS snaps 98/06/18. + +struct a { + a(); + void junk( float ); + void junk( double ); + + void bar( double ); + void bar( float ); + + void foo( void (a::*member)(float) ); // { dg-error "" } candidate +}; + +a::a() +{ + foo( &junk ); // { dg-error "" } junk is an unqualified-id. + foo( &bar ); // { dg-error "" } bar is an unqualified-id. +}
eb131.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: README =================================================================== --- README (nonexistent) +++ README (revision 816) @@ -0,0 +1,18 @@ +This directory contains a hodgepodge of problem reports that appeared on +the egcs-bugs or egcs mailing lists. Just like the reports themselves, +they tend to be poorly understood and poorly organized. However, we +drop them into the testsuite on the premise that internal compiler errors +are always bad - no matter how bogus the source. + +If you really understand C++ (and you know who you are) if you find +entries in this area that are bogus, feel free to just fix them or nuke +them. You don't need my permission. + +Many of the first entries in this area were done in "block mode" by +whipping through many months of archives. In hindsight, some important +information was lost, but being picky on over 8,000 messages is a sure +way to never get out of the gate. + +We'll do better now. + +Robert Lipe
README Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb114.C =================================================================== --- eb114.C (nonexistent) +++ eb114.C (revision 816) @@ -0,0 +1,30 @@ +// { dg-do run } +#include + +class SomeClass_t { +public: + SomeClass_t () : x (11) {} +protected: + float x; +}; + +class DynamicOnly_t { +public: + static DynamicOnly_t* create (const char* name = "UNDEF", + const SomeClass_t& somec = *(new SomeClass_t +())) { + return new DynamicOnly_t (name, somec); + } + DynamicOnly_t (const char* name, const SomeClass_t& somec) : + m_somec (somec) { + strncpy (m_Name, name, sizeof (m_Name)); + } +private: + SomeClass_t m_somec; + char m_Name[255]; +}; + +int main (int argc, char* argv[]) { + DynamicOnly_t* ptr = DynamicOnly_t::create (); //* + return 0; +}
eb114.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb8.C =================================================================== --- eb8.C (nonexistent) +++ eb8.C (revision 816) @@ -0,0 +1,14 @@ +// { dg-do assemble } + +class foo { +public: + operator <<(const void *); //{ dg-error "" } no return type + operator <<(char *); //{ dg-error "" } no return type +}; + +void main() // { dg-error "must return .int" } +{ + foo f; + f << (void*)0; +} +
eb8.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eh990323-4.C =================================================================== --- eh990323-4.C (nonexistent) +++ eh990323-4.C (revision 816) @@ -0,0 +1,104 @@ +// { dg-do run } +// check MI and VBC offsets on throw +extern "C" void abort (); +extern "C" void exit (int); + +struct A { + int x[23]; +}; + +struct B : virtual public A { + int y[33]; +}; + +struct C : virtual public A, public B { + int z[43]; +}; + +struct D { + int xx[53]; +}; + +struct E : public D, public A { + int yy[63]; +}; + +C c; + +E e; + +void f1() +{ + throw (C*)0; +} + +void f2() +{ + throw &c; +} + +void f3() +{ + throw (E*)0; +} + +void f4() +{ + throw &e; +} + +int +main() +{ + int flag; + + flag = 0; + try { + f1(); + } + catch (void* p) { + if (p) + abort(); + flag = 1; + } + if (!flag) + abort(); + + flag = 0; + try { + f2(); + } + catch (void* p) { + if (!p || (void*)p != (void*)&c) + abort(); + flag = 1; + } + if (!flag) + abort(); + + flag = 0; + try { + f3(); + } + catch (void* p) { + if (p) + abort(); + flag = 1; + } + if (!flag) + abort(); + + flag = 0; + try { + f4(); + } + catch (void* p) { + if (!p || (void*)p != (void*)&e) + abort(); + flag = 1; + } + if (!flag) + abort(); + + exit(0); +}
eh990323-4.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb21.C =================================================================== --- eb21.C (nonexistent) +++ eb21.C (revision 816) @@ -0,0 +1,25 @@ +// { dg-do run } +#include + +#include + +using namespace std; + +/*----------------------------------------*/ + +struct connection_t { + connection_t() {} +}; + +std::vector connections; + +/*----------------------------------------*/ + +int +main() { + ostringstream str; + + connections.insert(connections.end(), connection_t()); + + return 0; +}
eb21.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb80.C =================================================================== --- eb80.C (nonexistent) +++ eb80.C (revision 816) @@ -0,0 +1,7 @@ +// { dg-do assemble } +#include + +class A { + class B : public std::exception {} + ; +};
eb80.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb63.C =================================================================== --- eb63.C (nonexistent) +++ eb63.C (revision 816) @@ -0,0 +1,17 @@ +// { dg-do run } +// { dg-options "-w -fpermissive" } +//This uses GNU extensions, so disable -ansi +#include +#include + +class A { +public: + A(bool b) { abort(); } + A(int a, bool b) { printf("cool\n"); } +}; + +main() { + A* a; + + a = new A[2](1,false); +}
eb63.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb46.C =================================================================== --- eb46.C (nonexistent) +++ eb46.C (revision 816) @@ -0,0 +1,31 @@ +// { dg-do run } +#include + +class A1 { + friend class B; + public: + virtual void foo() {}; +}; + +class A2 : public virtual A1 {friend class B;}; + +class A3 : public virtual A1, private A2 {friend class B;}; + +class B +{ + public: + B(A1* a) : itsA(dynamic_cast(a)) {}; + A2* itsA; +}; + +int main() +{ + A1* a=new A3; + B b(a); + + if (b.itsA) + std::cout << "cast ok" << std::endl; + else + std::cout << "cast failed" << std::endl; + return 0; +}
eb46.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb29.C =================================================================== --- eb29.C (nonexistent) +++ eb29.C (revision 816) @@ -0,0 +1,19 @@ +// { dg-do assemble } +#include + +using namespace std; + +enum s { S }; +class a +{ + vector vs; + friend class b; +}; +struct b +{ + vector va; + operator vector< vector >() + { + return vector< vector >(va.size()); + } +};
eb29.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb84.C =================================================================== --- eb84.C (nonexistent) +++ eb84.C (revision 816) @@ -0,0 +1,18 @@ +// { dg-do run } +// Error: Internal Compiler error on GCC 2.7.2.3 & EGCS 1998/05/23 snapshot. + +class A { +public: + enum { ONE, TWO, THREE }; +}; + +template +void f() { + +} + +int +main() +{ + f(); +}
eb84.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb67.C =================================================================== --- eb67.C (nonexistent) +++ eb67.C (revision 816) @@ -0,0 +1,6 @@ +// { dg-do assemble } +/* +Check whether a typedef for a basic type as a baseclass is diagnosed. +*/ +typedef int an_int; +class bar : public an_int {}; // { dg-error "" } not an aggregate
eb67.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb88.C =================================================================== --- eb88.C (nonexistent) +++ eb88.C (revision 816) @@ -0,0 +1,16 @@ +// { dg-do run } +// { dg-options "-w" } +// Another magic NULL problem. + +#include + +int main() +{ + try + { + throw(NULL); + } + catch (...) + { + } +}
eb88.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb102.C =================================================================== --- eb102.C (nonexistent) +++ eb102.C (revision 816) @@ -0,0 +1,35 @@ +// { dg-do run } +// Error: intenral compiler error on 1998/05/28 snapshot. +#include +#include + +void evilRises (void **ptr) +{ + int *pi; + + pi = new int; + + *pi = 0; + + *ptr = (void *)pi; +} + +int main (int argc, char *argv[]) +{ +#ifdef WORKAROUND + union foo +#else + union +#endif + { + int a; + int b; + int c; + } *fred, barney; + + evilRises((void **)&fred); + + barney = *fred; + + return EXIT_SUCCESS; +}
eb102.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb123.C =================================================================== --- eb123.C (nonexistent) +++ eb123.C (revision 816) @@ -0,0 +1,10 @@ +// { dg-do assemble } +// { dg-options "-O2 -W " } +#include "stdio.h" + +void writeNote() throw( int ) +{ + printf( "hello world\n" ); + try { } + catch( int ){ throw; } +}
eb123.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb106.C =================================================================== --- eb106.C (nonexistent) +++ eb106.C (revision 816) @@ -0,0 +1,36 @@ +// { dg-do assemble { target native } } +// { dg-options "-O2 -fPIC " } +struct T +{ + const char* f1; + int f2; +}; + +void f(T*); +int g(); + +extern char a1[]; + +inline int m(int a, int b) {return b < a ? 2 : 1;} + +void +h() +{ + T a[10]; + int i(0); + + bool c; + if (c) + { + a[i++].f1 = "asf"; + f(a); + i = 0; + } + + a[i].f1 = &a1[1]; + a[i].f2 = m(1, g()); + i++; + + a[i].f1 = "zxv"; + a[i].f2 = 0; +}
eb106.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb133b.C =================================================================== --- eb133b.C (nonexistent) +++ eb133b.C (revision 816) @@ -0,0 +1,16 @@ +// { dg-do assemble } +// Gives ICE 109 +// From: Klaus-Georg Adams +// Reported against EGCS snaps 98/06/28. + +using namespace std; // { dg-error "" "" { xfail *-*-* } } + +int main() +{ + try { + } + catch (bad_alloc) { // { dg-error "" } + return 1; + } + return 0; +}
eb133b.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb127.C =================================================================== --- eb127.C (nonexistent) +++ eb127.C (revision 816) @@ -0,0 +1,61 @@ +// { dg-do assemble } +// Gets ICE 40. + +#include +#include +#include + +using namespace std; + +class ODEsolver +{ + private: + void eulerODE(vector& y, double& t, double& dt); + void midpointODE(vector& y, double& t, double& dt); + + protected: + void (ODEsolver::*useMethod)(vector&, double&, double&); + void init(); + + public: + ODEsolver(); + void timeloop(vector& y, double ts, double te, double dt); +}; + + +ODEsolver::ODEsolver() +{ + init(); +} + + +void ODEsolver::eulerODE(vector& y, double& t, double& dt) +{ + y[0] = dt * 2.; +} + +void ODEsolver::midpointODE(vector& y, double& t, double& dt) +{ + y[0] = dt * 3.; +} + + + +void ODEsolver::init() +{ + ODEsolver::useMethod = &ODEsolver::midpointODE; +} + +void ODEsolver::timeloop(vector& y, double ts, double te, double dt) +{ + (ODEsolver::useMethod)(y,ts,dt); // { dg-error "" } should use this->* +} + +int main (int nargs, char** args) +{ + ODEsolver solver; + vector y(2); double t_start=5.; double t_end=7.; double dt=2.; + solver.timeloop(y,t_start,t_end,dt); + cout << y[0] << endl; + return(0); +}
eb127.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb30.C =================================================================== --- eb30.C (nonexistent) +++ eb30.C (revision 816) @@ -0,0 +1,16 @@ +// { dg-do assemble } +#include + +class bifstream : public std::ifstream { +public: + bifstream(); +// ~bifstream(); +}; + +void load_bin() +{ + bifstream InFile; + + if (!InFile) + return; +}
eb30.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: ice990323-3.C =================================================================== --- ice990323-3.C (nonexistent) +++ ice990323-3.C (revision 816) @@ -0,0 +1,15 @@ +// { dg-do assemble } +// try throwing overloaded function + +void f(int) +{ +} + +void f(long) +{ +} + +void g() +{ + throw &f; // { dg-error "" } insufficient contextual information +}
ice990323-3.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb13.C =================================================================== --- eb13.C (nonexistent) +++ eb13.C (revision 816) @@ -0,0 +1,16 @@ +// { dg-do assemble } +template +class Array { +public: + typedef T T_numtype; +}; + +template +void f(T_array, typename T_array::T_numtype) +{ +} + +void g() +{ + f(Array(), float()); +}
eb13.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb51.C =================================================================== --- eb51.C (nonexistent) +++ eb51.C (revision 816) @@ -0,0 +1,36 @@ +// { dg-do assemble } +typedef unsigned long Xv_opaque; + +class DynaString +{ +public: + DynaString(); + DynaString( const DynaString& dynaStr ); + DynaString( const long n ); + ~DynaString(); + + int operator ==( const char* const string ) const; +}; + +class DDE_Defaults +{ +public: + DynaString GetHost(); + DynaString GetService(); + DynaString GetDatabase(); +}; + +extern DDE_Defaults* ddeDefaults; + +void +f() +{ + DynaString tempHost, tempService, tempDatabase; + if( (tempHost = ddeDefaults->GetHost()) == 0 + || (tempService = ddeDefaults->GetService()) == 0 + || (tempDatabase = ddeDefaults->GetDatabase()) == 0 + ) + { + } +} +
eb51.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb34.C =================================================================== --- eb34.C (nonexistent) +++ eb34.C (revision 816) @@ -0,0 +1,19 @@ +// { dg-do assemble } +class Base { +public: + class Bar { public: virtual ~Bar() {}; }; +}; + +class Derived : public Base { +public: + class Bar : public Base::Bar {}; +}; + +template +class XYZ : public T::Bar { +}; + +void test() { + XYZ b; + XYZ d; +}
eb34.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb17.C =================================================================== --- eb17.C (nonexistent) +++ eb17.C (revision 816) @@ -0,0 +1,59 @@ +// { dg-do run } +#include + +class A { +public: + virtual void print(); + virtual A * clone(); +}; + +struct Pad { + virtual void f () {} +}; + +class B : public Pad, virtual public A { +public: + void print(); + B * clone(); +}; + +void A::print() +{ + printf("A\n"); +} + +void B::print() +{ + printf("B\n"); +} + + +A * A::clone() +{ + return this; +} + +B * B::clone() +{ + return this; +} + + +int main() +{ + A * a = new B; + B * b = dynamic_cast(a); + + printf("%p\n",b); // (*2*) + b->print(); + + a = b; + printf("%p\n",a); + a->print(); + + a = a->clone(); + printf("%p\n",a); + a->print(); // (*1*) + + return 0; +}
eb17.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb55.C =================================================================== --- eb55.C (nonexistent) +++ eb55.C (revision 816) @@ -0,0 +1,12 @@ +// { dg-do assemble } +// Since the constructor is in streambuf.h, additional diagnostics are +// produced, which are not really supported in the old-deja framework + +#include + +void +t( char* buf ) +{ + std::istrstream str = buf; //{ dg-error "" } inaccessible copy constructor +} +
eb55.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb38.C =================================================================== --- eb38.C (nonexistent) +++ eb38.C (revision 816) @@ -0,0 +1,37 @@ +// { dg-do assemble } +class string +{ +public: + string(); + string(const string& x); + string(const char* t); + + ~string(); +}; + +void set_status(string message); + +class StatusDelay { +private: + string cause; + +public: + StatusDelay(const string& c) + : cause(c) + { + set_status(cause); + } + + ~StatusDelay() + { + set_status(cause); + } +}; + +static char delay_message[] = "Filtering files"; + +static void searchRemote() +{ + StatusDelay delay(delay_message); + return; +}
eb38.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb93.C =================================================================== --- eb93.C (nonexistent) +++ eb93.C (revision 816) @@ -0,0 +1,31 @@ +// { dg-do assemble } +// Error: Internal compiler error on egcs 1998/05/28 snapshot. + +const double M_PI=3.14159265358979323846; + +template +inline double SineSeries() +{ + const double x=I*2*M_PI/N; + const bool go=K+1!=J; + return 1.0-x*x/(2*K+2)/(2*K+3)*SineSeries(); +} + +template<> +inline double SineSeries<0,0,0,0>() +{ + return 1.0; +} + +template +inline double Sine() +{ + const double x=(I*2*M_PI/N); + return x * SineSeries(); +} + +int main() +{ + double f=Sine<32,5>() + return 0; // { dg-error "" } parse error +}
eb93.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb76.C =================================================================== --- eb76.C (nonexistent) +++ eb76.C (revision 816) @@ -0,0 +1,18 @@ +// { dg-do assemble } +// the template operator!= interferes. It should be in a namespace. + +#include + +enum T { + V1 +}; + +struct X { + T t : 31; +}; + +void +f(X& v) { + if( v.t != V1 ) { // complains about taking address of bitfield + } +}
eb76.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb59.C =================================================================== --- eb59.C (nonexistent) +++ eb59.C (revision 816) @@ -0,0 +1,31 @@ +// { dg-do run } +#define INC_FUNCTIONAL 1 +#define USE_STATIC_CAST 1 + +#include +#include +#ifdef INC_FUNCTIONAL +#include +#endif + +using namespace std; + +template int p( int val, R& r ) +{ + return val + r; +} + +template void f( vector& v ) +{ +#ifdef USE_STATIC_CAST + accumulate( v.begin(), v.end(), 0, static_cast(p) ); +#else + accumulate( v.begin(), v.end(), 0, p ); +#endif +} + +int main() +{ + vector r; + f( r ); +}
eb59.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb97.C =================================================================== --- eb97.C (nonexistent) +++ eb97.C (revision 816) @@ -0,0 +1,25 @@ +// { dg-do run } +// Creates bad assembly on sparc and x86 +template +struct Array { }; + +template +Array test_ok(const Array& a) { + Array result; + return(result); +} + +template +Array test_error(const Array& a) { + Array result; + return(result); +} + +int main(int argc, char* argv[]) { + Array<2> a; + + test_ok(a); + test_error(a); // <<< MARKED LINE! + + return(0); +}
eb97.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb111.C =================================================================== --- eb111.C (nonexistent) +++ eb111.C (revision 816) @@ -0,0 +1,7 @@ +// { dg-do run } + int main() { + for(int i=1; i < 9; i++); + for(int i=1; i < 9; i++); + + return 0; + }
eb111.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: ebnull-cast.C =================================================================== --- ebnull-cast.C (nonexistent) +++ ebnull-cast.C (revision 816) @@ -0,0 +1,19 @@ +// { dg-do run } +class null { + null (null const&); + void operator& (); + + public: + null () {} + + template + operator T* () const { return 0; } +} const null; + + +int main () +{ + int *p = static_cast(null); + + return 0; +}
ebnull-cast.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb5.C =================================================================== --- eb5.C (nonexistent) +++ eb5.C (revision 816) @@ -0,0 +1,13 @@ +// { dg-do assemble } +enum { a, b }; + +class Bug { + int pri:8; + int flags:15; +public: + void bug() { + flags |= a; // this does not work + } +}; + +void dummy(Bug x) { x.bug(); }
eb5.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb132.C =================================================================== --- eb132.C (nonexistent) +++ eb132.C (revision 816) @@ -0,0 +1,28 @@ +// { dg-do assemble } +// { dg-options "-O -Wall -fgcse" } +// From: Klaus-Georg Adams +// Reported against EGCS snaps 98/06/28. +// +// Compilation of this program with the flags g++ -Wall -O -fgcse +// or -O2 produces spurious warnings in the standard +// header . +// +// They vanish if the declaration of a::b is taken out. + +#include + +std::string foo(); +struct a { + void bar(); + enum b { c, d }; + b theb; + std::string baz; +}; + +void +a::bar() +{ + baz += foo() + foo(); + baz += foo() + foo() + "foo"; +} +
eb132.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb115.C =================================================================== --- eb115.C (nonexistent) +++ eb115.C (revision 816) @@ -0,0 +1,10 @@ +// { dg-do run } +// { dg-options "-O" } + +#include +#include + +int main() { + int *i1, *i2; + std::cerr << (typeid(i1)==typeid(i2)) << std::endl; +}
eb115.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb9.C =================================================================== --- eb9.C (nonexistent) +++ eb9.C (revision 816) @@ -0,0 +1,22 @@ +// { dg-do assemble } +template +class d0om_Hashmap +{ +public: + typedef int value_type; + + class iterator + { + public: + value_type* operator-> () const; + }; + +}; + + +template +typename d0om_Hashmap::value_type* +d0om_Hashmap::iterator::operator-> () const +{ + return 0; +}
eb9.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb119.C =================================================================== --- eb119.C (nonexistent) +++ eb119.C (revision 816) @@ -0,0 +1,11 @@ +// { dg-do assemble } +template +void f() +{ +} + +int main() +{ + f(); // { dg-error "" } .* +} +
eb119.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eh990323-1.C =================================================================== --- eh990323-1.C (nonexistent) +++ eh990323-1.C (revision 816) @@ -0,0 +1,77 @@ +// { dg-do run } +// check cleanup of template temporaries +extern "C" void abort (); +extern "C" void exit (int); + +int ctor = 0; +int dtor = 0; + +template struct A { + A() {ctor++;} + A(int) {ctor++;} + A(const A&) {ctor++;} + ~A() {dtor++;} + operator int() {return 0;} +}; + +template void ff(T); + +template void ff(T) +{ +} + +void g(int) +{ +} + +void f() +{ + int x; + + A a1; + A a2(37); + A a3 = A(47); + A a4 = 97; + + g(A()); + + A(); + + x ? A() : A(); + + x = 47, A(), A(39), A(23), -17; + + while (A()) + ; + for (;A(3);) + ; + if (A >()) + ; + + ff(A()); + + throw 59; +} + +int +main() +{ + int flag = 0; + + try { + A(); + f(); + } + catch (int) { + A(34); + flag = 1; + } + + if (!flag) + abort(); + + if (!ctor || ctor != dtor) + abort(); + + exit(0); +}
eh990323-1.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eh990323-5.C =================================================================== --- eh990323-5.C (nonexistent) +++ eh990323-5.C (revision 816) @@ -0,0 +1,68 @@ +// { dg-do run } +// check cleanup of partial array objects +extern "C" void abort (void); +extern "C" void exit (int); + +int ctor = 0; +int dtor = 0; + +int cnt = 1; + +struct A { + int x; + A(); + A(const A&); + ~A(); +}; + +A::A() +{ + if (cnt == 10) + throw 57; + x = cnt++; + ctor++; +} + +A::A(const A&) +{ + if (cnt == 10) + throw 57; + x = cnt++; + ctor++; +} + +A::~A() +{ + if (x + 1 != cnt--) + abort(); + dtor++; +} + +void f() +{ + A a[] = {A(), A(), A(), A(), A(), A(), A(), A(), A(), A(), A(), A()}; + + throw -1066; +} + +int +main() +{ + int flag; + + flag = 0; + try { + f(); + } + catch (int) { + flag = 1; + } + if (!flag) + abort(); + if (ctor != 9) + abort(); + if (dtor != 9) + abort(); + + exit(0); +}
eh990323-5.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb22.C =================================================================== --- eb22.C (nonexistent) +++ eb22.C (revision 816) @@ -0,0 +1,27 @@ +// { dg-do assemble } +// Ambiguous conversion, three candidates: +// builtin == (int, int), and the two user-defined operators +// Each one requires a user-defined ICS where another uses builtin conversions, +// so none is the best viable function. + +class MyInt +{ +public: + MyInt(int = 0) {} + operator int() const {return 2;} +}; + +bool operator==(const MyInt& a, const int& b) // { dg-error "" } candidate +{ + return (int)a == b; +} + +bool operator==(const MyInt& a, const MyInt& b) // { dg-error "" } candidate +{ + return (int)a == (int)b; +} + +bool f() +{ + return 3 == MyInt(); // { dg-error "" } ambiguous +}
eb22.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb60.C =================================================================== --- eb60.C (nonexistent) +++ eb60.C (revision 816) @@ -0,0 +1,18 @@ +// { dg-do assemble } +#include + +class t { +public: + t(const std::string& s) : s_(s) {} + std::string s_; + static t* t_; +}; + +t* t::t_; + +t* makeT() +{ + return new t("test"); + return t::t_ ? t::t_ : + t::t_ = new t("test"); +}
eb60.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb43.C =================================================================== --- eb43.C (nonexistent) +++ eb43.C (revision 816) @@ -0,0 +1,42 @@ +// { dg-do assemble } +// All the pointer_to_binary_function cases used to fail because g++ +// couldn't handle converting an overloaded function to a class type. +// The first one should still fail because it requires an implicit conversion +// to pointer_to_binary_function, which has an `explicit' constructor. + +#include +#include +#include + +using namespace std; + +template class Expr +{ +public : + Expr(){}; + Expr(const T&){}; +}; + +template +inline bool compare(const Expr a, const Expr b){ return true; } + +int main() +{ + vector a(3); + sort( a.begin(), a.end(), + static_cast,const Expr)>(compare) ); + sort( a.begin(), a.end(), compare ); + sort::iterator, + pointer_to_binary_function, const Expr, bool> > + ( a.begin(), a.end(), compare ); // { dg-error "" } constructor is explicit + sort( a.begin(), a.end(), + ptr_fun, const Expr, bool> (compare) ); + sort( a.begin(), a.end(), + ptr_fun(compare) ); + sort( a.begin(), a.end(), + pointer_to_binary_function, const Expr, bool>(compare) ); + sort( a.begin(), a.end(), + pointer_to_binary_function, const Expr, bool>(compare) ); + sort( a.begin(), a.end(), + pointer_to_binary_function, const Expr, bool>(compare<>) ); +}
eb43.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb26.C =================================================================== --- eb26.C (nonexistent) +++ eb26.C (revision 816) @@ -0,0 +1,31 @@ +// { dg-do run } +// +// egcs-2.90.06 +// cannot declare friend of enclosing class using its scope, works fine +// without scope or for definition of foo::bar::f +// + +class foo +{ +public: + static int f(); + class bar { + friend int foo::f(); +// friend int f(); + static int x; + public: + static int f() {return foo::f();}; + }; +}; + +int foo::bar::x; + +int foo::f() { + return bar::x; +} + +int +main () +{ + return foo::bar::f (); +}
eb26.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb81.C =================================================================== --- eb81.C (nonexistent) +++ eb81.C (revision 816) @@ -0,0 +1,42 @@ +// { dg-do assemble } +class x +{ +public: + x (int init_buffer_size=0); + ~x (); +}; + + + +class xSequence +{ +public: + xSequence (); + ~xSequence (); + x Get(int index)const; +}; + + + +class foo +{ +public: + bool bar(const x & name, x & value); + +}; + + + +bool foo::bar(const x & name, x & value) +{ + bool result = false; + + xSequence seq; + x v1, v2; + if(result ? bar(seq.Get(1),v2) : bar(seq.Get(2),v2)) + + ; + + return result; +} +
eb81.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb64.C =================================================================== --- eb64.C (nonexistent) +++ eb64.C (revision 816) @@ -0,0 +1,25 @@ +// { dg-do assemble } +template +class B:public A { + B(){} +}; + +template +class C:public B { + C(){} +}; + +/* +g++ bugsol.C +bugsol.C:9: Internal compiler error. +bugsol.C:9: Please submit a full bug report to `egcs-bugs@cygnus.com'. + +g++ -v +Reading specs from +/home/pierre/local/lib/gcc-lib/i586-pc-linux-gnulibc1/egcs-2.90.16/specs +gcc version egcs-2.90.16 971105 (gcc2-970802 experimental) + +egcc compiled with gcc version 2.7.2.1 on debian 1.3.1 + +*/ +
eb64.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb120.C =================================================================== --- eb120.C (nonexistent) +++ eb120.C (revision 816) @@ -0,0 +1,23 @@ +// { dg-do run } +template +double integrate(double a, double b, int numSamplePoints) +{ + // PRECONDITION(numSamplePoints > 1); + double delta = (b-a) / (numSamplePoints-1); + double sum = 0.; + for (int i=0; i < numSamplePoints; ++i) + sum += functionToIntegrate(a + i*delta); + return sum * (b-a) / numSamplePoints; +} + +inline double myFunction(double x) +{ + return 1 / (1 + x); +} + +// Example use +int main() { +double z = integrate(0.0, 1.0, 50); + return 0 ; +} +
eb120.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb103.C =================================================================== --- eb103.C (nonexistent) +++ eb103.C (revision 816) @@ -0,0 +1,11 @@ +// { dg-do assemble } +// Error: Internal compiler error in 2.7.2 & EGCS 1.0.0 + +template +inline unsigned f (unsigned* ptr); +template +inline unsigned f (unsigned* ptr) // { dg-error "function template partial specialization" } +{ + return 1; +} +
eb103.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb124.C =================================================================== --- eb124.C (nonexistent) +++ eb124.C (revision 816) @@ -0,0 +1,5 @@ +// { dg-do assemble } +#include +class X : public std::runtime_error { + X (); +};
eb124.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb107.C =================================================================== --- eb107.C (nonexistent) +++ eb107.C (revision 816) @@ -0,0 +1,20 @@ +// { dg-do assemble } +template +struct X +{ + virtual void f(int) const; +}; + +template +struct Y: public X +{ + virtual void f(int) const; +}; + +template +void Y::f(int) const +{ +} + +template <> +void Y::f(int) const;
eb107.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb133c.C =================================================================== --- eb133c.C (nonexistent) +++ eb133c.C (revision 816) @@ -0,0 +1,17 @@ +// { dg-do assemble } +// Gives ICE 109 +// From: Klaus-Georg Adams +// Reported against EGCS snaps 98/06/28. + +namespace std { } +using namespace std; + +int main() +{ + try { + } + catch (bad_alloc) { // { dg-error "" } + return 1; + } + return 0; +}
eb133c.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb128.C =================================================================== --- eb128.C (nonexistent) +++ eb128.C (revision 816) @@ -0,0 +1,12 @@ +// { dg-do assemble } +template +struct A { + typedef T* iterator; // { dg-error "" } pointer to reference +public: + A(){} +}; + +void f() +{ + A a; +}
eb128.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb10.C =================================================================== --- eb10.C (nonexistent) +++ eb10.C (revision 816) @@ -0,0 +1,30 @@ +// { dg-do assemble } +template +class _fixed_size_allocator +{ + private: + + struct something { }; + static something * asdf; + + public: + + static void delete_object (); +}; + + +template +class object_allocator +{ + private: + + typedef _fixed_size_allocator allocator; + + public: + + static void deallocate (T * p) + { + allocator::delete_object (reinterpret_cast (p)); + } +}; +
eb10.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb31.C =================================================================== --- eb31.C (nonexistent) +++ eb31.C (revision 816) @@ -0,0 +1,20 @@ +// { dg-do run } +#include + +int main() { + try { + throw 1; + } catch(...) { + try { + throw; + } catch(int) { + } + try { + throw; + } catch(int) { + } + } + return 0; +} + +
eb31.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: ice990323-4.C =================================================================== --- ice990323-4.C (nonexistent) +++ ice990323-4.C (revision 816) @@ -0,0 +1,13 @@ +// { dg-do assemble } +// try throwing template function name + +template void f(T); + +template void f(T) +{ +} + +void g() +{ + throw &f; // { dg-error "" } insufficient contextual information +}
ice990323-4.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb14.C =================================================================== --- eb14.C (nonexistent) +++ eb14.C (revision 816) @@ -0,0 +1,40 @@ +// { dg-do run } + +extern "C" void abort (); + +template +struct I { +}; + +template +struct A { + + int r; + + template + void operator()(T1, T2) + { r = 0; } + + template + void operator()(I, I) + { r = 1; } +}; + +int main() +{ + A x; + I<0> a; + I<1> b; + + x(a,b); + if (x.r != 1) + abort(); + + x(float(), double()); + if (x.r != 0) + abort(); + + return 0; +} + +
eb14.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb52.C =================================================================== --- eb52.C (nonexistent) +++ eb52.C (revision 816) @@ -0,0 +1,37 @@ +// { dg-do assemble } +class base { +protected: + virtual void f(); +}; + +class d1 : public virtual base { +protected: + void f(); +}; + +void d1::f() +{ + base::f(); +} + +class dd1 : public virtual d1 { +protected: + void f(); +}; + +void dd1::f() +{ + d1::f(); + base::f(); +} + +class d1_and_base : public virtual d1, public virtual base { +protected: + void f(); +}; + +void d1_and_base::f() +{ + d1::f(); + base::f(); +}
eb52.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb35.C =================================================================== --- eb35.C (nonexistent) +++ eb35.C (revision 816) @@ -0,0 +1,38 @@ +// { dg-do assemble } + +class string +{ +public: + string(); + string(const string& x); + string(const char* t); + + ~string(); +}; + +void set_status(string message); + +class StatusDelay { +private: + string cause; + +public: + StatusDelay(const string& c) + : cause(c) + { + set_status(cause); + } + + ~StatusDelay() + { + set_status(cause); + } +}; + +static char delay_message[] = "Filtering files"; + +static void searchRemote() +{ + StatusDelay delay(delay_message); + return; +}
eb35.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb18.C =================================================================== --- eb18.C (nonexistent) +++ eb18.C (revision 816) @@ -0,0 +1,8 @@ +// { dg-do assemble } +class C { }; + +void foo() +{ + C c; + void * v = static_cast(c); // { dg-error "" } illegal cast +}
eb18.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb90.C =================================================================== --- eb90.C (nonexistent) +++ eb90.C (revision 816) @@ -0,0 +1,22 @@ +// { dg-do assemble } +// { dg-options "-O2" } + +#ifdef HIDE_BUG +#define realloc Realloc +#endif + +class TmpRgn { +public: + void + realloc(); +}; + +class TmpActor { + TmpRgn tmpRgn; + +public: + void + realloc() { + tmpRgn.realloc(); + } +};
eb90.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb73.C =================================================================== --- eb73.C (nonexistent) +++ eb73.C (revision 816) @@ -0,0 +1,15 @@ +// { dg-do run } +// { dg-options "-O -Wall" } +// Depletes VM. + +#include +#include +#include +using namespace std; + +int main() +{ + int daten [16] = { 1, 4, 4, 6, 1, 2, 2, 3, 6, 6, 6, 5, 7, 5, 4, 4}; + list menge; + copy (daten, daten+16, back_inserter(menge)); +}
eb73.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb56.C =================================================================== --- eb56.C (nonexistent) +++ eb56.C (revision 816) @@ -0,0 +1,10 @@ +// { dg-do assemble } +// Error: Internal compiler error on 1998/05/28 snapshot. + +class foo { + public: + typedef int sometype; +}; + +struct die : public foo::sometype { // { dg-error "" } invalid base type +};
eb56.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: 980310-1.C =================================================================== --- 980310-1.C (nonexistent) +++ 980310-1.C (revision 816) @@ -0,0 +1,44 @@ +// { dg-do run } +// { dg-options "-g" } +// Internal compiler error on egcs 1.0.1 i586-pc-linux-gnulibc1. +// From: Max Lawson +// Message-Id: <9803091022.AA07520@drfmc.ceng.cea.fr> + + +typedef __SIZE_TYPE__ size_t; + +struct dummy { }; + +struct arrrrrgh { }; + +template +struct whyyyyyyy { }; + +template +struct grrrrrrrr { }; + +template +class no_future +{ +public: + + template + no_future(const grrrrrrrr*,S>& man ) { } + + ~no_future( ) { } + +private: + + no_future(const no_future&); + no_future& operator=(const no_future&); +}; + +int main( ) +{ + grrrrrrrr*> man; + + no_future here(man); + + return 0; +} +
980310-1.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb39.C =================================================================== --- eb39.C (nonexistent) +++ eb39.C (revision 816) @@ -0,0 +1,18 @@ +// { dg-do assemble } +#include +#include +#include +#include + +using namespace std; + +extern bool foo2 (ostream &out, istream &in); + +bool +foo1 (ostream &out, const char *in) +{ + string tmp(in, std::strlen(in)); + stringbuf sb (tmp); + istream fmt (&sb); + return foo2 (out, fmt); +}
eb39.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb94.C =================================================================== --- eb94.C (nonexistent) +++ eb94.C (revision 816) @@ -0,0 +1,16 @@ +// { dg-do assemble } + + +class baseClass +{ +private: +static int variable; +}; + +class myClass : public baseClass +{ +private: +static int variable; // this is intentionally duplicated +}; + +myClass::variable = 0; //{ dg-error "" } no type
eb94.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb77.C =================================================================== --- eb77.C (nonexistent) +++ eb77.C (revision 816) @@ -0,0 +1,33 @@ +// { dg-do run } +#include +#include + +using namespace std; + +int +main(int, char* []) +{ + stringstream s; + + s << "line 1\nline 2\n\nline 4"; + s << std::ends; + + int nLine = 0; + + while( true ) { + char line[100]; + s.get(line, 100); + + if( ! line ) { + break; + } + + ++nLine; + std::cout << nLine << ": " << line << std::endl; + + if( nLine > 10 ) { // stop infinite loop + break; + } + } + return 0; +}
eb77.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb98.C =================================================================== --- eb98.C (nonexistent) +++ eb98.C (revision 816) @@ -0,0 +1,18 @@ +// { dg-do assemble } +// Error: Internal compiler error in egcs 1998/05/28 snapshot. + + + template + inline + unsigned int + extent(T (&x)[Length]) + { + return Length; + } + + extern int b[]; + + void f() + { + extent(b); // { dg-error "" } no matching function + }
eb98.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb2.C =================================================================== --- eb2.C (nonexistent) +++ eb2.C (revision 816) @@ -0,0 +1,17 @@ +// { dg-do assemble } +typedef __SIZE_TYPE__ size_t; +inline void *operator new(size_t, void *place) throw() { return place; } + +struct A +{ + A(); + ~A(); +}; + +void testfunc( void ) +{ + A* mybuf; + A v[1]; + + new (mybuf) A(); +}
eb2.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb112.C =================================================================== --- eb112.C (nonexistent) +++ eb112.C (revision 816) @@ -0,0 +1,11 @@ +// { dg-do assemble } +template inline STRUCT * +setback(MEMBER *bp, MEMBER STRUCT::*offset) +{ + // The implementation of this function may be platform dependend + if(!bp) return 0; // NULL pointers remain NULL + union { int i; MEMBER STRUCT::*of; } u; // Switch types. Casting won't work. + u.of = offset; + return (STRUCT *) ((int) bp - u.i); +} +
eb112.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb6.C =================================================================== --- eb6.C (nonexistent) +++ eb6.C (revision 816) @@ -0,0 +1,14 @@ +// { dg-do assemble } +class A { +public: + A() { t=0; } + double t; +}; +template +class B { +public: + void f1() { new T; f2(); } + void f2() { new T; } +}; +template class B; +
eb6.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb116.C =================================================================== --- eb116.C (nonexistent) +++ eb116.C (revision 816) @@ -0,0 +1,24 @@ +// { dg-do run } +template +class b +{ +private: + char a(int x) + { + union { + int i; + char c; + } val; + val.i = x; + return val.c; + }; + +public: + b() { + } +}; + +int main() { + b n; + return 0; +}
eb116.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eh990323-2.C =================================================================== --- eh990323-2.C (nonexistent) +++ eh990323-2.C (revision 816) @@ -0,0 +1,103 @@ +// { dg-do run } +// check MI and VBC offsets on throw +extern "C" void abort (); +extern "C" void exit (int); + +struct A { + int x[23]; +}; + +struct B : virtual public A { + int y[33]; +}; + +struct C : virtual public A, public B { + int z[43]; +}; + +struct D { + int xx[53]; +}; + +struct E : public D, public A { + int yy[63]; +}; + +C c; + +E e; + +void f1() +{ + throw (C*)0; +} + +void f2() +{ + throw &c; +} + +void f3() +{ + throw (E*)0; +} + +void f4() +{ + throw &e; +} + +int main() +{ + int flag; + + flag = 0; + try { + f1(); + } + catch (A* p) { + if (p) + abort(); + flag = 1; + } + if (!flag) + abort(); + + flag = 0; + try { + f2(); + } + catch (A* p) { + if (!p || (void*)p == (void*)&c) + abort(); + flag = 1; + } + if (!flag) + abort(); + + flag = 0; + try { + f3(); + } + catch (A* p) { + if (p) + abort(); + flag = 1; + } + if (!flag) + abort(); + + flag = 0; + try { + f4(); + } + catch (A* p) { + if (!p || (void*)p == (void*)&e) + abort(); + flag = 1; + } + if (!flag) + abort(); + + exit(0); +}
eh990323-2.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb23.C =================================================================== --- eb23.C (nonexistent) +++ eb23.C (revision 816) @@ -0,0 +1,20 @@ +// { dg-do assemble } +class foo { +protected: + void __duplicate (); + +}; + +class bar : public virtual foo { +protected: + void __duplicate() { + foo::__duplicate (); + } +}; + +class oops : public virtual bar { +protected: + void __duplicate() { + foo::__duplicate (); + } +};
eb23.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property Index: eb61.C =================================================================== --- eb61.C (nonexistent) +++ eb61.C (revision 816) @@ -0,0 +1,8 @@ +// { dg-do assemble } +void +action0(float& arg1) +{ + long cn0 = 1; + + arg1 = cn0; +}
eb61.C Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Id \ No newline at end of property

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.