public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Fix gcc.dg/lto/pr48622_0.c testcase
@ 2021-08-11 14:30 Richard Biener
  0 siblings, 0 replies; only message in thread
From: Richard Biener @ 2021-08-11 14:30 UTC (permalink / raw)
  To: gcc-patches

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.

Tested on x86_64-unknown-linux-gnu, pushed.

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 | 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 00000000000..4d05bae2114
--- /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.31.1

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-11 14:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-11 14:30 [PATCH] Fix gcc.dg/lto/pr48622_0.c testcase Richard Biener

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).