From: Richard Biener Date: Wed, 11 Aug 2021 14:28:33 +0000 (+0200) Subject: Fix gcc.dg/lto/pr48622_0.c testcase X-Git-Tag: basepoints/gcc-13~5458 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cba64d855df581cc26fa487162027138aef4dbe5;p=thirdparty%2Fgcc.git 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. --- 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) +{ +}