gcc -O2 -c hamlibperl_wrap.i gives: /tmp/ccxskRBB.s: Assembler messages: /tmp/ccxskRBB.s:232018: Error: Field out of range [-262144..262143] (319532). /tmp/ccxskRBB.s:312290: Error: Field out of range [-262144..262143] (-320952). The problem happens with gcc-3.3.6, gcc-3.4.5, gcc-4.0.3 and gcc-4.1.0
Created attachment 11066 [details] testcase
Looks related to PR 11254.
I think this is a bit different, the bit of code that causes the problem is: 339796 .loc 1 38663 0 339797 or,<> %r28,%r0,%r3 339798 b .L25049 339799 copy %r4,%r19 This bit of code is (I think) generated by output_movb() in pa.c, which doesn't check if the branch target is reachable.
Subject: Re: gcc generates unreachable branch > ------- Comment #3 from tausq at debian dot org 2006-03-19 15:52 ------- > I think this is a bit different, the bit of code that causes the problem is: > > 339796 .loc 1 38663 0 > 339797 or,<> %r28,%r0,%r3 > 339798 b .L25049 > 339799 copy %r4,%r19 > > This bit of code is (I think) generated by output_movb() in pa.c, which doesn't > check if the branch target is reachable. Looks like the same issue. I'm somewhat swamped at the moment. The code in output_cbranch provides an example of how to fix this bug. It was fixed in this patch: 2003-03-18 John David Anglin <dave.anglin@nrc-cnrc.gc.ca> PR 10062 * config/pa/pa-hpux.h (TARGET_HPUX_UNWIND_LIBRARY): Redefine. * pa-protos.h (output_lbranch): New prototype. * pa.c (compute_frame_size): Change size of the frame marker on the 64-bit ports to 48 bytes. (pa_output_function_prologue): Document why SAVE_SP is set. (hppa_expand_prologue): Save previous stack pointer into frame marker on targets which use the hpux unwind library. (output_cbranch): Use output_lbranch. (output_lbranch): New function to output long unconditional branches. * pa.h (TARGET_HPUX_UNWIND_LIBRARY): Define. (STACK_POINTER_OFFSET): Update offset for 48-byte frame marker on 64-bit ports. * pa.md (jump): Use output_lbranch. (allocate_stack): New expander for dynamic stack allocation. A new length alternative may need to be needed to the patterns that use output_movb. Dave
Subject: Bug 26743 Author: danglin Date: Sun Apr 9 17:19:42 2006 New Revision: 112805 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=112805 Log: PR target/26743 PR target/11254 PR target/10274 * pa.md (cbranch patterns): Revise arguments used in calls to output_cbranch, output_bb and output_bvd. Add long branch length attributes. (fbranch patterns): Handle long branches. (jump): Revise length check. Revise arguments for output_lbranch call. Add long branch length attributes. (decrement_and_branch_until_zero): Add long branch length attributes. (output_movb, output_parallel_addb and output_parallel_movb patterns): Likewise. Revise arguments for output_parallel_addb and output_parallel_movb calls. * pa-protos.h (output_cbranch, output_lbranch, output_bb, output_bvb, output_parallel_movb and output_parallel_addb): Update prototypes. * pa.c (output_cbranch): Revise arguments. Correct handling of nullification in long branches. (output_lbranch): Add new argument to control extraction of delay instruction. (output_bb): Handle long branches. (output_bvb, output_dbra, output_movb, output_parallel_movb, output_parallel_addb): Likewise. Modified: trunk/gcc/ChangeLog trunk/gcc/config/pa/pa-protos.h trunk/gcc/config/pa/pa.c trunk/gcc/config/pa/pa.md
Fixed on trunk (hopefully).