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]

[PTR-PLUS] Fix PA and FRV build


Hi,
  This fixes some of PA-risc's build/bootstrap and some of FRV's 
testcases.  I was testing using a file which containing a function with a 
call to va_start, va_end, and va_arg.  The problem with the FRV was that 
their expand va_start used a pointer type with make_tree which caused a 
crash when creating a PLUS_EXPR.  The problem with PA was two parts 
(though I can't test the first part that well), the first part is that 
reloc_needed did not handle POINTER_PLUS_EXPR (though this was not needed 
to get the test file working but it is going to be needed later on).  The 
second issue is just the normal gimplify_va_arg_expr issues with using 
PLUS_EXPR instead of POINTER_PLUS_EXPR and trying to build a BIT_AND_EXPR 
on a pointer type.

Committed to the branch after a quick test for the simple testcase on both 
hppa-hpux11.0 and frv-elf.

It would be nice if someone could really test this branch on this two 
targets.

Thanks,
Andrew Pinski

ChangeLog:

        * config/frv/frv.c (frv_expand_builtin_va_start): Use sizetype
        with make_tree.
        * config/pa/pa.c (reloc_needed): Handle POINTER_PLUS_EXPR
        as PLUS_EXPR/MINUS_EXPR.
        (hppa_gimplify_va_arg_expr): Don't create MINUS_EXPR or
        PLUS_EXPR for pointers, instead use POINTER_PLUS_EXPR.
        Don't use BIT_AND_EXPR on a pointer type, convert the
        expression to sizetype first.

Attachment: fixpafrv.diff.txt
Description: Text document


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