This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
RE: Bug! when a function is the parameter of another function.
- To: "Martin v. Loewis" <martin at loewis dot home dot cs dot tu-berlin dot de>, <gcc-bugs at gcc dot gnu dot org>
- Subject: RE: Bug! when a function is the parameter of another function.
- From: "Peng-Sheng Chen" <pschen at puma dot cs dot nthu dot edu dot tw>
- Date: Mon, 6 Mar 2000 11:48:25 +0800
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