This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Committed] PR fortran/85938 -- testcase for rank change
- From: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- To: fortran at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Sat, 2 Jun 2018 22:27:16 -0700
- Subject: [Committed] PR fortran/85938 -- testcase for rank change
- Reply-to: sgk at troutmask dot apl dot washington dot edu
PR fortran/85938 is another example of a failure caused by
not setting the rank correctly. The issues with setting
rank were fixed in r261081. I've converted the testcase in
PR fortran/85938 to be suitable for the testsuite and
committed it.
2018-06-02 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/85938
* gfortran.dg/pr85938.f90: Fixed by revision r261081
--
Steve
Index: gcc/testsuite/gfortran.dg/pr85938.f90
===================================================================
--- gcc/testsuite/gfortran.dg/pr85938.f90 (nonexistent)
+++ gcc/testsuite/gfortran.dg/pr85938.f90 (working copy)
@@ -0,0 +1,9 @@
+! { dg-do run }
+! PR fortran/85938
+program foo
+ real a(9), b(3)
+ integer :: n = 3
+ a = 1.0
+ b = 1.0
+ if (any(matmul(reshape(A, (/ n, n /)), b) /= 3.)) stop 1
+end program