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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gdb-6.8/] [gdb/] [testsuite/] [gdb.fortran/] [derived-type.f90] - Diff between revs 24 and 157

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

Rev 24 Rev 157
! Copyright 2006 Free Software Foundation, Inc.
! Copyright 2006 Free Software Foundation, Inc.
!
!
! This program is free software; you can redistribute it and/or modify
! This program is free software; you can redistribute it and/or modify
! it under the terms of the GNU General Public License as published by
! it under the terms of the GNU General Public License as published by
! the Free Software Foundation; either version 3 of the License, or
! the Free Software Foundation; either version 3 of the License, or
! (at your option) any later version.
! (at your option) any later version.
!
!
! This program is distributed in the hope that it will be useful,
! This program is distributed in the hope that it will be useful,
! but WITHOUT ANY WARRANTY; without even the implied warranty of
! but WITHOUT ANY WARRANTY; without even the implied warranty of
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
! GNU General Public License for more details.
! GNU General Public License for more details.
!
!
! You should have received a copy of the GNU General Public License
! You should have received a copy of the GNU General Public License
! along with this program.  If not, see .
! along with this program.  If not, see .
!
!
! Ihis file is the Fortran source file for derived-type.exp.  It was written
! Ihis file is the Fortran source file for derived-type.exp.  It was written
! by Wu Zhou. (woodzltc@cn.ibm.com)
! by Wu Zhou. (woodzltc@cn.ibm.com)
program main
program main
  type bar
  type bar
    integer :: c
    integer :: c
    real :: d
    real :: d
  end type
  end type
  type foo
  type foo
    real :: a
    real :: a
    type(bar) :: x
    type(bar) :: x
    character*7 :: b
    character*7 :: b
  end type foo
  end type foo
  type(foo) :: q
  type(foo) :: q
  type(bar) :: p
  type(bar) :: p
  p = bar(1, 2.375)
  p = bar(1, 2.375)
  q%a = 3.125
  q%a = 3.125
  q%b = "abcdefg"
  q%b = "abcdefg"
  q%x%c = 1
  q%x%c = 1
  q%x%d = 2.375
  q%x%d = 2.375
  print *,p,q
  print *,p,q
end program main
end program main
 
 

powered by: WebSVN 2.1.0

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