From 667afe5a49ccb73947c6b895780d266f4a4dac73 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Tue, 11 Feb 2020 10:56:03 +0100 Subject: [PATCH] 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. --- gcc/testsuite/gcc.dg/pr93661.c | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/pr93661.c 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); +} -- 2.30.2