URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [block_2.f08] - Rev 700
Go to most recent revision | Compare with Previous | Blame | View Log
! { dg-do run }! { dg-options "-std=f2008 -fall-intrinsics -fdump-tree-original" }! More sophisticated BLOCK runtime checks for correct initialization/clean-up.PROGRAM mainIMPLICIT NONEINTEGER :: nn = 5myblock: BLOCKINTEGER :: arr(n)IF (SIZE (arr) /= 5) CALL abort ()BLOCKINTEGER :: arr(2*n)IF (SIZE (arr) /= 10) CALL abort ()END BLOCKIF (SIZE (arr) /= 5) CALL abort ()END BLOCK myblockBLOCKINTEGER, ALLOCATABLE :: alloc_arr(:)IF (ALLOCATED (alloc_arr)) CALL abort ()ALLOCATE (alloc_arr(n))IF (SIZE (alloc_arr) /= 5) CALL abort ()! Should be free'ed here (but at least somewhere), this is checked! with pattern below.END BLOCKBLOCKCHARACTER(LEN=n) :: strIF (LEN (str) /= 5) CALL abort ()str = "123456789"IF (str /= "12345") CALL abort ()END BLOCKEND PROGRAM main! { dg-final { scan-tree-dump-times "free \\(\\(void \\*\\) alloc_arr\\.data" 1 "original" } }! { dg-final { cleanup-tree-dump "original" } }
Go to most recent revision | Compare with Previous | Blame | View Log
