OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [scalar_mask_2.f90] - Blame information for rev 193

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
! { dg-do run }
2
program main
3
  ! Test scalar masks for different intrinsics.
4
  real, dimension(2,2) :: a
5
  logical(kind=2) :: lo
6
  lo = .false.
7
  a(1,1) = 1.
8
  a(1,2) = -1.
9
  a(2,1) = 13.
10
  a(2,2) = -31.
11
  if (any (minloc (a, lo) /= 0)) call abort
12
  if (any (minloc (a, .true.) /= (/ 2, 2 /))) call abort
13
  if (any (minloc(a, 1, .true.) /= (/ 1, 2/))) call abort
14
  if (any (minloc(a, 1, lo ) /= (/ 0, 0/))) call abort
15
 
16
  if (any (maxloc (a, lo) /= 0)) call abort
17
  if (any (maxloc (a, .true.) /= (/ 2,1 /))) call abort
18
  if (any (maxloc(a, 1, .true.) /= (/ 2, 1/))) call abort
19
  if (any (maxloc(a, 1, lo) /= (/ 0, 0/))) call abort
20
 
21
  if (any (maxval(a, 1, lo) /= -HUGE(a))) call abort
22
  if (any (maxval(a, 1, .true.) /= (/13., -1./))) call abort
23
  if (any (minval(a, 1, lo) /= HUGE(a))) call abort
24
  if (any (minval(a, 1, .true.) /= (/1., -31./))) call abort
25
 
26
  if (any (product(a, 1, .true.) /= (/13., 31./))) call abort
27
  if (any (product(a, 1, lo ) /= (/1., 1./))) call abort
28
 
29
  if (any (sum(a, 1, .true.) /= (/14., -32./))) call abort
30
  if (any (sum(a, 1, lo) /= (/0., 0./))) call abort
31
 
32
end program main

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.