Nope, that's just UB, so you cannot know what the code will do. Case in point, running it on linux (compiled via clang) doesn't trigger a segvault for me:
main:
.cfi_startproc
.Lfunc_end0:
.size main, .Lfunc_end0-main
.cfi_endproc