forked from gcc-mirror/gcc
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement operator_pointer_diff::fold_range
prange has no default fold_range processing like irange does, so each pointer specific operator needs to implement its own fold routine. PR tree-optimization/117222 gcc/ * range-op-ptr.cc (operator_pointer_diff::fold_range): New. (operator_pointer_diff::op1_op2_relation_effect): Remove irange variant. (operator_pointer_diff::update_bitmask): Likewise. gcc/testsuite * g++.dg/pr117222.C: New.
- Loading branch information
1 parent
4b0f238
commit 774ad67
Showing
2 changed files
with
36 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// { dg-do compile } | ||
// { dg-require-effective-target c++11 } | ||
// { dg-options "-O3 -fdump-tree-evrp" } | ||
|
||
#include <vector> | ||
int main() | ||
{ | ||
std::vector<int> c {1,2,3,0}; | ||
while(c.size() > 0 && c.back() == 0) | ||
{ | ||
auto sz = c.size() -1; | ||
c.resize(sz); | ||
} | ||
return 0; | ||
} | ||
/* { dg-final { scan-tree-dump "Global Exported.*\[-INF, -1\]\[1, +INF\]" "evrp" } } */ |