riscv: Support $ in identifiers in extended asm.
[tinycc.git] / tests / bug.c
blobb0bc2d54733b022a8a9942e2551fd77c78f8536a
1 #include <stdio.h>
2 #include <stdarg.h>
4 int compile_errors(void)
6 #if TEST == 1
8 /* Not constant */
9 static int i = (&"Foobar"[1] - &"Foobar"[0]);
11 #endif
12 #if TEST == 2
14 /* Not constant */
15 struct{int c;}v;
16 static long i=((char*)&(v.c)-(char*)&v);
18 #endif
19 #if TEST == 3
21 /* Not constant */
22 static const short ar[] = { &&l1 - &&l1, &&l2 - &&l1 };
23 void *p = &&l1 + ar[0];
24 goto *p;
25 l1: return 1;
26 l2: return 2;
28 #endif
29 return 0;
32 int
33 main(void)