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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [debug/] [debug3.C] - Blame information for rev 825

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
// PR optimization/5547
2
// This testcase caused ICE on IA-32, since DWARF-2 was unable
3
// to emit location expression for parameter a of operator+.
4
// { dg-do compile { target fpic } }
5
// { dg-options "-fpic" }
6
 
7
struct A { char *s; };
8
 
9
inline A operator+ (char a, const A &b)
10
{
11
  A s;
12
  s.s = new char[12];
13
  s.s[0] = a;
14
  return s;
15
}
16
 
17
int b (const A &);
18
 
19
void test1 (const A &x, int y)
20
{
21
  int j = b ("012345"[y] + x);
22
  for (int i = 0; i < y; i++);
23
}
24
 
25
void test2 (const A &x, int y)
26
{
27
  int j = b ("012345678"[y + 2] + x);
28
  for (int i = 0; i < y; i++);
29
}
30
 
31
void test3 (const A &x, int y)
32
{
33
  int j = b ("012345678"[y - 6] + x);
34
  for (int i = 0; i < y; i++);
35
}
36
 
37
void test4 (const A &x, int y)
38
{
39
  int j = b ("012345678"[2 * y - 10] + x);
40
  for (int i = 0; i < y; i++);
41
}
42
 
43
void test5 (const A &x, int y)
44
{
45
  int j = b ("012345678"[4 * y] + x);
46
  for (int i = 0; i < y; i++);
47
}

powered by: WebSVN 2.1.0

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