This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

bug report, gcc 2.95.2, fatal error in assign_stack_temp_for_type


// bug report for gcc 2.95.2 , Internal compiler error
// Installed from SuSE 6.4 release CDs.   
// 
//   This bug is somehow related to templates.  
//
// if you can't reproduce the error messages write to     
// 
// va ... org chemie uni-frankfurt de
//
// Have Fun ..
//
//>gcc -v
// Reading specs from /usr/lib/gcc-lib/i486-suse-linux/2.95.2/specs
// gcc version 2.95.2 19991024 (release)  
//
//>gcc -c -o bug.o bug.cc
// bug.cc: In function `void functionX()':
// bug.cc:56: Internal compiler error in
`assign_stack_temp_for_type',
// at function.c:937
//
class ostream { public: ostream(){}; };
typedef ostream& (*__omanip)(ostream&);
extern ostream& endl(ostream& outs);
ostream& operator<<(ostream& os, const char* ){   return os; }
ostream& operator<<(ostream& os, int ){    return os; }
ostream& operator<<(ostream& os, __omanip ) {   return os;}
ostream cout;
//////////////////////////////////////////////////////////////////
// dummy class
class X 
{
public:
    int x;    
};
//////////////////////////////////////////////////////////////////
//
template <class T> class Array {
protected:
public:
    inline  ~Array(){};
    inline Array(unsigned x=0){
        if(0) cout <<  "Array::ctor (" << x<<")" << endl; // bug,
required
    };
};
//////////////////////////////////////////////////////////////////
// bug,required template 
template <class T>
inline X& operator<<(X& h, const T& k){ return h; } 
//////////////////////////////////////////////////////////////////
//
void f(void)
{
    Array< X >  itsParts; // bug, required line
}
//////////////////////////////////////////////////////////////////
//
void functionX(void)
{  // Internal compiler error in `assign_stack_temp_for_type', at
//    function.c:937
    char a[2]; /// <<----compiler error  was line: 56
}













Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]