This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: VAX Ultrix bootstrap with gcc-2.96 20000519: genrecog failure


> > The problem is due to the code generated for the return of the struct head
> > in make_insn_sequence:
> > 
> > L740:
> >         .stabd 68,0,2434
> > 	movq -12(fp),LF126
> > 	.stabd 68,0,2435
> > LBE47:
> > 	ret

With further study using a small test program, it appears the rtl to
load the return address into r0 is deleted during the data flow analysis
stage.

Here is the rtl from cse2:

(note 48 47 49 ("xxx.c") 21 0)

(insn 49 48 52 (set (mem/s:DI (symbol_ref:SI ("*LF0")) 0)
        (reg/v:DI 27)) 17 {movdi} (nil)
    (nil))

(note 52 49 53 ("xxx.c") 22 0)

(note 53 52 57 001cd660 NOTE_INSN_BLOCK_END 0)

(insn 57 53 58 (set (reg/i:SI 0 r0)
        (symbol_ref:SI ("*LF0"))) 18 {movsi} (nil)
    (expr_list:REG_EQUAL (symbol_ref:SI ("*LF0"))
        (nil)))

(jump_insn 58 57 59 (return) -1 (nil)
    (nil))

(barrier 59 58 0)

Here is the rtl after flow:

(note 48 42 49 ("xxx.c") 21 0)

(insn 49 48 52 (set (mem/s:DI (symbol_ref:SI ("*LF0")) 0)
        (reg/v:DI 27)) 17 {movdi} (nil)
    (expr_list:REG_DEAD (reg/v:DI 27)
        (nil)))

(note 52 49 53 ("xxx.c") 22 0)

(note 53 52 58 001cd660 NOTE_INSN_BLOCK_END 0)

(jump_insn 58 53 59 (return) -1 (nil)
    (nil))
;; End of basic block 0, registers live:
 13 [fp] 14 [sp]

(barrier 59 58 0)

Dave
-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)

Test program:

struct a {
  int x;
  int y;
};

int g(struct a);

struct a f() {
  int i, j, k, l, m, n;
  struct a head;

  head.x = 2;
  head.y = 3;
  i = g(head);
  j = g(head);
  k = g(head);
  l = g(head);
  m = g(head);
  n = g(head);
  i = i*j*k*l*m*n;
  return head;
}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]