[testsuite,pushed] Fix sloppy PR120277 test
Checks
| Context |
Check |
Description |
| linaro-tcwg-bot/tcwg_simplebootstrap_build--master-aarch64-bootstrap |
fail
|
Patch failed to apply
|
| linaro-tcwg-bot/tcwg_simplebootstrap_build--master-arm-bootstrap |
fail
|
Patch failed to apply
|
Commit Message
gcc.dg/pr120277.c files with
FAIL: gcc.dg/pr120277.c (test for excess errors)
Excess errors:
gcc.dg/pr120277.c:14:4: warning: cast to pointer from integer of
different size [-Wint-to-pointer-cast]
hence using __INTPTR_TYPE__ in involved variables.
Johann
--
gcc/testsuite/
PR testsuite/120277
* gcc.dg/pr120277.c (e): Use __INTPTR_TYPE__ instead of long.
b/gcc/testsuite/gcc.dg/pr120277.c
@@ -2,7 +2,7 @@
/* { dg-options "-O2" } */
int a, b;
-int c(int d, long e) {
+int c(int d, __INTPTR_TYPE__ e) {
switch (d) {
case 129:
a = 1;
@@ -13,7 +13,7 @@ int c(int d, long e) {
}
*(int *)e = 0;
}
-void f(int d, long e) { c(d, e); }
+void f(int d, __INTPTR_TYPE__ e) { c(d, e); }
void g() {
int h = b * sizeof(int);
f(h + 7, h);