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: [PATCH] Fortran -- clean up KILL


On Thu, Mar 15, 2018 at 03:45:47PM +0000, Bin.Cheng wrote:
> FYI,  both your patches fix the compilation issue.

It isn't just a compilation problem, it really can't work at all.
Without the patch, if the function builds, it looks like:
00000000002308b0 <_gfortran_kill>:
  2308b0:       f3 0f 1e fa             endbr64 
  2308b4:       48 83 ec 08             sub    $0x8,%rsp
  2308b8:       e8 f3 ff ff ff          callq  2308b0 <_gfortran_kill>
  2308bd:       85 c0                   test   %eax,%eax
  2308bf:       74 07                   je     2308c8 <_gfortran_kill+0x18>
  2308c1:       e8 4a 92 de ff          callq  19b10 <__errno_location@plt>
  2308c6:       8b 00                   mov    (%rax),%eax
  2308c8:       48 83 c4 08             add    $0x8,%rsp
  2308cc:       c3                      retq   
  2308cd:       0f 1f 00                nopl   (%rax)
i.e. there is endless recursion, it doesn't call the libc kill, but itself.

	Jakub


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