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]
Other format: [Raw text]

Re: target/5977: ia64 corruption in struct args passed by value


Synopsis: ia64 corruption in struct args passed by value

Responsible-Changed-From-To: jakub->rth
Responsible-Changed-By: jakub
Responsible-Changed-When: Sun Mar 17 13:36:47 2002
Responsible-Changed-Why:
    This got broken by http://gcc.gnu.org/ml/gcc-patches/2002-03/msg00056.html
    virtual_incoming_arg_rtx accesses are created by move_block_from_reg
    called from function.c (assign_parms) [FUNCTION_ARG_PARTIAL_NREGS].
    If the va-arg-5.c case cannot be solved in another way,
    setting FIRST_PARM_OFFSET to -current_function_pretend_args_size
    and ARG_POINTER_CFA_OFFSET to 0, though I'm not sure whether
    fix_lexical_addr would work properly in that case.
    
State-Changed-From-To: open->analyzed
State-Changed-By: jakub
State-Changed-When: Sun Mar 17 13:36:47 2002
State-Changed-Why:
    Slightly shorter testcase
    struct S { int i[9]; };
    
    struct S gs1, gs2;
    
    void
    init (struct S *p, int i)
    {
      int j;
      for (j = 0; j < 9; j++)
        p->i[j] = i + j;
    }
    
    void
    check (struct S *p, int i)
    {
      int j;
      for (j = 0; j < 9; j++)
        if (p->i[j] != i + j) abort ();
    }
    
    void
    bar (struct S s1, struct S s2)
    {
      check (&s1, 10);
      check (&s2, 20);
    }
    
    int
    main ()
    {
      init (&gs1, 10);
      check (&gs1, 10);
      init (&gs2, 20);
      check (&gs2, 20);
      bar (gs1, gs2);
    
      exit (0);
    }

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5977


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