./:
[official-gcc.git] / gcc / testsuite / gcc.c-torture / compile / labels-3.c
blob14eb9522f6807e37505047a35347f918f8249c8b
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* } } */
7 /* Verify that we can narrow the storage associated with label diffs. */
9 int foo (int a)
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;