PR middle-end/77674
[official-gcc.git] / gcc / testsuite / gfortran.dg / mvbits_3.f90
blob74f24e001ee724dc696148ef67b8e7efb2de0821
1 ! { dg-do run }
3 ! PR fortran/
5 ! The trans-*.c part of the compiler did no know
6 ! that mvbits is an elemental function.
8 ! Test case contributed by P.H. Lundow.
10 program main
11 implicit none
12 integer :: a( 2 ), b( 2 )
13 integer :: x, y
15 a = 1
16 b = 0
17 x = 1
18 y = 0
20 call mvbits (a, 0, 1, b, 1)
21 call mvbits (x, 0, 1, y, 1)
23 ! write (*, *) 'a: ', a
24 ! write (*, *) 'x: ', x
25 ! write (*, *)
26 ! write (*, *) 'b: ', b
27 ! write (*, *) 'y: ', y
28 ! write (*, *)
30 if ( any (b /= y) ) call abort()
31 end program main