For some reason I did not see these failures in my testing.
Sorry about that. Anyways this fixes the testcases by
adding a cast to __INTPTR_TYPE__ and then a cast to void*.
Committed after testing them on x86_64-linux-gnu.
gcc/testsuite/ChangeLog:
* gcc.c-torture/compile/920826-1.c: Fix computed goto.
* gcc.c-torture/compile/pr27863.c: Likewise.
* gcc.c-torture/compile/pr70190.c: Likewise.
* gcc.dg/torture/pr89135.c: Likewise.
* gcc.dg/torture/pr90071.c: Likewise.
* gcc.dg/vect/bb-slp-pr97709.c: Likewise.
/* { dg-require-effective-target indirect_jumps } */
-f(int*x){goto*(char)*x;}
+f(int*x){goto*(void*)(__INTPTR_TYPE__)(char)*x;}
*++esp=(long)&&_loc119;
_loc119:;
SetTermStruc:
- goto *(*esp--);
+ goto *(void*)(__INTPTR_TYPE__)(*esp--);
}
static char a[] = "foo";
static void *b[] = { &&l1, &&l2 };
goto *(b[1]);
- l1: goto *(a[0]);
+ l1: goto *(void*)(__INTPTR_TYPE__)(a[0]);
l2: return 0;
}
g = foo ();
*o = g;
if (c)
- goto *d;
+ goto *(void*)d;
}
}
goto *i;
goto i;
}
f:
- goto *({ d || e < 0 || e >= 2; });
+ goto *(void*)(__INTPTR_TYPE__)({ d || e < 0 || e >= 2; });
&e;
}
void *f[] = {&&g, &&h, &&i, &&j};
int d, c;
j:
- goto *a;
+ goto *(void*)(__INTPTR_TYPE__)a;
g:
d = 0;
h: