This is the mail archive of the
gcc-patches@gcc.gnu.org
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.6030106@caviumnetworks.com>
David Daney wrote:
This patch fixed an ICE I found doing additional __builtin_unreachable()
testing.
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.
Paolo