diff options
author | Tobias Burnus <burnus@gcc.gnu.org> | 2007-05-27 23:24:48 +0200 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2007-05-27 23:24:48 +0200 |
commit | c2de0c194e27767937fe5fbae12aa96638768c4c (patch) | |
tree | 44d4899ece2a7f09a5f6ba1d7b653a90f7a1c394 /gcc/testsuite | |
parent | bcb2d7014243ff98890679761404ba7648c98450 (diff) | |
download | gcc-c2de0c194e27767937fe5fbae12aa96638768c4c.zip gcc-c2de0c194e27767937fe5fbae12aa96638768c4c.tar.gz gcc-c2de0c194e27767937fe5fbae12aa96638768c4c.tar.bz2 |
re PR fortran/32088 (ICE (doesn't occur if given function standalone instead on internal))
fortran/
2007-05-27 Paul Thomas <pault@gcc.gnu.org>
Tobias Burnus <burnus@net-b.de>
PR fortran/32088
* symbol.c (gfc_check_function_type): Copy dimensions of
result variable.
* resolve.c (resolve_contained_fntype): Improve symbol output in
the error message.
testsuite/
2007-05-27 Tobias Burnus <burnus@net-b.de>
PR fortran/32088
* gfortran.dg/func_result_3.f90: New.
-- Diese und die falgenden Zeilen werden ignoriert --
M gcc/testsuite/ChangeLog
A gcc/testsuite/gfortran.dg/func_result_3.f90
M gcc/fortran/symbol.c
M gcc/fortran/ChangeLog
M gcc/fortran/resolve.c
From-SVN: r125118
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/func_result_3.f90 | 25 |
2 files changed, 30 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 29b1eac..710c62c 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2007-05-27 Tobias Burnus <burnus@net-b.de> + PR fortran/32088 + * gfortran.dg/func_result_3.f90: New. + +2007-05-27 Tobias Burnus <burnus@net-b.de> + PR middle-end/32083 * gfortran.dg/transfer_simplify_3.f90: New. diff --git a/gcc/testsuite/gfortran.dg/func_result_3.f90 b/gcc/testsuite/gfortran.dg/func_result_3.f90 new file mode 100644 index 0000000..d0f8c71 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/func_result_3.f90 @@ -0,0 +1,25 @@ +! { dg-do compile } +! PR fortran/32088 +! +! Test implicitly defined result variables +! +subroutine dummy +contains + function quadric(a,b) result(c) + intent(in) a,b; dimension a(0:3),b(0:3),c(0:9) + c(0)=a(0)*b(0); c(1:3)=a(1:)*b(0)+a(0)*b(1:); c(4:6)=a(1:)*b(1:) + c(7:9)=(/a(1)*b(2)+b(1)*a(2),a(1)*b(3)+b(1)*a(3),a(2)*b(3)+b(2)*a(3)/) + end function +end subroutine dummy + +subroutine dummy2 +implicit none +contains + function quadric(a,b) result(c) ! { dg-error "no IMPLICIT type" } + real :: a, b + intent(in) a,b; dimension a(0:3),b(0:3),c(0:9) + c(0)=a(0)*b(0); c(1:3)=a(1:)*b(0)+a(0)*b(1:); c(4:6)=a(1:)*b(1:) + c(7:9)=(/a(1)*b(2)+b(1)*a(2),a(1)*b(3)+b(1)*a(3),a(2)*b(3)+b(2)*a(3)/) + end function +end subroutine dummy2 +end |