diff options
author | Richard Guenther <rguenther@suse.de> | 2006-01-03 09:15:08 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2006-01-03 09:15:08 +0000 |
commit | b2ecb7a8e6b40cf61fb4e3e8b162bf466471dd3c (patch) | |
tree | 85c9f3bd2f60a948ea177e87aa0ec97fa2d69932 /gcc/testsuite | |
parent | 396b535a72eb44422b3b8f0f1c220b11ab34b24d (diff) | |
download | gcc-b2ecb7a8e6b40cf61fb4e3e8b162bf466471dd3c.zip gcc-b2ecb7a8e6b40cf61fb4e3e8b162bf466471dd3c.tar.gz gcc-b2ecb7a8e6b40cf61fb4e3e8b162bf466471dd3c.tar.bz2 |
re PR c/25183 (internal compiler error triggered by overflow in constant expression)
2006-01-03 Richard Guenther <rguenther@suse.de>
PR c/25183
* stmt.c (add_case_node): Make sure to clear overflow flags
from ranges.
* gcc.dg/torture/pr25183.c: New testcase.
From-SVN: r109272
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/torture/pr25183.c | 22 |
2 files changed, 27 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 1acf301..4199859 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2006-01-03 Richard Guenther <rguenther@suse.de> + + PR c/25183 + * gcc.dg/torture/pr25183.c: New testcase. + 2006-01-03 Jakub Jelinek <jakub@redhat.com> Merge from gomp-branch. diff --git a/gcc/testsuite/gcc.dg/torture/pr25183.c b/gcc/testsuite/gcc.dg/torture/pr25183.c new file mode 100644 index 0000000..a6c624c --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr25183.c @@ -0,0 +1,22 @@ +/* { dg-do compile } */ +/* { dg-options "-pedantic" } */ + +enum err { + err_IO = 0x8a450000, /* { dg-warning "int" } */ + err_NM, + err_EOF, + err_SE, + err_PT +}; +static enum err E_; +int error() +{ + switch (E_) { + case err_IO : break; /* { dg-warning "overflow" } */ + case err_NM : break; /* { dg-warning "overflow" } */ + case err_EOF : break; /* { dg-warning "overflow" } */ + case err_SE : break; /* { dg-warning "overflow" } */ + case err_PT : break; /* { dg-warning "overflow" } */ + default : return 0; + } +} |