aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/mvbits_3.f90
blob: 74f24e001ee724dc696148ef67b8e7efb2de0821 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
! { dg-do run }
!
! PR fortran/
!
! The trans-*.c part of the compiler did no know
! that mvbits is an elemental function.
!
! Test case contributed by P.H. Lundow.
!
program main
  implicit none
  integer :: a( 2 ), b( 2 )
  integer :: x, y

  a = 1
  b = 0
  x = 1
  y = 0

  call mvbits (a, 0, 1, b, 1)
  call mvbits (x, 0, 1, y, 1)

!  write (*, *) 'a: ', a
!  write (*, *) 'x: ', x
!  write (*, *)
!  write (*, *) 'b: ', b
!  write (*, *) 'y: ', y
!  write (*, *)

  if ( any (b /= y) ) call abort()
end program main