URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.fortran-torture/] [execute/] [der_init.f90] - Rev 707
Go to most recent revision | Compare with Previous | Blame | View Log
! Program to test derived type initializers and constructorsprogram der_initimplicit nonetype tinteger :: iinteger :: j = 4end typeinteger :: m, n! Explicit initializertype (t) :: var = t(1, 2)! Type (default) initializertype (t) :: var2! Initialization of arraystype (t), dimension(2) :: var3type (t), dimension(2) :: var4 = (/t(7, 9), t(8, 6)/)if (var%i .ne. 1 .or. var%j .ne. 2) call abortif (var2%j .ne. 4) call abortvar2 = t(6, 5)if (var2%i .ne. 6 .or. var2%j .ne. 5) call abortif ((var3(1)%j .ne. 4) .or. (var3(2)%j .ne. 4)) call abortif ((var4(1)%i .ne. 7) .or. (var4(2)%i .ne. 8) &.or. (var4(1)%j .ne. 9) .or. (var4(2)%j .ne. 6)) call abort! Non-constant constructorn = 1m = 5var2 = t(n, n + m)if (var2%i .ne. 1 .or. var2%j .ne. 6) call abortend program
Go to most recent revision | Compare with Previous | Blame | View Log
