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]
Other format: [Raw text]

[Bug target/61300] powerpc64le miscompile with K&R-style function definition at -O0


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61300

--- Comment #7 from Alan Modra <amodra at gmail dot com> ---
No, I don't believe there is a convenient way we can look at the
REG_PARM_STACK_SPACE argument to determine whether it was used for a call or
for a function body.  (I did think it might be possible, hence my comment #2,
but that was remembering the situation from way back before
TYPE_ACTUAL_ARG_TYPES became private to C lang tree nodes.)

function.c (function body case) always passes the function decl as the
argument.  calls.c (call case) sometimes passes a function decl, and sometimes
a function type.  If calls.c always passed a type it would be easy..  A cursory
glance over all target defines of REG_PARM_STACK_SPACE says that it should be
possible to change calls.c to do this.  Is that a better design change than
defining INCOMING_REG_PARM_STACK_SPACE?  I don't think so..


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