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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [saved_automatic_1.f90] - Diff between revs 154 and 816

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 154 Rev 816
! { dg-do compile }
! { dg-do compile }
! Tests patch for PR23091, in which autmatic objects caused
! Tests patch for PR23091, in which autmatic objects caused
! an ICE if they were given the SAVE attribute.
! an ICE if they were given the SAVE attribute.
!
!
! Contributed by Valera Veryazov  
! Contributed by Valera Veryazov  
!
!
Subroutine My(n1)
Subroutine My(n1)
  integer :: myArray(n1)
  integer :: myArray(n1)
  character(n1) :: ch
  character(n1) :: ch
  save      ! OK because only allowed objects are saved globally.
  save      ! OK because only allowed objects are saved globally.
  call xxx(myArray, ch)
  call xxx(myArray, ch)
  return
  return
  end
  end
Subroutine Thy(n1)
Subroutine Thy(n1)
  integer, save :: myArray(n1) ! { dg-error "SAVE attribute" }
  integer, save :: myArray(n1) ! { dg-error "SAVE attribute" }
  character(n1), save :: ch ! { dg-error "SAVE attribute" }
  character(n1), save :: ch ! { dg-error "SAVE attribute" }
  call xxx(myArray, ch)
  call xxx(myArray, ch)
  return
  return
  end
  end
 
 

powered by: WebSVN 2.1.0

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