diff options
author | arphaman <arphaman@gmail.com> | 2013-08-31 13:27:48 +0100 |
---|---|---|
committer | arphaman <arphaman@gmail.com> | 2013-08-31 13:28:12 +0100 |
commit | e42579c1835162d7d82ab7a973049c8753f76a2b (patch) | |
tree | 1c40028d77fba78aacd2ad6539b975bb8476a37a /test/CodeGenInAction/arrayAssignment.f95 | |
parent | 3e049f0a6c78958b355dc96fbc050cf621180aa4 (diff) | |
download | flang-e42579c1835162d7d82ab7a973049c8753f76a2b.tar.gz |
fixed codegen for array assignment implicit conversions
Diffstat (limited to 'test/CodeGenInAction/arrayAssignment.f95')
-rw-r--r-- | test/CodeGenInAction/arrayAssignment.f95 | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/CodeGenInAction/arrayAssignment.f95 b/test/CodeGenInAction/arrayAssignment.f95 index 3ec5d1be54..fe65b8bc28 100644 --- a/test/CodeGenInAction/arrayAssignment.f95 +++ b/test/CodeGenInAction/arrayAssignment.f95 @@ -9,6 +9,7 @@ end program test integer i_mat(3,3), i_mat2(3,3) + real r_mat(3,3) integer i data i_mat2 / 1, 0, 0, 0, 1, 0, 0, 0, 1 / @@ -32,4 +33,19 @@ program test i_mat(1,3), ', ', i_mat(2,3), ', ', i_mat(3,3) continue ! CHECK-NEXT: 1, 0, 0, 0, 1, 0, 0, 0, 1 + i_mat = 1.0 + print *, i_mat(1,1), ', ', i_mat(2,1), ', ', i_mat(3,1), ', ', & + i_mat(1,2), ', ', i_mat(2,2), ', ', i_mat(3,2), ', ', & + i_mat(1,3), ', ', i_mat(2,3), ', ', i_mat(3,3) + continue ! CHECK-NEXT: 1, 1, 1, 1, 1, 1, 1, 1, 1 + + r_mat = 2.0 + r_mat(1,1) = 3.0 + r_mat(2,2) = 4.0 + i_mat = r_mat + print *, i_mat(1,1), ', ', i_mat(2,1), ', ', i_mat(3,1), ', ', & + i_mat(1,2), ', ', i_mat(2,2), ', ', i_mat(3,2), ', ', & + i_mat(1,3), ', ', i_mat(2,3), ', ', i_mat(3,3) + continue ! CHECK-NEXT: 3, 2, 2, 2, 4, 2, 2, 2, 2 + end |