File: check.f90

package info (click to toggle)
fortran-fpm 0.12.0-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,016 kB
  • sloc: f90: 47,650; sh: 394; ansic: 277; makefile: 36; cpp: 30; fortran: 8
file content (18 lines) | stat: -rw-r--r-- 427 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
program check
  use iso_c_binding, only: c_size_t
  use cpp_files
  implicit none

  integer :: i, max_element
  integer, parameter :: array(*) = [(i,i=-50,10)]
  
  max_element = intvec_maxval(array,size(array,1,c_size_t))

  if (max_element == maxval(array)) then
    write(*,*) ' PASSED: Max element is ',max_element
  else
    write(*,*) ' (!) FAILED: Incorrect max element returned'
    stop 1
  end if

end program check