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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [gfortran.dg/] [missing_optional_dummy_6.f90] - Blame information for rev 384

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 302 jeremybenn
! { dg-do run }
2
! { dg-options "-fdump-tree-original" }
3
!
4
! PR fortran/41907
5
!
6
program test
7
  implicit none
8
  call scalar1 ()
9
  call assumed_shape1 ()
10
  call explicit_shape1 ()
11
contains
12
 
13
  ! Calling functions
14
  subroutine scalar1 (slr1)
15
    integer, optional :: slr1
16
    call scalar2 (slr1)
17
  end subroutine scalar1
18
 
19
  subroutine assumed_shape1 (as1)
20
    integer, dimension(:), optional :: as1
21
    call assumed_shape2 (as1)
22
    call explicit_shape2 (as1)
23
  end subroutine assumed_shape1
24
 
25
  subroutine explicit_shape1 (es1)
26
    integer, dimension(5), optional :: es1
27
    call assumed_shape2 (es1)
28
    call explicit_shape2 (es1)
29
  end subroutine explicit_shape1
30
 
31
 
32
  ! Called functions
33
  subroutine assumed_shape2 (as2)
34
    integer, dimension(:),optional :: as2
35
    if (present (as2)) call abort()
36
  end subroutine assumed_shape2
37
 
38
  subroutine explicit_shape2 (es2)
39
    integer, dimension(5),optional :: es2
40
    if (present (es2)) call abort()
41
  end subroutine explicit_shape2
42
 
43
  subroutine scalar2 (slr2)
44
    integer, optional :: slr2
45
    if (present (slr2)) call abort()
46
  end subroutine scalar2
47
 
48
end program test
49
 
50
! { dg-final { scan-tree-dump-times "scalar2 \\(slr1" 1 "original" } }
51
 
52
! { dg-final { scan-tree-dump-times "= es1 != 0B" 1 "original" } }
53
! { dg-final { scan-tree-dump-times "assumed_shape2 \\(es1" 0 "original" } }
54
! { dg-final { scan-tree-dump-times "explicit_shape2 \\(es1" 1 "original" } }
55
 
56
! { dg-final { scan-tree-dump-times "= as1 != 0B" 2 "original" } }
57
! { dg-final { scan-tree-dump-times "assumed_shape2 \\(as1" 0 "original" } }
58
! { dg-final { scan-tree-dump-times "explicit_shape2 \\(as1" 0 "original" } }
59
 
60
! { dg-final { cleanup-tree-dump "original" } }

powered by: WebSVN 2.1.0

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