mips.c (mips16_copy_fpr_return_value): New function, split out from...
[official-gcc.git] / gcc / testsuite / gfortran.dg / derived_comp_array_ref_5.f90
blob3b0c279441f4fd63c8857b86115fff11a114d276
1 ! { dg-do compile }
2 ! Tests the fix for PR33566, in which the first variable array ref
3 ! to v1 would cause an incompatible ranks error and the second an ICE.
5 ! Contributed by Mikael Morin <mikael.morin@tele2.fr>
7 program test_vec
9 implicit none
12 integer :: i
13 real :: x
15 type vec3
16 real, dimension(3) :: coords
17 end type vec3
19 type(vec3),parameter :: v1 = vec3((/ 1.0, 2.0, 3.0 /))
20 type(vec3) :: v2
22 v2 = vec3((/ 1.0, 2.0, 3.0 /))
25 x = v1%coords(1)
27 do i=1,3
28 x = v1%coords(i) ! used to fail
29 x = v2%coords(i)
30 end do
32 i = 2
34 v2 = vec3 (v1%coords ((/i+1, i, i-1/))) ! also broken
36 end program test_vec