]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fix gcc.dg/lto/pr48622_0.c testcase
authorRichard Biener <rguenther@suse.de>
Wed, 11 Aug 2021 14:28:33 +0000 (16:28 +0200)
committerRichard Biener <rguenther@suse.de>
Wed, 11 Aug 2021 14:30:36 +0000 (16:30 +0200)
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  <rguenther@suse.de>

* gcc.dg/lto/pr48622_1.c: Provide non-LTO definition
of ashift_qi_1.

gcc/testsuite/gcc.dg/lto/pr48622_1.c [new file with mode: 0644]

diff --git a/gcc/testsuite/gcc.dg/lto/pr48622_1.c b/gcc/testsuite/gcc.dg/lto/pr48622_1.c
new file mode 100644 (file)
index 0000000..4d05bae
--- /dev/null
@@ -0,0 +1,6 @@
+/* { dg-options "-fno-lto" } */
+
+typedef unsigned int u8 __attribute__ ((mode (QI)));
+u8 ashift_qi_1 (u8)
+{
+}