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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.old-deja/] [g++.law/] [virtual3.C] - Diff between revs 149 and 154

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

Rev 149 Rev 154
// { dg-do run  }
// { dg-do run  }
// GROUPS passed virtual-functions
// GROUPS passed virtual-functions
// virtual file
// virtual file
// From: allan@ramjet.multinet.DE (Allan Brighton)
// From: allan@ramjet.multinet.DE (Allan Brighton)
// Subject: pos. bug in gcc-2.5.2 on hp
// Subject: pos. bug in gcc-2.5.2 on hp
// Date: 4 Nov 1993 22:57:36 -0500
// Date: 4 Nov 1993 22:57:36 -0500
// Message-ID: <9311041820.AA05942@ramjet.multinet.DE>
// Message-ID: <9311041820.AA05942@ramjet.multinet.DE>
#include 
#include 
#include 
#include 
using namespace std;
using namespace std;
class BugStream : public ostringstream {
class BugStream : public ostringstream {
public:
public:
    BugStream() {}
    BugStream() {}
    BugStream& eval();
    BugStream& eval();
};
};
static struct Eval_ { } eval;
static struct Eval_ { } eval;
BugStream& operator<<(ostream& os, Eval_);
BugStream& operator<<(ostream& os, Eval_);
BugStream& BugStream::eval()
BugStream& BugStream::eval()
{
{
   // make sure str is null terminated
   // make sure str is null terminated
   *this << ends;
   *this << ends;
   // eval the command and set the status
   // eval the command and set the status
   const char* s = str().data();
   const char* s = str().data();
   cerr << s << endl;
   cerr << s << endl;
   // reset the stream for the next command
   // reset the stream for the next command
   clear(ios::goodbit);
   clear(ios::goodbit);
   //   rdbuf()->freeze(0);
   //   rdbuf()->freeze(0);
   seekp(0);
   seekp(0);
   return *this;
   return *this;
}
}
BugStream& operator<<(ostream& os, Eval_)
BugStream& operator<<(ostream& os, Eval_)
{
{
    return ((BugStream&)os).eval();
    return ((BugStream&)os).eval();
}
}
int main() {
int main() {
    BugStream bs;
    BugStream bs;
    bs << "PASS" << eval;
    bs << "PASS" << eval;
}
}
 
 

powered by: WebSVN 2.1.0

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