diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/c90-const-expr-8.c')
| -rw-r--r-- | gcc/testsuite/gcc.dg/c90-const-expr-8.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/gcc/testsuite/gcc.dg/c90-const-expr-8.c b/gcc/testsuite/gcc.dg/c90-const-expr-8.c index 966044c4eff..b00bb9718f8 100644 --- a/gcc/testsuite/gcc.dg/c90-const-expr-8.c +++ b/gcc/testsuite/gcc.dg/c90-const-expr-8.c @@ -9,19 +9,19 @@ #include <limits.h> enum e { - E0 = 0 * (INT_MAX + 1), /* { dg-warning "integer overflow in expression" } */ - /* { dg-error "overflow in constant expression" "constant" { target *-*-* } 12 } */ - E1 = 0 * (INT_MIN / -1), /* { dg-warning "integer overflow in expression" } */ - /* { dg-error "overflow in constant expression" "constant" { target *-*-* } 14 } */ - E2 = 0 * (INT_MAX * INT_MAX), /* { dg-warning "integer overflow in expression" } */ - /* { dg-error "overflow in constant expression" "constant" { target *-*-* } 16 } */ - E3 = 0 * (INT_MIN - 1), /* { dg-warning "integer overflow in expression" } */ - /* { dg-error "overflow in constant expression" "constant" { target *-*-* } 18 } */ - E4 = 0 * (unsigned)(INT_MIN - 1), /* { dg-warning "integer overflow in expression" } */ - /* { dg-error "overflow in constant expression" "constant" { target *-*-* } 20 } */ - E5 = 0 * -INT_MIN, /* { dg-warning "integer overflow in expression" } */ - /* { dg-error "overflow in constant expression" "constant" { target *-*-* } 22 } */ - E6 = 0 * !-INT_MIN, /* { dg-warning "integer overflow in expression" } */ - /* { dg-error "not an integer constant" "constant" { target *-*-* } 24 } */ + E0 = 0 * (INT_MAX + 1), /* { dg-warning "21:integer overflow in expression" } */ + /* { dg-error "3:overflow in constant expression" "constant" { target *-*-* } 12 } */ + E1 = 0 * (INT_MIN / -1), /* { dg-warning "21:integer overflow in expression" } */ + /* { dg-error "3:overflow in constant expression" "constant" { target *-*-* } 14 } */ + E2 = 0 * (INT_MAX * INT_MAX), /* { dg-warning "21:integer overflow in expression" } */ + /* { dg-error "3:overflow in constant expression" "constant" { target *-*-* } 16 } */ + E3 = 0 * (INT_MIN - 1), /* { dg-warning "21:integer overflow in expression" } */ + /* { dg-error "3:overflow in constant expression" "constant" { target *-*-* } 18 } */ + E4 = 0 * (unsigned)(INT_MIN - 1), /* { dg-warning "31:integer overflow in expression" } */ + /* { dg-error "3:overflow in constant expression" "constant" { target *-*-* } 20 } */ + E5 = 0 * -INT_MIN, /* { dg-warning "12:integer overflow in expression" } */ + /* { dg-error "3:overflow in constant expression" "constant" { target *-*-* } 22 } */ + E6 = 0 * !-INT_MIN, /* { dg-warning "13:integer overflow in expression" } */ + /* { dg-error "3:not an integer constant" "constant" { target *-*-* } 24 } */ E7 = INT_MIN % -1 /* Not an overflow. */ }; |

