libgfortran/ChangeLog:
[official-gcc.git] / gcc / testsuite / gfortran.dg / whole_file_35.f90
blobe52a2c42dd8040cac297f50896935a2b644acd42
1 ! { dg-do compile }
3 ! PR fortran/50408
5 ! Contributed by Vittorio Zecca
7 module m
8 type int
9 integer :: val
10 end type int
11 interface ichar
12 module procedure uch
13 end interface
14 contains
15 function uch (c)
16 character (len=1), intent (in) :: c
17 type (int) :: uch
18 intrinsic ichar
19 uch%val = 127 - ichar (c)
20 end function uch
21 end module m
23 program p
24 use m
25 print *,ichar('~') ! must print "1"
26 end program p