33 lines · plain
1! RUN: %python %S/test_errors.py %s %flang_fc12subroutine s13 implicit none4 real(8) :: x = 2.05 !ERROR: The associate name 'a' is already used in this associate statement6 associate(a => x, b => x+1, a => x+2)7 x = b8 end associate9 !ERROR: No explicit type declared for 'b'10 x = b11end12 13subroutine s214 !ERROR: Associate name 'a' must have a type15 associate (a => z'1')16 end associate17end18 19subroutine s320! Test that associated entities are not preventing to fix21! mis-parsed function references into array references22 real :: a(10)23 associate (b => a(2:10:2))24 ! Check no complains about "Use of 'b' as a procedure"25 print *, b(1) ! OK26 end associate27 associate (c => a(2:10:2))28 ! Check the function reference has been fixed to an array reference29 !ERROR: Reference to array 'c' with empty subscript list30 print *, c()31 end associate32end33