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
This commit is contained in:
parent
396b535a72
commit
b2ecb7a8e6
@ -1,3 +1,9 @@
|
||||
2006-01-03 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR c/25183
|
||||
* stmt.c (add_case_node): Make sure to clear overflow flags
|
||||
from ranges.
|
||||
|
||||
2006-01-03 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
Merge from gomp-branch.
|
||||
|
@ -2104,10 +2104,12 @@ add_case_node (struct case_node *head, tree type, tree low, tree high,
|
||||
}
|
||||
|
||||
|
||||
/* Add this label to the chain. */
|
||||
/* Add this label to the chain. Make sure to drop overflow flags. */
|
||||
r = ggc_alloc (sizeof (struct case_node));
|
||||
r->low = low;
|
||||
r->high = high;
|
||||
r->low = build_int_cst_wide (TREE_TYPE (low), TREE_INT_CST_LOW (low),
|
||||
TREE_INT_CST_HIGH (low));
|
||||
r->high = build_int_cst_wide (TREE_TYPE (high), TREE_INT_CST_LOW (high),
|
||||
TREE_INT_CST_HIGH (high));
|
||||
r->code_label = label;
|
||||
r->parent = r->left = NULL;
|
||||
r->right = head;
|
||||
|
@ -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.
|
||||
|
22
gcc/testsuite/gcc.dg/torture/pr25183.c
Normal file
22
gcc/testsuite/gcc.dg/torture/pr25183.c
Normal file
@ -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;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user