From 8c0e62cdb274635d9f92c22836a80ea3d5e937cc Mon Sep 17 00:00:00 2001
From: Chris Lattner
Note that it is undefined to access an array out of bounds: array and -pointer indexes must always be within the defined bounds of the array type. -The one exception for this rule is zero length arrays. These arrays are -defined to be accessible as variable length arrays, which requires access -beyond the zero'th element.
+Note that it is undefined to access an array out of bounds: array +and pointer indexes must always be within the defined bounds of the +array type when accessed with an instruction that dereferences the +pointer (e.g. a load or store instruction). The one exception for +this rule is zero length arrays. These arrays are defined to be +accessible as variable length arrays, which requires access beyond the +zero'th element.
The getelementptr instruction is often confusing. For some more insight into how it works, see the getelementptr -- 2.34.1