! { dg-do run }
|
! { dg-do run }
|
! Tests the fix for PR31994, aka 31867, in which the offset
|
! Tests the fix for PR31994, aka 31867, in which the offset
|
! of 'a' in both subroutines was being evaluated incorrectly.
|
! of 'a' in both subroutines was being evaluated incorrectly.
|
! The testcase for PR31867 is char_length_5.f90
|
! The testcase for PR31867 is char_length_5.f90
|
!
|
!
|
! Contributed by Elizabeth Yip
|
! Contributed by Elizabeth Yip
|
! and Francois-Xavier Coudert
|
! and Francois-Xavier Coudert
|
!
|
!
|
program main
|
program main
|
call PR31994
|
call PR31994
|
call PR31994_comment6
|
call PR31994_comment6
|
contains
|
contains
|
subroutine PR31994
|
subroutine PR31994
|
implicit none
|
implicit none
|
complex (kind=4), dimension(2,2) :: a, b, c
|
complex (kind=4), dimension(2,2) :: a, b, c
|
a(1,1) = (1.,1.)
|
a(1,1) = (1.,1.)
|
a(2,1) = (2.,2.)
|
a(2,1) = (2.,2.)
|
a(1,2) = (3.,3.)
|
a(1,2) = (3.,3.)
|
a(2,2) = (4.,4.)
|
a(2,2) = (4.,4.)
|
b=conjg (transpose (a))
|
b=conjg (transpose (a))
|
c=transpose (a)
|
c=transpose (a)
|
c=conjg (c)
|
c=conjg (c)
|
if (any (b .ne. c)) call abort ()
|
if (any (b .ne. c)) call abort ()
|
end subroutine PR31994
|
end subroutine PR31994
|
subroutine PR31994_comment6
|
subroutine PR31994_comment6
|
implicit none
|
implicit none
|
real ,dimension(2,2)::a
|
real ,dimension(2,2)::a
|
integer ,dimension(2,2) :: b, c
|
integer ,dimension(2,2) :: b, c
|
a = reshape ((/1.,2.,3.,4./), (/2,2/))
|
a = reshape ((/1.,2.,3.,4./), (/2,2/))
|
b=int (transpose(a))
|
b=int (transpose(a))
|
c = int (a)
|
c = int (a)
|
c = transpose (c)
|
c = transpose (c)
|
if (any (b .ne. c)) call abort ()
|
if (any (b .ne. c)) call abort ()
|
end subroutine PR31994_comment6
|
end subroutine PR31994_comment6
|
END program main
|
END program main
|
|
|