Commit a10f9a2e by Martin Sebor Committed by Martin Sebor

overflow-warn-9.c: Adjust expected warnings to avoid false positives on ILP32.

gcc/testsuite/ChangeLog:
	* 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.

From-SVN: r248464
parent 9dda0ace
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> 2017-05-23 Jan Hubicka <hubicka@ucw.cz>
* gfortran.dg/pr48636.f90: Fix template better. * gfortran.dg/pr48636.f90: Fix template better.
......
...@@ -56,9 +56,10 @@ const struct Types t1 = { ...@@ -56,9 +56,10 @@ const struct Types t1 = {
.us = USHRT_MAX + 1, /* { dg-warning "unsigned conversion from .int. to .short unsigned int. changes value from .65536. to .0." } */ .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." } */ .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 + 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." } */ .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 */ .ul = ULONG_MAX + 1LU /* there should be some warning here */
}; };
...@@ -14,8 +14,8 @@ g (void) ...@@ -14,8 +14,8 @@ g (void)
{ {
return f (0xffffffffL, /* { dg-warning "13:-Woverflow" } */ return f (0xffffffffL, /* { dg-warning "13:-Woverflow" } */
0xffffffffL) /* { dg-warning "13:-Woverflow" } */ 0xffffffffL) /* { dg-warning "13:-Woverflow" } */
&& f (0xffffffffL, /* { dg-warning "9:-Woverflow" } */ && f (0xffffffffL, /* { dg-warning "16:-Woverflow" } */
0xffffffffL); /* { dg-warning "9:-Woverflow" } */ 0xffffffffL); /* { dg-warning "16:-Woverflow" } */
} }
void void
...@@ -24,13 +24,13 @@ foo (int i) ...@@ -24,13 +24,13 @@ foo (int i)
bar (256); /* { dg-warning "8:-Woverflow" } */ bar (256); /* { dg-warning "8:-Woverflow" } */
bar (6.66f); /* { dg-warning "8:conversion" } */ bar (6.66f); /* { dg-warning "8:conversion" } */
bar8 (-1, /* { dg-warning "9:-Wsign-conversion" } */ bar8 (-1, /* { dg-warning "9:-Wsign-conversion" } */
-2, /* { dg-warning "3:-Wsign-conversion" } */ -2, /* { dg-warning "10:-Wsign-conversion" } */
-3, /* { dg-warning "4:-Wsign-conversion" } */ -3, /* { dg-warning "11:-Wsign-conversion" } */
-4, /* { dg-warning "5:-Wsign-conversion" } */ -4, /* { dg-warning "12:-Wsign-conversion" } */
-5, /* { dg-warning "6:-Wsign-conversion" } */ -5, /* { dg-warning "13:-Wsign-conversion" } */
-6, /* { dg-warning "7:-Wsign-conversion" } */ -6, /* { dg-warning "14:-Wsign-conversion" } */
-7, /* { dg-warning "8:-Wsign-conversion" } */ -7, /* { dg-warning "15:-Wsign-conversion" } */
-8); /* { dg-warning "9:-Wsign-conversion" } */ -8); /* { dg-warning "16:-Wsign-conversion" } */
bazu (i, i); /* { dg-warning "9:conversion" } */ bazu (i, i); /* { dg-warning "9:conversion" } */
bazi (0x8, 0x80000000); /* { dg-warning "14:-Wsign-conversion" "" { xfail int16 } } */ bazi (0x8, 0x80000000); /* { dg-warning "14:-Wsign-conversion" "" { xfail int16 } } */
} }
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
struct S { int n, u[2]; }; struct S { int n, u[2]; };
const signed char z[] = { const signed char z[] = {
[0] = 0x100, /* { dg-warning "9:-Woverflow" } */ [0] = 0x100, /* { dg-warning "-Woverflow" } */
[2] = 0x101, /* { dg-warning "9:-Woverflow" } */ [2] = 0x101, /* { dg-warning "-Woverflow" } */
}; };
int A[] = { int A[] = {
0, 0x80000000, /* { dg-warning "16:-Wsign-conversion" } */ 0, 0x80000000, /* { dg-warning "16:-Wsign-conversion" } */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment