This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/26743] gcc generates unreachable branch
- From: "dave at hiauly1 dot hia dot nrc dot ca" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Mar 2006 17:09:02 -0000
- Subject: [Bug target/26743] gcc generates unreachable branch
- References: <bug-26743-581@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from dave at hiauly1 dot hia dot nrc dot ca 2006-03-19 17:09 -------
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
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26743