OSDN Git Service

* trans.c (trans_code): Set backend locus early.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / array_constructor_22.f90
1 ! { dg-do compile }
2 ! PR34990 ICE in gfc_typenode_for_spec, at fortran/trans-types.c:842
3 ! Test case that of the reporters.
4 module test 
5    implicit none 
6    contains 
7       function my_string(x) 
8          integer i 
9          real, intent(in) :: x(:) 
10          character(0) h4(1:minval([(1,i=1,0)],1)) ! { dg-warning "will be executed zero times" }
11          character(0) sv1(size(x,1):size(h4)) 
12          character(0) sv2(2*lbound(sv1,1):size(h4)) 
13          character(lbound(sv2,1)-3) my_string 
14
15          do i = 1, len(my_string) 
16             my_string(i:i) = achar(modulo(i-1,10)+iachar('0')) 
17          end do 
18       end function my_string 
19 end module test 
20
21 program len_test 
22    use test 
23    implicit none 
24    real x(7) 
25
26    write(*,*) my_string(x) 
27 end program len_test