+2017-05-25 Martin Sebor <msebor@redhat.com>
+
+ * gcc.dg/overflow-warn-9.c: Adjust expected warnings to avoid false
+ positives on ILP32.
+ * gcc.dg/pr59963-2.c: Replace tabs with spaces, adjust expected
+ column numbers.
+ * gcc.dg/pr60114.c: Same.
+
2017-05-23 Jan Hubicka <hubicka@ucw.cz>
* gfortran.dg/pr48636.f90: Fix template better.
.us = USHRT_MAX + 1, /* { dg-warning "unsigned conversion from .int. to .short unsigned int. changes value from .65536. to .0." } */
.si = INT_MAX + 1LU, /* { dg-warning "signed conversion from 'long unsigned int. to 'int' changes value from .2147483648. to .-2147483648." } */
- .ui = UINT_MAX + 1L, /* { dg-warning "signed conversion from .long int. to .unsigned int. changes value from .4294967296. to .0." } */
- .ui = UINT_MAX + 1LU, /* { dg-warning "conversion from .long unsigned int. to .unsigned int. changes value from .4294967296. to .0." } */
+ .ui = UINT_MAX + 1L, /* { dg-warning "signed conversion from .long int. to .unsigned int. changes value from .4294967296. to .0." "lp64" { target lp64 } } */
+ .ui = UINT_MAX + 1LU, /* { dg-warning "conversion from .long unsigned int. to .unsigned int. changes value from .4294967296. to .0." "lp64" { target lp64 } } */
- .sl = LONG_MAX + 1LU, /* { dg-warning "signed conversion from .long unsigned int. to .long int. changes value from .9223372036854775808. to .-9223372036854775808." } */
+ .sl = LONG_MAX + 1LU, /* { dg-warning "signed conversion from .long unsigned int. to .long int. changes value from .9223372036854775808. to .-9223372036854775808." "lp64" { target lp64 } } */
+ /* { dg-warning "signed conversion from .long unsigned int. to .long int. changes value from .2147483648. to .-2147483648." "ilp32" { target ilp32 } .-1 } */
.ul = ULONG_MAX + 1LU /* there should be some warning here */
};
g (void)
{
return f (0xffffffffL, /* { dg-warning "13:-Woverflow" } */
- 0xffffffffL) /* { dg-warning "13:-Woverflow" } */
- && f (0xffffffffL, /* { dg-warning "9:-Woverflow" } */
- 0xffffffffL); /* { dg-warning "9:-Woverflow" } */
+ 0xffffffffL) /* { dg-warning "13:-Woverflow" } */
+ && f (0xffffffffL, /* { dg-warning "16:-Woverflow" } */
+ 0xffffffffL); /* { dg-warning "16:-Woverflow" } */
}
void
bar (256); /* { dg-warning "8:-Woverflow" } */
bar (6.66f); /* { dg-warning "8:conversion" } */
bar8 (-1, /* { dg-warning "9:-Wsign-conversion" } */
- -2, /* { dg-warning "3:-Wsign-conversion" } */
- -3, /* { dg-warning "4:-Wsign-conversion" } */
- -4, /* { dg-warning "5:-Wsign-conversion" } */
- -5, /* { dg-warning "6:-Wsign-conversion" } */
- -6, /* { dg-warning "7:-Wsign-conversion" } */
- -7, /* { dg-warning "8:-Wsign-conversion" } */
- -8); /* { dg-warning "9:-Wsign-conversion" } */
+ -2, /* { dg-warning "10:-Wsign-conversion" } */
+ -3, /* { dg-warning "11:-Wsign-conversion" } */
+ -4, /* { dg-warning "12:-Wsign-conversion" } */
+ -5, /* { dg-warning "13:-Wsign-conversion" } */
+ -6, /* { dg-warning "14:-Wsign-conversion" } */
+ -7, /* { dg-warning "15:-Wsign-conversion" } */
+ -8); /* { dg-warning "16:-Wsign-conversion" } */
bazu (i, i); /* { dg-warning "9:conversion" } */
bazi (0x8, 0x80000000); /* { dg-warning "14:-Wsign-conversion" "" { xfail int16 } } */
}
struct S { int n, u[2]; };
const signed char z[] = {
- [0] = 0x100, /* { dg-warning "9:-Woverflow" } */
- [2] = 0x101, /* { dg-warning "9:-Woverflow" } */
+ [0] = 0x100, /* { dg-warning "-Woverflow" } */
+ [2] = 0x101, /* { dg-warning "-Woverflow" } */
};
int A[] = {
- 0, 0x80000000, /* { dg-warning "16:-Wsign-conversion" } */
- 0xA, 0x80000000, /* { dg-warning "18:-Wsign-conversion" } */
- 0xA, 0xA, 0x80000000 /* { dg-warning "23:-Wsign-conversion" } */
+ 0, 0x80000000, /* { dg-warning "16:-Wsign-conversion" } */
+ 0xA, 0x80000000, /* { dg-warning "18:-Wsign-conversion" } */
+ 0xA, 0xA, 0x80000000 /* { dg-warning "23:-Wsign-conversion" } */
};
int *p = (int []) { 0x80000000 }; /* { dg-warning "21:-Wsign-conversion" } */
union { int k; } u = { .k = 0x80000000 }; /* { dg-warning "29:-Wsign-conversion" } */
foo (void)
{
signed char a[][3] = { { 0x100, /* { dg-warning "28:-Woverflow" } */
- 1, 0x100 }, /* { dg-warning "24:-Woverflow" } */
- { '\0', 0x100, '\0' } /* { dg-warning "27:-Woverflow" } */
+ 1, 0x100 }, /* { dg-warning "24:-Woverflow" } */
+ { '\0', 0x100, '\0' } /* { dg-warning "27:-Woverflow" } */
};
(const signed char []) { 0x100 }; /* { dg-warning "28:-Woverflow" } */
(const float []) { 1e0, 1e1, 1e100 }; /* { dg-warning "32:conversion" } */