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]

IMPORTANT: m68k pic broken for floating point


Unless I've made something very wrong, m68k -fpic is *completely* broken,
currently. There are some fairly large bugs in floating point support.

This is the smallest testcase I've had yet.  Contrarily to other testcases,
this one *always* fails, even without optimization.

I don't know what's going on, but this is probably awfully easy to solve
for someone who knows rtl.


Disarmingly small (breaks X11, BTW)

cc -fpic oink.c
oink.c: In function `f':
oink.c:4: internal error--unrecognizable insn:
(insn 21 19 7 (set (reg:DF 16 fp0)
        (const_double:DF (mem/u:DF (symbol_ref/u:SI ("*LC0")) 0) 53248 [0xd000] -858993460 [0xcccccccc] -1932771329 [0x8ccc3fff])) -1 (nil)
    (nil))

cc -v
Reading specs from /usr/lib/gcc-lib/m68k-unknown-openbsd2.5/egcs-2.93.22/specs
gcc version egcs-2.93.22 19990517 (gcc2 ss-980929 experimental)

----- oink.c 
double f (double x)
{
        return 1.1 -x;
}

This seems to occur ONLY for some constants (replacing 1.1 with 1.0 removes
the bug).  

Replacing 1.1 -x with 1.1+x kills the problem.


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