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++.pt/] [crash68.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  }
// { dg-prune-output "mangled name" }
// { dg-prune-output "mangled name" }
//
//
// Copyright (C) 2001 Free Software Foundation, Inc.
// Copyright (C) 2001 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 25 Jul 2001 
// Contributed by Nathan Sidwell 25 Jul 2001 
// Origin: gustavo@geneura.ugr.es
// Origin: gustavo@geneura.ugr.es
// Bug 3624. Template instantiation of a reference type was not
// Bug 3624. Template instantiation of a reference type was not
// converted from reference when doing a call.
// converted from reference when doing a call.
#include 
#include 
using namespace std;
using namespace std;
template  class eo: public A
template  class eo: public A
{
{
public:
public:
  eo()
  eo()
  {
  {
    cout << this->x << " " << this->y << " "
    cout << this->x << " " << this->y << " "
         << c(*this) << " "
         << c(*this) << " "
         << ((d)?"true":"false") << endl;
         << ((d)?"true":"false") << endl;
  }
  }
private:
private:
  B b;
  B b;
};
};
struct XY
struct XY
{
{
  float x, y;
  float x, y;
  XY(): x(1), y(0.1) {}
  XY(): x(1), y(0.1) {}
};
};
float fitness(const XY& a)
float fitness(const XY& a)
{
{
  return a.x + a.y;
  return a.x + a.y;
}
}
struct fitness2
struct fitness2
{
{
  float operator()(const XY& a)
  float operator()(const XY& a)
  {
  {
    return a.x - a.y;
    return a.x - a.y;
  }
  }
  float f(const XY& a)
  float f(const XY& a)
  {
  {
    return a.x - a.y;
    return a.x - a.y;
  }
  }
};
};
struct fitness3
struct fitness3
{
{
  float operator()(const XY& a)
  float operator()(const XY& a)
  {
  {
    return a.x / a.y;
    return a.x / a.y;
  }
  }
};
};
fitness2 f2;
fitness2 f2;
fitness3 f3;
fitness3 f3;
int main()
int main()
{
{
  eo eo2;
  eo eo2;
  eo eo3;
  eo eo3;
  return 0;
  return 0;
}
}
 
 

powered by: WebSVN 2.1.0

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