diff options
author | Mikael Morin <mikael.morin@sfr.fr> | 2011-07-07 23:03:25 +0200 |
---|---|---|
committer | Mikael Morin <mikael@gcc.gnu.org> | 2011-07-07 21:03:25 +0000 |
commit | ceeb79a48e25f19f6242e1ac281883a07dd1d2f1 (patch) | |
tree | 5afd19d177284ec169120c17b3465ce500b44e76 /gcc | |
parent | e3d748dd0ec180b1405dad4b72652c4f70766e92 (diff) | |
download | gcc-ceeb79a48e25f19f6242e1ac281883a07dd1d2f1.zip gcc-ceeb79a48e25f19f6242e1ac281883a07dd1d2f1.tar.gz gcc-ceeb79a48e25f19f6242e1ac281883a07dd1d2f1.tar.bz2 |
re PR fortran/49648 (ICE(segfault) with MATMUL and function-result actual argument)
2011-07-07 Mikael Morin <mikael.morin@sfr.fr>
PR fortran/49648
* gfortran.dg/result_in_spec_4.f90: New test.
From-SVN: r176012
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/result_in_spec_4.f90 | 27 |
2 files changed, 32 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 63dda00..c57cb97 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2011-07-07 Mikael Morin <mikael.morin@sfr.fr> + + PR fortran/49648 + * gfortran.dg/result_in_spec_4.f90: New test. + 2011-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> * gcc.target/sparc/cas64.c: New test. diff --git a/gcc/testsuite/gfortran.dg/result_in_spec_4.f90 b/gcc/testsuite/gfortran.dg/result_in_spec_4.f90 new file mode 100644 index 0000000..3f0e9a3 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/result_in_spec_4.f90 @@ -0,0 +1,27 @@ +! { dg-do compile } +! +! PR fortran/49648 +! ICE for calls to a use-associated function returning an array whose spec +! depends on a function call. + +! Contributed by Tobias Burnus <burnus@net-b.de> + +module m2 + COMPLEX, SAVE, ALLOCATABLE :: P(:) +contains + FUNCTION getPhaseMatrix() RESULT(PM) + COMPLEX:: PM(SIZE(P),3) + PM=0.0 + END FUNCTION +end module m2 + +module m + use m2 +contains + SUBROUTINE gf_generateEmbPot() + COMPLEX :: sigma2(3,3) + sigma2 = MATMUL(getPhaseMatrix(), sigma2) + END SUBROUTINE +end module m + +! { dg-final { cleanup-modules "m m2" } } |