1 2002-08-08 Jakub Jelinek <jakub@redhat.com>
3 * g++.dg/ext/typeof2.C: New test.
4 * gcc.dg/typeof-1.c: New test.
5 * gcc.dg/typeof-2.c: New test.
7 --- gcc/testsuite/g++.dg/ext/typeof2.C.jj 2002-08-08 14:24:56.000000000 +0200
8 +++ gcc/testsuite/g++.dg/ext/typeof2.C 2002-08-08 14:24:39.000000000 +0200
10 +// Test typeof with __asm redirection
12 +// { dg-options "-O2" }
16 + extern int foo1 __asm ("bar1");
19 + extern int foo2 (int);
20 + extern int foo2 (int) __asm ("bar2");
27 + extern __typeof (foo3) foo3 __asm ("bar3");
30 + extern int foo4 (int);
31 + extern __typeof (foo4) foo4 __asm ("bar4");
38 +// { dg-final { scan-assembler-not "foo" } }
39 --- gcc/testsuite/gcc.dg/typeof-1.c.jj 2002-08-08 14:26:18.000000000 +0200
40 +++ gcc/testsuite/gcc.dg/typeof-1.c 2002-08-08 14:26:06.000000000 +0200
42 +/* Test typeof with __asm redirection. */
43 +/* { dg-do compile } */
44 +/* { dg-options "-O2" } */
47 +extern int foo1 __asm ("bar1");
50 +extern int foo2 (int);
51 +extern int foo2 (int) __asm ("bar2");
58 +extern __typeof (foo3) foo3 __asm ("bar3");
61 +extern int foo4 (int);
62 +extern __typeof (foo4) foo4 __asm ("bar4");
68 +// { dg-final { scan-assembler-not "foo" } }
69 --- gcc/testsuite/gcc.dg/typeof-2.c.jj 2002-08-08 20:42:33.000000000 +0200
70 +++ gcc/testsuite/gcc.dg/typeof-2.c 2002-08-08 20:47:53.000000000 +0200
72 +/* Test typeof with __asm redirection. */
73 +/* { dg-do compile } */
74 +/* { dg-options "-O2" } */
76 +extern int foo1 (int x) __asm ("baz1");
77 +int bar1 (int x) { return x; }
78 +extern __typeof (bar1) foo1 __attribute ((weak, alias ("bar1")));
80 +extern int foo2 (int x) __attribute__ ((const));
81 +extern __typeof (foo2) foo2 __asm ("baz2");
84 + return foo2 (x) + foo2 (x) + foo2 (x) + foo2 (x) + foo2 (x) + foo2 (x);
87 +extern int foo3 (int x);
88 +extern __typeof (foo3) foo3 __asm ("baz3");
91 + return foo3 (x) + foo3 (x) + foo3 (x) + foo3 (x) + foo3 (x) + foo3 (x);
94 +// { dg-final { scan-assembler-not "foo1" } }
95 +// { dg-final { scan-assembler "baz1" } }
96 +// { dg-final { scan-assembler-not "foo2" } }
97 +// { dg-final { scan-assembler "baz2" } }
98 +// { dg-final { scan-assembler-not "baz2.*baz2.*baz2.*baz2.*baz2.*baz2" } }
99 +// { dg-final { scan-assembler-not "foo3" } }
100 +// { dg-final { scan-assembler "baz3.*baz3.*baz3.*baz3.*baz3.*baz3" } }