diff --git a/tests/reference/asr-array_01-9c6ecba.json b/tests/reference/asr-array_01-9c6ecba.json index 8b553eb..2728a83 100644 --- a/tests/reference/asr-array_01-9c6ecba.json +++ b/tests/reference/asr-array_01-9c6ecba.json @@ -6,7 +6,7 @@ "outfile": null, "outfile_hash": null, "stdout": "asr-array_01-9c6ecba.stdout", - "stdout_hash": "141c00a55703c54d1d113b441b052bd1ac7dfc8cc1fb73b243532bfd", + "stdout_hash": "1e36705289359e234e0543e1437e4c9decfcd771f8d6e7e297a8948a", "stderr": null, "stderr_hash": null, "returncode": 0 diff --git a/tests/reference/asr-array_01-9c6ecba.stdout b/tests/reference/asr-array_01-9c6ecba.stdout index 103cf99..fc4b8e1 100644 --- a/tests/reference/asr-array_01-9c6ecba.stdout +++ b/tests/reference/asr-array_01-9c6ecba.stdout @@ -203,38 +203,74 @@ ) (= (Var 3 arr2d) - (ArrayConstant - [(IntegerConstant 1 (Integer 4)) - (IntegerConstant 2 (Integer 4)) - (IntegerConstant 3 (Integer 4)) - (IntegerConstant 4 (Integer 4)) - (IntegerConstant 5 (Integer 4)) - (IntegerConstant 6 (Integer 4)) - (IntegerConstant 8 (Integer 4)) - (IntegerConstant 9 (Integer 4)) - (IntegerConstant 10 (Integer 4)) - (IntegerConstant 11 (Integer 4)) - (IntegerConstant 12 (Integer 4)) - (IntegerConstant 13 (Integer 4)) - (IntegerConstant 14 (Integer 4)) - (IntegerConstant 15 (Integer 4)) - (IntegerConstant 16 (Integer 4)) - (IntegerConstant 17 (Integer 4)) - (IntegerConstant 18 (Integer 4)) - (IntegerConstant 19 (Integer 4)) - (IntegerConstant 20 (Integer 4)) - (IntegerConstant 21 (Integer 4)) - (IntegerConstant 22 (Integer 4)) - (IntegerConstant 23 (Integer 4)) - (IntegerConstant 24 (Integer 4)) - (IntegerConstant 25 (Integer 4))] + (ArrayReshape + (ArrayConstant + [(IntegerConstant 1 (Integer 4)) + (IntegerConstant 2 (Integer 4)) + (IntegerConstant 3 (Integer 4)) + (IntegerConstant 4 (Integer 4)) + (IntegerConstant 5 (Integer 4)) + (IntegerConstant 6 (Integer 4)) + (IntegerConstant 8 (Integer 4)) + (IntegerConstant 9 (Integer 4)) + (IntegerConstant 10 (Integer 4)) + (IntegerConstant 11 (Integer 4)) + (IntegerConstant 12 (Integer 4)) + (IntegerConstant 13 (Integer 4)) + (IntegerConstant 14 (Integer 4)) + (IntegerConstant 15 (Integer 4)) + (IntegerConstant 16 (Integer 4)) + (IntegerConstant 17 (Integer 4)) + (IntegerConstant 18 (Integer 4)) + (IntegerConstant 19 (Integer 4)) + (IntegerConstant 20 (Integer 4)) + (IntegerConstant 21 (Integer 4)) + (IntegerConstant 22 (Integer 4)) + (IntegerConstant 23 (Integer 4)) + (IntegerConstant 24 (Integer 4)) + (IntegerConstant 25 (Integer 4))] + (Array + (Integer 4) + [((IntegerConstant 0 (Integer 4)) + (IntegerConstant 24 (Integer 4)))] + FixedSizeArray + ) + RowMajor + ) + (ArrayPhysicalCast + (ArrayConstant + [(IntegerConstant 4 (Integer 4)) + (IntegerConstant 3 (Integer 4)) + (IntegerConstant 2 (Integer 4))] + (Array + (Integer 4) + [((IntegerConstant 0 (Integer 4)) + (IntegerConstant 3 (Integer 4)))] + FixedSizeArray + ) + RowMajor + ) + FixedSizeArray + DescriptorArray + (Array + (Integer 4) + [((IntegerConstant 0 (Integer 4)) + (IntegerConstant 3 (Integer 4)))] + DescriptorArray + ) + () + ) (Array (Integer 4) - [((IntegerConstant 0 (Integer 4)) - (IntegerConstant 24 (Integer 4)))] + [(() + ()) + (() + ()) + (() + ())] FixedSizeArray ) - RowMajor + () ) () ) diff --git a/tests/reference/asr-array_04-be6ac8a.json b/tests/reference/asr-array_04-be6ac8a.json index 270de19..7f8f71e 100644 --- a/tests/reference/asr-array_04-be6ac8a.json +++ b/tests/reference/asr-array_04-be6ac8a.json @@ -2,11 +2,11 @@ "basename": "asr-array_04-be6ac8a", "cmd": "lc --asr-dump --no-color {infile} -o {outfile} -extra-arg=\"\"", "infile": "tests/../integration_tests/array_04.cpp", - "infile_hash": "a3e79a9500684211e6e080dc262e6f1e5005e257df6d05381f9dc9c6", + "infile_hash": "dd38786061d4a19743e4c32c2a3ecb08193777f81a2a0d3e87af0f0a", "outfile": null, "outfile_hash": null, "stdout": "asr-array_04-be6ac8a.stdout", - "stdout_hash": "8ccda65df8bedf43f3a0c20870b16ce84c05bc2dad0df3e41ddd122e", + "stdout_hash": "527842cbdfdfac8d3cf494d61c760428aa51ec431fcf2b3e5d2827cd", "stderr": null, "stderr_hash": null, "returncode": 0 diff --git a/tests/reference/asr-array_04-be6ac8a.stdout b/tests/reference/asr-array_04-be6ac8a.stdout index ba8845e..904fee3 100644 --- a/tests/reference/asr-array_04-be6ac8a.stdout +++ b/tests/reference/asr-array_04-be6ac8a.stdout @@ -70,6 +70,29 @@ Public Required .false. + ), + res: + (Variable + 2 + res + [] + Local + () + () + Default + (Allocatable + (Array + (Real 8) + [(() + ())] + DescriptorArray + ) + ) + () + Source + Public + Required + .false. ) }) main @@ -149,36 +172,45 @@ ) RowMajor ) - (ArrayConstant - [(ArraySize - (Var 2 arr1) - (IntegerConstant 1 (Integer 4)) - (Integer 4) - () + (ArrayPhysicalCast + (ArrayConstant + [(ArraySize + (Var 2 arr1) + (IntegerConstant 1 (Integer 4)) + (Integer 4) + () + ) + (ArraySize + (Var 2 arr1) + (IntegerConstant 2 (Integer 4)) + (Integer 4) + () + )] + (Array + (Integer 4) + [((IntegerConstant 0 (Integer 4)) + (IntegerConstant 2 (Integer 4)))] + FixedSizeArray + ) + RowMajor ) - (ArraySize - (Var 2 arr1) - (IntegerConstant 2 (Integer 4)) - (Integer 4) - () - )] + FixedSizeArray + DescriptorArray (Array (Integer 4) [((IntegerConstant 0 (Integer 4)) (IntegerConstant 2 (Integer 4)))] - FixedSizeArray - ) - RowMajor - ) - (Allocatable - (Array - (Real 8) - [(() - ()) - (() - ())] DescriptorArray ) + () + ) + (Array + (Real 8) + [(() + ()) + (() + ())] + FixedSizeArray ) () ) @@ -219,8 +251,67 @@ ) () ) + (Allocate + [((Var 2 res) + [((IntegerConstant 0 (Integer 4)) + (IntegerConstant 3 (Integer 4)))] + () + ())] + () + () + () + ) + (= + (Var 2 res) + (RealBinOp + (ArraySection + (Var 2 arr1) + [(() + (IntegerConstant 1 (Integer 4)) + ()) + ((ArrayBound + (Var 2 arr1) + (IntegerConstant 2 (Integer 4)) + (Integer 4) + LBound + () + ) + (ArrayBound + (Var 2 arr1) + (IntegerConstant 2 (Integer 4)) + (Integer 4) + UBound + () + ) + (IntegerConstant 1 (Integer 4)))] + (Array + (Real 8) + [(() + ())] + DescriptorArray + ) + () + ) + Add + (Var 2 arr2) + (Array + (Real 8) + [(() + ())] + DescriptorArray + ) + () + ) + () + ) + (Print + [(Var 2 arr1) + (Var 2 arr2)] + () + () + ) (Print - [(Var 2 arr2)] + [(Var 2 res)] () () )