view gcc/testsuite/gfortran.dg/block_8.f08 @ 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 run }
! { dg-options "-std=f2008 " }

! Check BLOCK with SAVE'ed variables.

PROGRAM main
  IMPLICIT NONE
  INTEGER :: i

  DO i = 1, 100
    BLOCK
      INTEGER, SAVE :: summed = 0
      summed = summed + i
      IF (i == 100 .AND. summed /= 5050) STOP 1
    END BLOCK
  END DO
END PROGRAM main