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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [whole_file_12.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
!
4
! Tests the fix PR40011 comment 17 in which the explicit interface was
5
! being ignored and the missing argument was not correctly handled, which
6
! led to an ICE.
7
!
8
! Contributed by Dominique d'Humieres  
9
!
10
          Implicit None
11
          call sub(1,2)
12
          call sub(1,2,3)
13
 
14
          contains
15
 
16
          subroutine sub(i,j,k)
17
          Implicit None
18
          Integer, Intent( In )           :: i
19
          Integer, Intent( In )           :: j
20
          Integer, Intent( In ), Optional :: k
21
          intrinsic present
22
          write(*,*)' 3 presence flag ',present(k)
23
          write(*,*)' 1st arg ',i
24
          write(*,*)' 2nd arg ',j
25
          if (present(k)) then
26
            write(*,*)' 3rd arg ',k
27
          else
28
            write(*,*)' 3rd arg is absent'
29
          endif
30
          return
31
          end subroutine
32
 
33
          end

powered by: WebSVN 2.1.0

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