OSDN Git Service

* gcc.dg/980523-1.c: New test.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / 980523-1.c
1 /* { dg-do run { target rs6000-*-* ppc-*-* } } */
2 /* { dg-options "-O2 -fpic" } */
3
4 void foo1(int a, char *b, int c)
5 {
6    c =a+c+234;
7 }
8
9 int foo2(int d)
10 {
11    return d*d;
12 }
13
14 int bar1, bar2, bar3;
15 char * bar4;
16
17 int main(void) {
18     int h;
19     bar1 = foo2(1);
20     bar2 = foo2(1);
21
22     h = foo2(1);
23     foo1(1, "a", foo2(1));
24     foo1(bar1, "a", foo2(1));
25     foo2(1);
26
27     h = foo2(1);
28     bar3 = 1;
29     bar4 = "a";
30     foo1(1, "n", foo2(1));
31     foo1(1, "o", foo2(1));
32     foo1(1, "p", foo2(1));
33     foo1(bar1, "a", foo2(1));
34
35     bar3 = h;
36     bar4 = "b";  foo1(bar1, "b", foo2(1));
37     foo1(1, "q", foo2(1));
38     bar4 = "c";  foo1(1, "c", foo2(1));
39     bar4 = "d";  foo1(1, "d", foo2(1));
40     bar4 = "e";  foo1(1, "e", foo2(1));
41     bar4 = "f";  foo1(1, "f", foo2(1));
42     bar4 = "g";  foo1(1, "g", foo2(1));
43     bar4 = "h";  foo1(1, "h", foo2(1));
44     bar4 = "i";  foo1(1, "i", foo2(1));
45     bar4 = "j";  foo1(1, "j", foo2(1));
46     bar4 = "k";  foo1(1, "k", foo2(1));
47     bar4 = "l";  foo1(1, "l", foo2(1));
48     bar4 = "m";
49     foo1(bar2, "m", foo2(1));
50     exit(0);
51 }