https://bugs.llvm.org/show_bug.cgi?id=44975
Richard Smith <richard-l...@metafoo.co.uk> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |INVALID
--- Comment #4 from Richard Smith <richard-l...@metafoo.co.uk> ---
The array in main is implicitly an array of 1 int (the bound is deduced from
the length of the initializer), so the access in foo is out of bounds, and
hence has undefined behavior. The fact that this sometimes crashes and
sometimes does not is not a compiler bug.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs