This is the mail archive of the gcc-bugs@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]

middle-end/2780: Gcc 2.95 pic code gen problem for m68k- targets



>Number:         2780
>Category:       middle-end
>Synopsis:       Gcc 2.95 pic code gen problem for m68k- targets
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          wrong-code
>Submitter-Id:   net
>Arrival-Date:   Tue May 08 15:46:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Paul Dale
>Release:        gcc version 2.95.3 20010315 (release)
>Organization:
>Environment:
Red Hat 7 on i686 with 2.2 Linux Kernel
Clean build of 2.95.3 m68k cross compiler with these configure options:
    --target=m68k-elf --prefix=/usr/local -v
>Description:
The m68k compiler produces incorrect branch code when -fpic is
specified and the target is below a 68020 (in my example,
I'm building for a -m5200 target, the same problem exists
for -m68000).

The trouble is that the compiler is producing jbra (and
equivalent conditional) branch instructions which for
pre-68020 targets will be turned into absolute jump
instructions when the branch offset is too large (>32k).
The result is a jump to an unrelated (random?) address.

No error messages are produced either by gcc or gas.
>How-To-Repeat:
begin 664 details.tgz
M'XL(`%9Q^#H``^U::T_<1A3EZ_I77$&E[@;\WK67;%(I36F*U-"(TF^5T-B>
M94>U/8X?L*LJ_[UW//824C:4E@VAND>P?MS'W+D^<\:L.&WRG6W#<1TG",8[
MCH-G;OCQ4<'S'6_'";TP<$)G'#C*?S+Q=\#9>F6(IJI9";!3L"85G_&[R_Y$
M\0W8"YEQ^R*.[:@1:6*J,_6[Q`\PO]]D!A.M%;OD9LVSHH*EA=?9Q',<,.>%
MP(M+XY2S1.074!4\KF!>RFSC:*V+H8:\Y&4E9`Z>=3BQ?/`467QW`L.2IYQ5
M?&1L3!(7!8Z>LOQ"%7<)IJA6%9:W,4#D<=HD',P?SL_?G/SV^OS\I7=]\?;X
MY)=3O'4XP7M9'$P=-3FT\BSB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