diff options
author | Richard Biener <rguenther@suse.de> | 2021-10-20 12:54:59 +0200 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2021-10-20 13:48:35 +0200 |
commit | ac5e46563817f4f1bd786be1d21b85d18e61bc0c (patch) | |
tree | 65dd0c41f77b81b7d56abb34e2983f82e47b9af1 /gcc/tree-data-ref.c | |
parent | 6fca1761a16c68740f875fc487b98b6bde8e9be7 (diff) | |
download | gcc-ac5e46563817f4f1bd786be1d21b85d18e61bc0c.zip gcc-ac5e46563817f4f1bd786be1d21b85d18e61bc0c.tar.gz gcc-ac5e46563817f4f1bd786be1d21b85d18e61bc0c.tar.bz2 |
tree-optimization/102853 - avoid trapping types in split_constant_offset
This avoids running into the assert in compute_distributive_range when
starting the analysis with operations in a trapping type.
2021-10-20 Richard Biener <rguenther@suse.de>
PR tree-optimization/102853
* tree-data-ref.c (split_constant_offset_1): Bail out
immediately if the expression traps on overflow.
Diffstat (limited to 'gcc/tree-data-ref.c')
-rw-r--r-- | gcc/tree-data-ref.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/tree-data-ref.c b/gcc/tree-data-ref.c index 57bac06..46f4ffe 100644 --- a/gcc/tree-data-ref.c +++ b/gcc/tree-data-ref.c @@ -757,6 +757,9 @@ split_constant_offset_1 (tree type, tree op0, enum tree_code code, tree op1, *var = NULL_TREE; *off = NULL_TREE; + if (INTEGRAL_TYPE_P (type) && TYPE_OVERFLOW_TRAPS (type)) + return false; + switch (code) { case INTEGER_CST: |