public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
* [Committed] PR fortran/64107 -- new test
@ 2018-03-07  0:27 Steve Kargl
  0 siblings, 0 replies; only message in thread
From: Steve Kargl @ 2018-03-07  0:27 UTC (permalink / raw)
  To: fortran, gcc-patches

[-- Attachment #1: Type: text/plain, Size: 304 bytes --]

It seems the patch for PR fortran/83633 cured
PR fortran/64107.  I've added the code from
this PR to the test suite to ensure that it
doesn't get broken.  Patche attached.

2018-03-06  Steven G. Kargl  <kargl@gcc.gnu.org>

        PR fortran/64107
        * gfortran.dg/pr64107.f90: New test.

-- 
Steve

[-- Attachment #2: zxc --]
[-- Type: text/plain, Size: 849 bytes --]

Index: gcc/testsuite/gfortran.dg/pr64107.f90
===================================================================
--- gcc/testsuite/gfortran.dg/pr64107.f90	(nonexistent)
+++ gcc/testsuite/gfortran.dg/pr64107.f90	(working copy)
@@ -0,0 +1,30 @@
+! { dg-do compile }
+! PR fortran/64107
+! Code contribute by  fxcoudert at gcc dot gnu dot org
+! Appears to be fixed by patch for PR fortran/83633
+module m1
+
+contains
+  pure integer function foo()
+    foo = 2
+  end function
+end module
+
+subroutine test
+  use m1
+  integer :: x1(foo())
+end subroutine
+
+module m
+  use m1
+  integer :: x2(foo())     ! { dg-error "array with nonconstant bounds" }
+contains
+  subroutine sub
+    integer :: x3(foo())
+  end subroutine
+end module
+
+program p
+  use m1
+  integer :: x4(foo())     ! { dg-error "array with nonconstant bounds" }
+end program

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-03-07  0:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-07  0:27 [Committed] PR fortran/64107 -- new test Steve Kargl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).