[llvm-commits] llvm-gcc: return the correct type for ARRAY_RANGE_REF

Duncan Sands baldrick at free.fr
Wed Mar 14 15:51:52 PDT 2007


An ARRAY_RANGE_REF is for extracting a range of elements from
an array, for example elements 1 to 2 of an [3 x i32], while
ARRAY_REF is for extracting a single element, say element 2.
EmitLV_ARRAY_REF, which handles both expression types, should
return a [2 x i32]* in the first case and an i32* in the second
case (currently it always returns a pointer to the element type).
The testcase is, as ever, in Ada (Ada is the only front-end that
generates ARRAY_RANGE_REF).

Duncan.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: array_range_ref.diff
Type: text/x-diff
Size: 1729 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20070314/abfaa8ef/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: array_range_ref_test.diff
Type: text/x-diff
Size: 433 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20070314/abfaa8ef/attachment-0001.diff>


More information about the llvm-commits mailing list