To followup myself. I'd rather do this at tree-ssa level, disallowing
side-effects in the __builtin_false() arguments (as this would not only
compilcate implementation, but also is asking for trouble).
My intended approach in tree-ssa would be to expand
__builtin_assert (x)
to
if (__builtin_false () && !x)
abort ();
Now the tree optimizers would know nil about __builtin_false () and assume x
in the rest of the code; at expansion time __builtin_false () would be 0 (like
when expanding __builtin_constant_p) and the RTL dead code elimination would
kill the if and more importantly the evaluation of x.