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/stmt.c | |
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/stmt.c')
-rw-r--r-- | gcc/stmt.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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; |