Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gfortran.dg/saved_automatic_1.f90 @ 127:4c56639505ff
fix function.c and add CbC-example Makefile
author | mir3636 |
---|---|
date | Wed, 11 Apr 2018 18:46:58 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
! { dg-do compile } ! Tests patch for PR23091, in which autmatic objects caused ! an ICE if they were given the SAVE attribute. ! ! Contributed by Valera Veryazov <valera.veryazov@teokem.lu.se> ! Subroutine My(n1) integer :: myArray(n1) character(n1) :: ch save ! OK because only allowed objects are saved globally. call xxx(myArray, ch) return end Subroutine Thy(n1) integer, save :: myArray(n1) ! { dg-error "SAVE attribute" } character(n1), save :: ch ! { dg-error "SAVE attribute" } call xxx(myArray, ch) return end