https://bugs.freedesktop.org/show_bug.cgi?id=105218
--- Comment #5 from Timothy Arceri t_arceri@yahoo.com.au --- Ok built it correctly this time.
No crash with Mesa git and LLVM 7 the sample runs fine on my RX580. Possible there is a bug in LLVM 6.