Hi,
The attached patch fixes PR 81819, which popped up on GCC 7. I assume
it's also there on trunk, but can't build my app with trunk compiler
because it's got other issues.
Unfortunately I can't add the reproducer test case since it happens
only when building a bigger app with LTO. But I have confirmed that
with this fix the app builds and runs.
OK for trunk and GCC 7?
Cheers,
Oleg
gcc/ChangeLog:
PR target/81819
* config/rx/rx.c (rx_is_restricted_memory_address):
Handle SUBREG case.
Index: gcc/config/rx/rx.c
===================================================================
--- gcc/config/rx/rx.c (revision 256385)
+++ gcc/config/rx/rx.c (working copy)
@@ -284,6 +284,9 @@
/* Simple memory addresses are OK. */
return true;
+ case SUBREG:
+ return RX_REG_P (SUBREG_REG (mem));
+
case PRE_DEC:
case POST_INC:
return false;