[Bug debug/38367] [4.1/4.2/4.3/4.4 regression] Wrong debug information for big endian function parameters

jakub at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Wed Dec 3 12:13:00 GMT 2008



------- Comment #3 from jakub at gcc dot gnu dot org  2008-12-03 12:12 -------
I'd say the bug is in assign_parm_find_stack_rtl:

  stack_parm = crtl->args.internal_arg_pointer;
  if (offset_rtx != const0_rtx)
    stack_parm = gen_rtx_PLUS (Pmode, stack_parm, offset_rtx);   
  stack_parm = gen_rtx_MEM (data->promoted_mode, stack_parm);

  set_mem_attributes (stack_parm, parm, 1);
  /* set_mem_attributes could set MEM_SIZE to the passed mode's size,
     while promoted mode's size is needed.  */
  if (data->promoted_mode != BLKmode
      && data->promoted_mode != DECL_MODE (parm))
    set_mem_size (stack_parm, GEN_INT (GET_MODE_SIZE (data->promoted_mode)));

In addition to setting MEM_SIZE it should also set MEM_OFFSET.


-- 

jakub at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |jakub at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2008-12-02 20:24:57         |2008-12-03 12:12:26
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38367



More information about the Gcc-bugs mailing list