From 554fd8c5195424bdbcabf5de30fdc183aba391bd Mon Sep 17 00:00:00 2001 From: upstream source tree Date: Sun, 15 Mar 2015 20:14:05 -0400 Subject: obtained gcc-4.6.4.tar.bz2 from upstream website; verified gcc-4.6.4.tar.bz2.sig; imported gcc-4.6.4 source tree from verified upstream tarball. downloading a git-generated archive based on the 'upstream' tag should provide you with a source tree that is binary identical to the one extracted from the above tarball. if you have obtained the source via the command 'git clone', however, do note that line-endings of files in your working directory might differ from line-endings of the respective files in the upstream repository. --- gcc/testsuite/gfortran.dg/pr32242.f90 | 40 +++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 gcc/testsuite/gfortran.dg/pr32242.f90 (limited to 'gcc/testsuite/gfortran.dg/pr32242.f90') diff --git a/gcc/testsuite/gfortran.dg/pr32242.f90 b/gcc/testsuite/gfortran.dg/pr32242.f90 new file mode 100644 index 000000000..21ecdd178 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/pr32242.f90 @@ -0,0 +1,40 @@ +!PR fortran/32242 +! { dg-do compile } +! { dg-options "-Wreturn-type" } +! { dg-final { cleanup-modules "kahan_sum" } } + +MODULE kahan_sum + INTEGER, PARAMETER :: dp=KIND(0.0D0) + INTERFACE accurate_sum + MODULE PROCEDURE kahan_sum_d1, kahan_sum_z1 + END INTERFACE accurate_sum + TYPE pw_grid_type + REAL (KIND=dp), DIMENSION ( : ), POINTER :: gsq + END TYPE pw_grid_type + TYPE pw_type + REAL (KIND=dp), DIMENSION ( : ), POINTER :: cr + COMPLEX (KIND=dp), DIMENSION ( : ), POINTER :: cc + TYPE ( pw_grid_type ), POINTER :: pw_grid + END TYPE pw_type +CONTAINS + FUNCTION kahan_sum_d1(array,mask) RESULT(ks) ! { dg-warning "not set" } + REAL(KIND=dp), DIMENSION(:), INTENT(IN) :: array + LOGICAL, DIMENSION(:), INTENT(IN), & + OPTIONAL :: mask + REAL(KIND=dp) :: ks + END FUNCTION kahan_sum_d1 + FUNCTION kahan_sum_z1(array,mask) RESULT(ks) ! { dg-warning "not set" } + COMPLEX(KIND=dp), DIMENSION(:), & + INTENT(IN) :: array + LOGICAL, DIMENSION(:), INTENT(IN), & + OPTIONAL :: mask + COMPLEX(KIND=dp) :: ks + END FUNCTION kahan_sum_z1 + +FUNCTION pw_integral_a2b ( pw1, pw2 ) RESULT ( integral_value ) + TYPE(pw_type), INTENT(IN) :: pw1, pw2 + REAL(KIND=dp) :: integral_value + integral_value = accurate_sum ( REAL ( CONJG ( pw1 % cc ( : ) ) & + * pw2 % cc ( : ) ,KIND=dp) * pw1 % pw_grid % gsq ( : ) ) +END FUNCTION pw_integral_a2b +END MODULE -- cgit v1.2.3