re PR bootstrap/4192 (fr30-elf does not build - memory exhausted building crtbegin.o)
PR bootstrap/4192 * config/fr30/fr30.md (jump): Comment out clobber of fixed register. * genemit.c (output_added_clobbers_hard_reg_p): Only output return stmt if some case has been output. * gcc.c-torture/compile/20020320-1.c: New test. From-SVN: r51088
This commit is contained in:
parent
048b1c951b
commit
a29b099d7a
5 changed files with 49 additions and 5 deletions
|
@ -1,3 +1,11 @@
|
|||
2002-03-20 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR bootstrap/4192
|
||||
* config/fr30/fr30.md (jump): Comment out clobber of fixed register.
|
||||
|
||||
* genemit.c (output_added_clobbers_hard_reg_p): Only output return
|
||||
stmt if some case has been output.
|
||||
|
||||
2002-03-20 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c/5972
|
||||
|
|
|
@ -1303,9 +1303,12 @@
|
|||
;; Normal unconditional jump.
|
||||
;; For a description of the computation of the length
|
||||
;; attribute see the branch patterns above.
|
||||
;;
|
||||
;; Although this instruction really clobbers r0, flow
|
||||
;; relies on jump being simplejump_p in several places
|
||||
;; and as r0 is fixed, this doesn't change anything
|
||||
(define_insn "jump"
|
||||
[(set (pc) (label_ref (match_operand 0 "" "")))
|
||||
(clobber (reg:SI 0))]
|
||||
[(set (pc) (label_ref (match_operand 0 "" "")))]
|
||||
""
|
||||
"*
|
||||
{
|
||||
|
|
|
@ -722,7 +722,7 @@ output_added_clobbers_hard_reg_p ()
|
|||
{
|
||||
struct clobber_pat *clobber;
|
||||
struct clobber_ent *ent;
|
||||
int clobber_p;
|
||||
int clobber_p, used;
|
||||
|
||||
printf ("\n\nint\nadded_clobbers_hard_reg_p (insn_code_number)\n");
|
||||
printf (" int insn_code_number;\n");
|
||||
|
@ -732,12 +732,17 @@ output_added_clobbers_hard_reg_p ()
|
|||
|
||||
for (clobber_p = 0; clobber_p <= 1; clobber_p++)
|
||||
{
|
||||
used = 0;
|
||||
for (clobber = clobber_list; clobber; clobber = clobber->next)
|
||||
if (clobber->has_hard_reg == clobber_p)
|
||||
for (ent = clobber->insns; ent; ent = ent->next)
|
||||
printf (" case %d:\n", ent->code_number);
|
||||
{
|
||||
printf (" case %d:\n", ent->code_number);
|
||||
used++;
|
||||
}
|
||||
|
||||
printf (" return %d;\n\n", clobber_p);
|
||||
if (used)
|
||||
printf (" return %d;\n\n", clobber_p);
|
||||
}
|
||||
|
||||
printf (" default:\n");
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2002-03-20 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* gcc.c-torture/compile/20020320-1.c: New test.
|
||||
|
||||
2002-03-19 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* gcc.c-torture/compile/20020318-1.c: New test.
|
||||
|
|
24
gcc/testsuite/gcc.c-torture/compile/20020320-1.c
Normal file
24
gcc/testsuite/gcc.c-torture/compile/20020320-1.c
Normal file
|
@ -0,0 +1,24 @@
|
|||
/* PR bootstrap/4192
|
||||
This testcase caused infinite loop in flow (several places),
|
||||
because flow assumes gen_jump generates simple_jump_p. */
|
||||
|
||||
typedef void (*T) (void);
|
||||
extern T x[];
|
||||
|
||||
void
|
||||
foo (void)
|
||||
{
|
||||
static T *p = x;
|
||||
static _Bool a;
|
||||
T f;
|
||||
|
||||
if (__builtin_expect (a, 0))
|
||||
return;
|
||||
|
||||
while ((f = *p))
|
||||
{
|
||||
p++;
|
||||
f ();
|
||||
}
|
||||
a = 1;
|
||||
}
|
Loading…
Add table
Reference in a new issue