From: Richard Biener Date: Tue, 11 Feb 2020 09:56:03 +0000 (+0100) Subject: tree-optimization/93661 properly guard tree_to_poly_int64 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=667afe5a49ccb73947c6b895780d266f4a4dac73;p=gcc.git tree-optimization/93661 properly guard tree_to_poly_int64 2020-02-11 Richard Biener PR tree-optimization/93661 PR tree-optimization/93662 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly guard tree_to_poly_int64. * tree-sra.c (get_access_for_expr): Likewise. * gcc.dg/pr93661.c: New testcase. --- diff --git a/gcc/testsuite/gcc.dg/pr93661.c b/gcc/testsuite/gcc.dg/pr93661.c new file mode 100644 index 00000000000..e311ba545c4 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr93661.c @@ -0,0 +1,9 @@ +/* { dg-do compile } */ +/* { dg-options "-O2" } */ + +int f () +{ + unsigned x = 0xffffffff; + __builtin_memset (1+(char *) &x, 0, -1); /* { dg-warning "maximum object size" } */ + return (x != 0xf0000000); +}