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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [whole_file_7.f90] - Blame information for rev 694

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do compile }
2
! { dg-options "-fwhole-file" }
3
! Test the fixes for the first two problems in PR40011
4
!
5
! Contributed by Dominique d'Humieres 
6
!
7
! This function would not compile because -fwhole-file would
8
! try repeatedly to resolve the function because of the self
9
! reference.
10
RECURSIVE FUNCTION eval_args(q)  result (r)
11
  INTEGER NNODE
12
  PARAMETER (NNODE  = 10)
13
  TYPE NODE
14
    SEQUENCE
15
    INTEGER car
16
    INTEGER cdr
17
  END TYPE NODE
18
  TYPE(NODE) heap(NNODE)
19
  INTEGER r, q
20
  r = eval_args(heap(q)%cdr)
21
END FUNCTION eval_args
22
 
23
function test(n)
24
  real, dimension(2) :: test
25
  integer            :: n
26
  test = n
27
  return
28
end function test
29
 
30
program arr     ! The error was not picked up causing an ICE
31
  real, dimension(2) :: res
32
  res = test(2) ! { dg-error "needs an explicit INTERFACE" }
33
  print *, res
34
end program

powered by: WebSVN 2.1.0

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