diff options
-rw-r--r-- | gcc/testsuite/gcc.dg/pr116588.c | 31 | ||||
-rw-r--r-- | gcc/tree-vrp.cc | 1 |
2 files changed, 32 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr116588.c b/gcc/testsuite/gcc.dg/pr116588.c new file mode 100644 index 0000000..677964d --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr116588.c @@ -0,0 +1,31 @@ +/* PR tree-optimization/116588 */ +/* { dg-do run { target bitint575 } } */ +/* { dg-options "-O2 -fno-vect-cost-model -fno-tree-dominator-opts -fno-tree-fre --param=vrp-block-limit=0 -DDEBUG -fdump-tree-vrp2-details" } */ + +int a; +__int128 b, c; + +__int128 +foo (_BitInt (129) e) +{ + _BitInt (129) f = e << (128 - c); + __builtin_memset (&b, a, 4); + __int128 r = e + f; + return r; +} + +int +main () +{ + __int128 x = foo (0); +#ifdef DEBUG + for (unsigned i = 0; i < sizeof (x); i++) + __builtin_printf ("%02x", i[(volatile unsigned char *) &x]); + __builtin_printf("\n"); +#else + if (x) + __builtin_abort(); +#endif +} + +/* { dg-final { scan-tree-dump-not "0 != 0" "vrp2" } } */ diff --git a/gcc/tree-vrp.cc b/gcc/tree-vrp.cc index 23946c5..a19f8ec 100644 --- a/gcc/tree-vrp.cc +++ b/gcc/tree-vrp.cc @@ -1258,6 +1258,7 @@ execute_fast_vrp (struct function *fun, bool final_p) fvrp_folder folder (&dr, final_p); gcc_checking_assert (!fun->x_range_query); + set_all_edges_as_executable (fun); fun->x_range_query = &dr; // Create a relation oracle without transitives. get_range_query (fun)->create_relation_oracle (false); |