Break circular dependency between FIR dialect and utilities
[llvm-project.git] / flang / test / Semantics / assign13.f90
blobed02899e989738fc12008c1c9455987946aae4f3
1 ! RUN: %python %S/test_errors.py %s %flang_fc1
2 program main
3 type t
4 character(4), pointer :: p
5 end type
6 character(5), target :: buff = "abcde"
7 type(t) x
8 !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 => buff
14 !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)
16 end