view gcc/testsuite/gfortran.dg/class_51.f90 @ 152:2b5abeee2509

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents 84e7813d76e9
children
line wrap: on
line source

! { dg-do compile }
! { dg-options "-fdump-tree-original" }
!
! PR fortran/52270
!
! From IR F08/0073 by Malcolm Cohen
!

  Program m013
    Type t
      Real c
    End Type
    Type(t),Target :: x
    Call sub(x)
    Print *,x%c
    if (x%c /= 3) STOP 1
  Contains
    Subroutine sub(p)
      Class(t),Pointer,Intent(In) :: p
      p%c = 3
    End Subroutine
  End Program

! { dg-final { scan-tree-dump-times "sub \\(&class" 1 "original" } }