Bug! when a function is the parameter of another function.

Peng-Sheng Chen pschen@puma.cs.nthu.edu.tw
Sun Mar 5 19:46:00 GMT 2000


Hello:

    Assume in m68k platform :
    My question is that if I want to produce a position-independent-code,
    the data is based on some register (ex:A5), function label is based on PC.
    GCC produce PIC code that data and function label referenced are based on A5.
    It can't reference correct postion for function that is the parameter of another function in PIC.
    Thanks very much.

							Ps. Chen
-----Original Message-----
From: Martin v. Loewis [ mailto:martin@loewis.home.cs.tu-berlin.de ]
Sent: Monday, March 06, 2000 12:29 AM
To: pschen@puma.cs.nthu.edu.tw
Cc: gcc-bugs@gcc.gnu.org
Subject: Re: Bug! when a function is the parameter of another function.


> func1 is a function pointer, not a data variable, it should produce follow :
>    move.l func1@PLTPC,%d0

Thanks for your bug report. This is not a bug in the compiler; the
generated code is correct; the programs works as it should. Why do you
think the code is incorrect?

Regards,
Martin



More information about the Gcc-bugs mailing list