Debian Codegraph @

gcc/testsuite/gfortran.dg/dec_char_conversion_in_assignment_8.f90

raw
1 ! { dg-do compile }
2 ! { dg-options "-fdec" }
3 !
4 ! Modified by Mark Eggleston <[email protected]>
5 !
6 program test
7 integer(4) :: a
8 real(4) :: b
9 complex(4) :: c
10 logical(4) :: d
11
12 a = 4_'1234' ! { dg-error "Cannot convert CHARACTER\\(4,4\\) to" }
13 b = 4_'12' ! { dg-error "Cannot convert CHARACTER\\(2,4\\) to" }
14 c = 4_'12341234' ! { dg-error "Cannot convert CHARACTER\\(8,4\\) to" }
15 d = 4_'abcd' ! { dg-error "Cannot convert CHARACTER\\(4,4\\) to" }
16 end program
17