17 lines · plain
1! RUN: %python %S/test_errors.py %s %flang_fc12program main3 type t4 character(4), pointer :: p5 end type6 character(5), target :: buff = "abcde"7 type(t) x8 !ERROR: Target type CHARACTER(KIND=1,LEN=5_8) is not compatible with pointer type CHARACTER(KIND=1,LEN=4_8)9 x = t(buff)10 !ERROR: Target type CHARACTER(KIND=1,LEN=3_8) is not compatible with pointer type CHARACTER(KIND=1,LEN=4_8)11 x = t(buff(3:))12 !ERROR: Target type CHARACTER(KIND=1,LEN=5_8) is not compatible with pointer type CHARACTER(KIND=1,LEN=4_8)13 x%p => buff14 !ERROR: Target type CHARACTER(KIND=1,LEN=3_8) is not compatible with pointer type CHARACTER(KIND=1,LEN=4_8)15 x%p => buff(1:3)16end17