This is the mail archive of the gcc-patches@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]

Re: PR 22051


Jeffrey A Law wrote:

Fine.  Change alloca to any other function and we've got the
same problem, and you can no longer depend on the semantics of
alloca returning nonzero.

Since you seem to understand the problem and the solution, would you care to propose a patch? This is a pretty serious wrong-code regression, that I would like to get fixed before 4.0.1.


In the PR, you wrote:

"The only time that is not safe is when the pointer requires canonicalization, which is only an issue for function pointers. The right way to deal with this is to reject the optimization when
presented with a function pointer."


Even that seems pessimistic, as function pointers can be compared with ordinary pointer-equality tests on most architectures with most operating systems.

--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
(916) 791-8304


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