PR tree-optimization/86415 - strlen() not folded for substrings within constant arrays
[official-gcc.git] / gcc / testsuite / gfortran.dg / do_5.f90
blobf7cec363e83496f4876323cac3862ddc143e3840
1 ! { dg-do compile }
3 ! PR fortran/54370
5 ! The following program was ICEing at tree-check time
6 ! "L()" was regarded as default-kind logical.
8 ! Contributed by Kirill Chilikin
10 MODULE M
11 CONTAINS
13 LOGICAL(C_BOOL) FUNCTION L() BIND(C)
14 USE, INTRINSIC :: ISO_C_BINDING
15 L = .FALSE.
16 END FUNCTION
18 LOGICAL(8) FUNCTION L2() BIND(C) ! { dg-warning "GNU Extension: LOGICAL result variable 'l2' at .1. with non-C_Bool kind in BIND.C. procedure 'l2'" }
19 L2 = .FALSE._8
20 END FUNCTION
22 SUBROUTINE S()
23 DO WHILE (L())
24 ENDDO
25 DO WHILE (L2())
26 ENDDO
27 END
29 END