This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Fix ICE with __builtin_unreachable() as only statement in a function.
- From: Paolo Bonzini <paolo dot bonzini at gmail dot com>
- To: David Daney <ddaney at caviumnetworks dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 17 Jun 2009 09:33:38 +0200
- Subject: Re: [PATCH] Fix ICE with __builtin_unreachable() as only statement in a function.
- References: <4A37E1EE.email@example.com>
David Daney wrote:
This patch fixed an ICE I found doing additional __builtin_unreachable()
If __builtin_unreachable() is the only statement in a function, the
resulting barrier will be the first non-note insn when doing barrier
cleanup. This causes SIGSEGV in cleanup_barriers. The fix is to check
for NULL before dereferencing.
I think the comment is overkill here. If somebody wonders what it's
for, svn blame plus the testcase will be more than enough to point him
in the right direction.