On Wed, Nov 06, 2013 at 04:23:06PM +0100, Richard Biener wrote: > > In that case I think it would be fine to run the isolate paths > > optimization, but to not omit the actual dereference of the NULL > > pointer (possibly the dereference could be followed by a trap). > > Yeah, we need the trap to properly end the BB (even if that is a > waste instruction generated).
BTW, why do we generate in this optimization __builtin_trap rather than just __builtin_unreachable ()? The former still generates some code (abort, some aborting instruction, ...), while the former is just an assertion that valid code will not reach it. Jakub