diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-02-23 22:47:58 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-02-23 22:47:58 +0000 |
commit | f064ebd17debbb055d5cb445176fea22ea1eedbb (patch) | |
tree | 1b539335ba44456341fd10899dfa31baedc3dcf5 /gcc/tree-vrp.c | |
parent | 93a3600c5a7d9d2af8cb566a6550145aff1d05be (diff) | |
download | gcc-f064ebd17debbb055d5cb445176fea22ea1eedbb.tar.gz |
PR tree-optimization/26425
* tree-vrp.c (vrp_visit_assignment): If the LHS's type has a NULL
min/max, then assume its varying.
* gcc.c-torture/compile/pr26425.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@111399 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-vrp.c')
-rw-r--r-- | gcc/tree-vrp.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c index 911ccb2e632..c0fb35a9e88 100644 --- a/gcc/tree-vrp.c +++ b/gcc/tree-vrp.c @@ -3375,7 +3375,11 @@ vrp_visit_assignment (tree stmt, tree *output_p) /* We only keep track of ranges in integral and pointer types. */ if (TREE_CODE (lhs) == SSA_NAME - && (INTEGRAL_TYPE_P (TREE_TYPE (lhs)) + && ((INTEGRAL_TYPE_P (TREE_TYPE (lhs)) + /* It is valid to have NULL MIN/MAX values on a type. See + build_range_type. */ + && TYPE_MIN_VALUE (TREE_TYPE (lhs)) + && TYPE_MAX_VALUE (TREE_TYPE (lhs))) || POINTER_TYPE_P (TREE_TYPE (lhs)))) { struct loop *l; |