This is the mail archive of the gcc-patches@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: [RFC/RFT PATCH, middle end]: Fix PR 34621, [4.3 Regression] gcc.c-torture/execute/va-arg-25.c:32: internal compiler error: in expand_call, at calls.c:2785


On Fri, Feb 15, 2008 at 10:31 AM, Uros Bizjak <ubizjak@gmail.com> wrote:
> On Fri, Feb 15, 2008 at 9:08 AM, Uros Bizjak <ubizjak@gmail.com> wrote:
>
>  >  >  Patch was bootstrapped and regression tested on i686-pc-linux-gnu and
>  >  >  x86_64-pc-linux-gnu. Also, I have compiled and successfully executed
>  >  >  va-arg-25.c with STACK_BOUNDARY set to 128. For added fun, it also works
>  >  >  when integer va-arguments are changed to double, so I'm pretty confident
>  >  >  in this patch.
>  >  >
>  >  >  While I believe that the patch is correct, I don't have
>  >  >  i686-apple-darwin target (or PPC that could also be affected) here to
>  >  >  fully test this change. Volunteers are welcome...
>  >
>  >  To quote Comment #34:
>
>
> >  With the patch in http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00507.html, the
>  >  PR is fixed without regression on intel(32/64 bit) and ppc(32 bit) darwin9.
>  >  I'll post the test results ASAP.
>  >
>  >  ---endquote---
>  >
>  >  OTOH, the test for STACK_BOUNDARY can simply be removed, because
>  >  PARM_BOUNDARY is always equal or smaller than STACK_BOUNDARY. I have checked
>  >  all targets, and this is true everywhere. So the updated patch:

Is this documented?  If so ok, otherwise please add an assert at the
top of the function.

Ok with eventually that change.

Thanks,
Richard.

>  >  2008-02-15  Uros Bizjak  <ubizjak@gmail.com>
>  >
>  >        PR middle-end/34621
>  >        * function.c (pad_to_arg_alignment): Remove test for STACK_BOUNDARY when
>  >        calculating alignment_pad.
>  >
>  >  OK for mainline?
>
>  This time with the patch inlined.
>
>  Uros.
>
>  Index: function.c
>  ===================================================================
>  --- function.c  (revision 132332)
>  +++ function.c  (working copy)
>  @@ -3450,7 +3450,7 @@ pad_to_arg_alignment (struct args_size *
>      sp_offset = 0;
>   #endif
>
>  -  if (boundary > PARM_BOUNDARY && boundary > STACK_BOUNDARY)
>  +  if (boundary > PARM_BOUNDARY)
>      {
>        save_var = offset_ptr->var;
>        save_constant = offset_ptr->constant;
>  @@ -3476,7 +3476,7 @@ pad_to_arg_alignment (struct args_size *
>           offset_ptr->var = size_binop (MINUS_EXPR, rounded, sp_offset_tree);
>           /* ARGS_SIZE_TREE includes constant term.  */
>           offset_ptr->constant = 0;
>  -         if (boundary > PARM_BOUNDARY && boundary > STACK_BOUNDARY)
>  +         if (boundary > PARM_BOUNDARY)
>             alignment_pad->var = size_binop (MINUS_EXPR, offset_ptr->var,
>                                              save_var);
>         }
>  @@ -3488,7 +3488,7 @@ pad_to_arg_alignment (struct args_size *
>   #else
>             CEIL_ROUND (offset_ptr->constant + sp_offset, boundary_in_bytes);
>   #endif
>  -           if (boundary > PARM_BOUNDARY && boundary > STACK_BOUNDARY)
>  +           if (boundary > PARM_BOUNDARY)
>               alignment_pad->constant = offset_ptr->constant - save_constant;
>         }
>      }
>


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