OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gfortran.dg/] [use_12.f90] - Blame information for rev 399

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 302 jeremybenn
! { dg-do compile }
2
! { dg-options "-Wreturn-type" }
3
! Tests the fix of PR34545, in which the 'numclusters' that determines the size
4
! of fnres was not properly associated.
5
!
6
! Reported by Jon D. Richards 
7
!
8
module m1
9
  integer :: numclusters = 2
10
end module m1
11
 
12
module m2
13
  contains
14
    function get_nfirst( ) result(fnres)  ! { dg-warning "not set" }
15
      use m1, only: numclusters
16
      real :: fnres(numclusters)   ! change to REAL and it works!!
17
    end function get_nfirst
18
end module m2
19
 
20
program kmeans_driver
21
   use m1
22
   use m2
23
   integer :: nfirst(3)
24
   nfirst(1:numclusters) = get_nfirst( )
25
end program kmeans_driver
26
! { dg-final { cleanup-modules "m1 m2" } }

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.