OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.brendan/] [crash38.C] - Diff between revs 305 and 338

Only display areas with differences | Details | Blame | View Log

Rev 305 Rev 338
// { dg-do assemble  }
// { dg-do assemble  }
// GROUPS passed old-abort
// GROUPS passed old-abort
/*
/*
   I received the following message when using g++ (version 2.3.3):
   I received the following message when using g++ (version 2.3.3):
   main.cc: In method 'Implicit,3>::Implicit()':
   main.cc: In method 'Implicit,3>::Implicit()':
   main.cc: Internal compiler error 241.
   main.cc: Internal compiler error 241.
   main.cc: Please report this to 'bug-g++@prep.ai.mit.edu'
   main.cc: Please report this to 'bug-g++@prep.ai.mit.edu'
   */
   */
#include 
#include 
class INTEGER {
class INTEGER {
int x;
int x;
public:
public:
   typedef int BASE;
   typedef int BASE;
   INTEGER(int y) : x(y) {}
   INTEGER(int y) : x(y) {}
   INTEGER() {}
   INTEGER() {}
   void encode() { std::cout << "Integer encoder";}
   void encode() { std::cout << "Integer encoder";}
   int operator=(int y) { x=y; return x; }
   int operator=(int y) { x=y; return x; }
   operator int() {return x; }
   operator int() {return x; }
};
};
template< class T,  int n> class Implicit : public T {
template< class T,  int n> class Implicit : public T {
   public:
   public:
     typedef typename T::BASE BASE;
     typedef typename T::BASE BASE;
     Implicit(BASE value ): T(value) {}
     Implicit(BASE value ): T(value) {}
     Implicit() : T() {}
     Implicit() : T() {}
     int myTag() { return n; }
     int myTag() { return n; }
     void encode() { T::encode(); }
     void encode() { T::encode(); }
     BASE operator=(BASE t) { return T::operator=(t); }
     BASE operator=(BASE t) { return T::operator=(t); }
};
};
int
int
main()
main()
{
{
  Implicit ,  3> y;
  Implicit ,  3> y;
  y = 10;
  y = 10;
}
}
 
 

powered by: WebSVN 2.1.0

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