On May 31, 2013, at 2:56 PM, Andrew Pinski <pinskia@gmail.com> wrote:
> This will only fix the GCC source but not other sources which does:> void f(void)> {> __builtin_unreachable();> }
Yes. Speaking of which, so how should this be handled? Imagine we have asm("# no bytes") before the unreachable. The compiler can't know the size (though, the linker can), and yet, a good solution handles this as well. Hopefully a dwarf person can weigh in, as engineering a bad solution is worse than leaving it broken in my book.

On Sat, Jun 1, 2013 at 12:28 AM, Mike Stump <mikestump@comcast.net> wrote:
> On May 31, 2013, at 2:56 PM, Andrew Pinski <pinskia@gmail.com> wrote:>> This will only fix the GCC source but not other sources which does:>> void f(void)>> {>> __builtin_unreachable();>> }>> Yes. Speaking of which, so how should this be handled? Imagine we have asm("# no bytes") before the unreachable. The compiler can't know the size (though, the linker can), and yet, a good solution handles this as well. Hopefully a dwarf person can weigh in, as engineering a bad solution is worse than leaving it broken in my book.
Let the assembler compute it as difference of two labels?
Richard.

On Jun 3, 2013, at 1:27 AM, Richard Biener <richard.guenther@gmail.com> wrote:
>> Yes. Speaking of which, so how should this be handled? Imagine we have asm("# no bytes") before the unreachable. The compiler can't know the size (though, the linker can), and yet, a good solution handles this as well. Hopefully a dwarf person can weigh in, as engineering a bad solution is worse than leaving it broken in my book.> > Let the assembler compute it as difference of two labels?
We do use two labels, one for the start, one for the end.