+2003-01-25 Jan Hubicka <jh@suse.cz>
+
+ PR fortran/9258
+ * global.c (struct allocno): Add no_stack_reg.
+ (global_conflicts): Set no_stack_reg.
+ (find_reg): Use it.
+
2003-01-24 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
* doc/passes.texi: Fix typo.
/* Set of hard registers that some later allocno has a preference for. */
HARD_REG_SET regs_someone_prefers;
+
+#ifdef STACK_REGS
+ /* Set to true if allocno can't be allocated in the stack register. */
+ bool no_stack_reg;
+#endif
};
static struct allocno *allocno;
if (e->flags & EDGE_ABNORMAL)
break;
if (e != NULL)
- for (ax = FIRST_STACK_REG; ax <= LAST_STACK_REG; ax++)
- record_one_conflict (ax);
+ {
+ EXECUTE_IF_SET_IN_ALLOCNO_SET (allocnos_live, ax,
+ {
+ allocno[ax].no_stack_reg = 1;
+ });
+ for (ax = FIRST_STACK_REG; ax <= LAST_STACK_REG; ax++)
+ record_one_conflict (ax);
+ }
}
#endif
}
&& (TEST_HARD_REG_BIT
(reg_class_contents[(int) CLASS_CANNOT_CHANGE_MODE],
regno)))
+#endif
+#ifdef STACK_REGS
+ && (!allocno[num].no_stack_reg
+ || regno < FIRST_STACK_REG || regno > LAST_STACK_REG)
#endif
)
{
--- /dev/null
+C Test case for PR fortran/9258
+C Origin: kmccarty@Princeton.EDU
+C
+C { dg-do compile }
+ SUBROUTINE FOO (B)
+
+ 10 CALL BAR(A)
+ ASSIGN 20 TO M
+ IF(100.LT.A) GOTO 10
+ GOTO 40
+C
+ 20 IF(B.LT.ABS(A)) GOTO 10
+ ASSIGN 30 TO M
+ GOTO 40
+C
+ 30 ASSIGN 10 TO M
+ 40 GOTO M,(10,20,30)
+ END