URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Subversion Repositories openrisc_me
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gfortran.fortran-torture/] [execute/] [elemental.f90] - Rev 303
Compare with Previous | Blame | View Log
! Program to test elemental functions.program test_elementalimplicit noneinteger, dimension (2, 4) :: ainteger, dimension (2, 4) :: binteger(kind = 8), dimension(2) :: ca = reshape ((/2, 3, 4, 5, 6, 7, 8, 9/), (/2, 4/))b = 0b(2, :) = e_fn (a(1, :), 1)if (any (b .ne. reshape ((/0, 1, 0, 3, 0, 5, 0, 7/), (/2, 4/)))) call aborta = e_fn (a(:, 4:1:-1), 1 + b)if (any (a .ne. reshape ((/7, 7, 5, 3, 3, -1, 1, -5/), (/2, 4/)))) call abort! This tests intrinsic elemental conversion functions.c = 2 * a(1, 1)if (any (c .ne. 14)) call abort! This triggered bug due to building ss chains in the wrong order.b = 0;a = a - e_fn (a, b)if (any (a .ne. 0)) call abort! Check expressions involving constantsa = e_fn (b + 1, 1)if (any (a .ne. 0)) call abortcontainselemental integer(kind=4) function e_fn (p, q)integer, intent(in) :: p, qe_fn = p - qend functionend program
