[Bug c/64459] __attribute__((returns_nonnull)) creates wrong code on amd64

rurban@x-ray.at gcc-bugzilla@gcc.gnu.org
Thu Jan 1 00:36:00 GMT 2015


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

Reini Urban <rurban@x-ray.at> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|---                         |INVALID

--- Comment #3 from Reini Urban <rurban@x-ray.at> ---
This ticket can be closed, not a bug.

My test script finished after some hours of grinding, 
which tested all of the 992 returns_nonnull annotated functions in parrot.
Disabling returns_nonnull on one function made it work. 
I've checked the assembly.

It was Parrot_cx_check_scheduler(), which had a wrong 
if (Parrot_cx_check_scheduler(...) == 0)
check, and consequently this branch was removed by gcc.

So it's really a missed clang and msvc dead-code removal opportunity.



More information about the Gcc-bugs mailing list