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]

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



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

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