OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [gfortran.dg/] [missing_optional_dummy_2.f90] - Diff between revs 302 and 384

Only display areas with differences | Details | Blame | View Log

Rev 302 Rev 384
! { dg-do compile }
! { dg-do compile }
! Tests the fix for PR29321 and PR29322, in which ICEs occurred for the
! Tests the fix for PR29321 and PR29322, in which ICEs occurred for the
! lack of proper attention to checking pointers in gfc_conv_function_call.
! lack of proper attention to checking pointers in gfc_conv_function_call.
!
!
! Contributed by Olav Vahtras  
! Contributed by Olav Vahtras  
! and Francois-Xavier Coudert  
! and Francois-Xavier Coudert  
!
!
MODULE myint
MODULE myint
   TYPE NUM
   TYPE NUM
      INTEGER :: R = 0
      INTEGER :: R = 0
   END TYPE NUM
   END TYPE NUM
   CONTAINS
   CONTAINS
      FUNCTION FUNC(A,B) RESULT(E)
      FUNCTION FUNC(A,B) RESULT(E)
      IMPLICIT NONE
      IMPLICIT NONE
      TYPE(NUM)  A,B,E
      TYPE(NUM)  A,B,E
      INTENT(IN) ::  A,B
      INTENT(IN) ::  A,B
      OPTIONAL B
      OPTIONAL B
      E%R=A%R
      E%R=A%R
      CALL SUB(A,E)
      CALL SUB(A,E)
      END FUNCTION FUNC
      END FUNCTION FUNC
      SUBROUTINE SUB(A,E,B,C)
      SUBROUTINE SUB(A,E,B,C)
      IMPLICIT NONE
      IMPLICIT NONE
      TYPE(NUM) A,E,B,C
      TYPE(NUM) A,E,B,C
      INTENT(IN)   A,B
      INTENT(IN)   A,B
      INTENT(OUT)  E,C
      INTENT(OUT)  E,C
      OPTIONAL B,C
      OPTIONAL B,C
      E%R=A%R
      E%R=A%R
      END SUBROUTINE SUB
      END SUBROUTINE SUB
END MODULE myint
END MODULE myint
  if (isscan () /= 0) call abort
  if (isscan () /= 0) call abort
contains
contains
  integer function isscan (substr)
  integer function isscan (substr)
    character(*), optional :: substr
    character(*), optional :: substr
    if (.not.present(substr)) isscan = myscan ("foo", "over")
    if (.not.present(substr)) isscan = myscan ("foo", "over")
  end function isscan
  end function isscan
end
end
! { dg-final { cleanup-modules "myint" } }
! { dg-final { cleanup-modules "myint" } }
 
 

powered by: WebSVN 2.1.0

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