@@ -3960,7 +3960,7 @@ find_reloads (rtx_insn *insn, int replace, int ind_levels, int live_known,
there will be no reload needed at all. */
if (plus == NULL_RTX
&& subreg == NULL_RTX
- && alternative_allows_const_pool_ref (this_address_reloaded == 0
+ && alternative_allows_const_pool_ref (this_address_reloaded != 1
? substed_operand[i]
: NULL,
recog_data.constraints[i],
@@ -4605,8 +4605,8 @@ find_reloads (rtx_insn *insn, int replace, int ind_levels, int live_known,
/* Return true if alternative number ALTNUM in constraint-string
CONSTRAINT is guaranteed to accept a reloaded constant-pool reference.
- MEM gives the reference if it didn't need any reloads, otherwise it
- is null. */
+ MEM gives the reference if its address hasn't been fully reloaded,
+ otherwise it is NULL. */
static bool
alternative_allows_const_pool_ref (rtx mem ATTRIBUTE_UNUSED,
new file mode 100644
@@ -0,0 +1,29 @@
+void fn2(void);
+void fn3(unsigned long);
+
+signed char a;
+int b, c, e, f;
+float *d;
+
+void fn1(void) {
+ unsigned short g = 0;
+lbl_986:
+ for (;;) {
+ c = 0;
+ for (; c <= 2;) {
+ *d = g;
+ fn2();
+ if (e)
+ goto lbl_986;
+ }
+ g = 2;
+ for (; (short) g >= 0; g--) {
+ for (; b;) {
+ fn3(45360);
+ f = 0;
+ for (; a >= 0; a--)
+ ;
+ }
+ }
+ }
+}