1 // 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+.
5 // { dg-options "-fpic" }
6 // { dg-warning "not supported" "PIC unsupported" { target cris-*-elf* cris-*-aout* mmix-*-* } 0 }
10 inline A operator+ (char a, const A &b)
20 void test1 (const A &x, int y)
22 int j = b ("012345"[y] + x);
23 for (int i = 0; i < y; i++);
26 void test2 (const A &x, int y)
28 int j = b ("012345678"[y + 2] + x);
29 for (int i = 0; i < y; i++);
32 void test3 (const A &x, int y)
34 int j = b ("012345678"[y - 6] + x);
35 for (int i = 0; i < y; i++);
38 void test4 (const A &x, int y)
40 int j = b ("012345678"[2 * y - 10] + x);
41 for (int i = 0; i < y; i++);
44 void test5 (const A &x, int y)
46 int j = b ("012345678"[4 * y] + x);
47 for (int i = 0; i < y; i++);