This adds a reduced test case for one of the remaining failing LRA cases. Committed to master.
Best regards, Oleg Endo
From af502246f427f62fff185fceaca2178cbba9a2df Mon Sep 17 00:00:00 2001 From: Oleg Endo <[email protected]> Date: Fri, 3 Jul 2026 14:13:29 +0900 Subject: [PATCH] SH: Add another test case for LRA gcc/testsuite/ChangeLog: PR target/124778 * gcc.target/sh/torture/pr124778.c: New test. --- gcc/testsuite/gcc.target/sh/torture/pr124778.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 gcc/testsuite/gcc.target/sh/torture/pr124778.c diff --git a/gcc/testsuite/gcc.target/sh/torture/pr124778.c b/gcc/testsuite/gcc.target/sh/torture/pr124778.c new file mode 100644 index 0000000..17834ee --- /dev/null +++ b/gcc/testsuite/gcc.target/sh/torture/pr124778.c @@ -0,0 +1,17 @@ +/* { dg-do compile } */ +/* { dg-additional-options "-std=gnu99" } */ +/* This used to trigger an ICE in decompose_multiword_subregs at -O2. */ + +long long g; + +void +f (unsigned n, char *p) +{ + long long size = 4 + (long long)n; + while (size >= 4) + { + size -= 4; + p += 4; + } + g += *(unsigned short *)p; +} -- libgit2 1.9.0
