OSDN Git Service

PR middle-end/51761
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.c-torture / compile / labels-3.c
1 /* This test does not compile on mips-irix6 using the native assembler,
2    though it does work with gas.  See PR6200.  Since we cannot (???)
3    distinguish which assembler is being used, always pass -S for
4    irix.  */
5 /* { dg-options "-w -S" { target mips*-*-irix* } } */
6
7 /* Verify that we can narrow the storage associated with label diffs.  */
8
9 int foo (int a)
10 {
11   static const short ar[] = { &&l1 - &&l1, &&l2 - &&l1 };
12   void *p = &&l1 + ar[a];
13   goto *p;
14  l1:
15   return 1;
16  l2:
17   return 2;
18 }