From cba64d855df581cc26fa487162027138aef4dbe5 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Wed, 11 Aug 2021 16:28:33 +0200 Subject: [PATCH] Fix gcc.dg/lto/pr48622_0.c testcase This fixes the testcase to not rely on the reference to ashift_qi_1 being optimized out by RTL optimization via help of the initregs pass that changes comparisons of uninitialized data with a comparison that is always false. 2021-08-11 Richard Biener * gcc.dg/lto/pr48622_1.c: Provide non-LTO definition of ashift_qi_1. --- gcc/testsuite/gcc.dg/lto/pr48622_1.c | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/lto/pr48622_1.c diff --git a/gcc/testsuite/gcc.dg/lto/pr48622_1.c b/gcc/testsuite/gcc.dg/lto/pr48622_1.c new file mode 100644 index 000000000000..4d05bae21148 --- /dev/null +++ b/gcc/testsuite/gcc.dg/lto/pr48622_1.c @@ -0,0 +1,6 @@ +/* { dg-options "-fno-lto" } */ + +typedef unsigned int u8 __attribute__ ((mode (QI))); +u8 ashift_qi_1 (u8) +{ +} -- 2.47.2