public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/26743] New: gcc generates unreachable branch
@ 2006-03-18 10:13 tausq at debian dot org
2006-03-18 10:14 ` [Bug target/26743] " tausq at debian dot org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: tausq at debian dot org @ 2006-03-18 10:13 UTC (permalink / raw)
To: gcc-bugs
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
--
Summary: gcc generates unreachable branch
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: tausq at debian dot org
GCC build triplet: hppa-unknown-linux
GCC host triplet: hppa-unknown-linux
GCC target triplet: hppa-unknown-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26743
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/26743] gcc generates unreachable branch
2006-03-18 10:13 [Bug target/26743] New: gcc generates unreachable branch tausq at debian dot org
@ 2006-03-18 10:14 ` tausq at debian dot org
2006-03-18 15:06 ` pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: tausq at debian dot org @ 2006-03-18 10:14 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from tausq at debian dot org 2006-03-18 10:14 -------
Created an attachment (id=11066)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11066&action=view)
testcase
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26743
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/26743] gcc generates unreachable branch
2006-03-18 10:13 [Bug target/26743] New: gcc generates unreachable branch tausq at debian dot org
2006-03-18 10:14 ` [Bug target/26743] " tausq at debian dot org
@ 2006-03-18 15:06 ` pinskia at gcc dot gnu dot org
2006-03-19 15:52 ` tausq at debian dot org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-03-18 15:06 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2006-03-18 15:06 -------
Looks related to PR 11254.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
BugsThisDependsOn| |11254
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26743
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/26743] gcc generates unreachable branch
2006-03-18 10:13 [Bug target/26743] New: gcc generates unreachable branch tausq at debian dot org
2006-03-18 10:14 ` [Bug target/26743] " tausq at debian dot org
2006-03-18 15:06 ` pinskia at gcc dot gnu dot org
@ 2006-03-19 15:52 ` tausq at debian dot org
2006-03-19 17:09 ` dave at hiauly1 dot hia dot nrc dot ca
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: tausq at debian dot org @ 2006-03-19 15:52 UTC (permalink / raw)
To: gcc-bugs
------- 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.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26743
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/26743] gcc generates unreachable branch
2006-03-18 10:13 [Bug target/26743] New: gcc generates unreachable branch tausq at debian dot org
` (2 preceding siblings ...)
2006-03-19 15:52 ` tausq at debian dot org
@ 2006-03-19 17:09 ` dave at hiauly1 dot hia dot nrc dot ca
2006-04-09 17:19 ` danglin at gcc dot gnu dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: dave at hiauly1 dot hia dot nrc dot ca @ 2006-03-19 17:09 UTC (permalink / raw)
To: gcc-bugs
------- 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
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/26743] gcc generates unreachable branch
2006-03-18 10:13 [Bug target/26743] New: gcc generates unreachable branch tausq at debian dot org
` (3 preceding siblings ...)
2006-03-19 17:09 ` dave at hiauly1 dot hia dot nrc dot ca
@ 2006-04-09 17:19 ` danglin at gcc dot gnu dot org
2006-04-09 17:42 ` danglin at gcc dot gnu dot org
2006-04-12 1:23 ` pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: danglin at gcc dot gnu dot org @ 2006-04-09 17:19 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from danglin at gcc dot gnu dot org 2006-04-09 17:19 -------
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
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26743
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/26743] gcc generates unreachable branch
2006-03-18 10:13 [Bug target/26743] New: gcc generates unreachable branch tausq at debian dot org
` (4 preceding siblings ...)
2006-04-09 17:19 ` danglin at gcc dot gnu dot org
@ 2006-04-09 17:42 ` danglin at gcc dot gnu dot org
2006-04-12 1:23 ` pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: danglin at gcc dot gnu dot org @ 2006-04-09 17:42 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from danglin at gcc dot gnu dot org 2006-04-09 17:42 -------
Fixed on trunk (hopefully).
--
danglin at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26743
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug target/26743] gcc generates unreachable branch
2006-03-18 10:13 [Bug target/26743] New: gcc generates unreachable branch tausq at debian dot org
` (5 preceding siblings ...)
2006-04-09 17:42 ` danglin at gcc dot gnu dot org
@ 2006-04-12 1:23 ` pinskia at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-04-12 1:23 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.2.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26743
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2006-04-12 1:23 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-18 10:13 [Bug target/26743] New: gcc generates unreachable branch tausq at debian dot org
2006-03-18 10:14 ` [Bug target/26743] " tausq at debian dot org
2006-03-18 15:06 ` pinskia at gcc dot gnu dot org
2006-03-19 15:52 ` tausq at debian dot org
2006-03-19 17:09 ` dave at hiauly1 dot hia dot nrc dot ca
2006-04-09 17:19 ` danglin at gcc dot gnu dot org
2006-04-09 17:42 ` danglin at gcc dot gnu dot org
2006-04-12 1:23 ` pinskia at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).