testsuite: Skip analyzer tests on AIX.
[official-gcc.git] / gcc / testsuite / c-c++-common / analyzer / setjmp-pr109094.c
blob10591ce60a7318d9d17cbede796d22d4266456b4
1 /* Reduced from an ICE seen in qemu's target/i386/tcg/translate.c */
3 typedef long int __jmp_buf[8];
4 struct __jmp_buf_tag {
5 __jmp_buf __jmpbuf;
6 };
7 typedef struct __jmp_buf_tag sigjmp_buf[1];
9 extern int __sigsetjmp(sigjmp_buf env, int savesigs);
10 extern void siglongjmp(sigjmp_buf env, int val);
12 typedef struct DisasContextBase {
13 int num_insns;
14 } DisasContextBase;
16 typedef struct DisasContext {
17 DisasContextBase base;
18 sigjmp_buf jmpbuf;
19 } DisasContext;
21 extern int translator_ldub(DisasContextBase *base, int);
23 int advance_pc(DisasContext *s, int num_bytes) {
24 if (s->base.num_insns > 1) {
25 siglongjmp(s->jmpbuf, 2);
27 return 0;
30 static inline int x86_ldub_code(DisasContext *s) {
31 return translator_ldub(&s->base, advance_pc(s, 1));
34 static void disas_insn(DisasContext *s) {
35 int b;
36 __sigsetjmp(s->jmpbuf, 0);
37 b = x86_ldub_code(s);