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++.dg/] [debug/] [debug3.C] - Diff between revs 149 and 154

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

Rev 149 Rev 154
// PR optimization/5547
// PR optimization/5547
// This testcase caused ICE on IA-32, since DWARF-2 was unable
// This testcase caused ICE on IA-32, since DWARF-2 was unable
// to emit location expression for parameter a of operator+.
// to emit location expression for parameter a of operator+.
// { dg-do compile { target fpic } }
// { dg-do compile { target fpic } }
// { dg-options "-fpic" }
// { dg-options "-fpic" }
struct A { char *s; };
struct A { char *s; };
inline A operator+ (char a, const A &b)
inline A operator+ (char a, const A &b)
{
{
  A s;
  A s;
  s.s = new char[12];
  s.s = new char[12];
  s.s[0] = a;
  s.s[0] = a;
  return s;
  return s;
}
}
int b (const A &);
int b (const A &);
void test1 (const A &x, int y)
void test1 (const A &x, int y)
{
{
  int j = b ("012345"[y] + x);
  int j = b ("012345"[y] + x);
  for (int i = 0; i < y; i++);
  for (int i = 0; i < y; i++);
}
}
void test2 (const A &x, int y)
void test2 (const A &x, int y)
{
{
  int j = b ("012345678"[y + 2] + x);
  int j = b ("012345678"[y + 2] + x);
  for (int i = 0; i < y; i++);
  for (int i = 0; i < y; i++);
}
}
void test3 (const A &x, int y)
void test3 (const A &x, int y)
{
{
  int j = b ("012345678"[y - 6] + x);
  int j = b ("012345678"[y - 6] + x);
  for (int i = 0; i < y; i++);
  for (int i = 0; i < y; i++);
}
}
void test4 (const A &x, int y)
void test4 (const A &x, int y)
{
{
  int j = b ("012345678"[2 * y - 10] + x);
  int j = b ("012345678"[2 * y - 10] + x);
  for (int i = 0; i < y; i++);
  for (int i = 0; i < y; i++);
}
}
void test5 (const A &x, int y)
void test5 (const A &x, int y)
{
{
  int j = b ("012345678"[4 * y] + x);
  int j = b ("012345678"[4 * y] + x);
  for (int i = 0; i < y; i++);
  for (int i = 0; i < y; i++);
}
}
 
 

powered by: WebSVN 2.1.0

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