aboutsummaryrefslogtreecommitdiff
path: root/gcc/stmt.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2006-01-03 09:15:08 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2006-01-03 09:15:08 +0000
commitb2ecb7a8e6b40cf61fb4e3e8b162bf466471dd3c (patch)
tree85c9f3bd2f60a948ea177e87aa0ec97fa2d69932 /gcc/stmt.c
parent396b535a72eb44422b3b8f0f1c220b11ab34b24d (diff)
downloadgcc-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/stmt.c')
-rw-r--r--gcc/stmt.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/stmt.c b/gcc/stmt.c
index ad75392..02ec490 100644
--- a/gcc/stmt.c
+++ b/gcc/stmt.c
@@ -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;