public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] PR47266
@ 2015-11-10 14:41 Dominique d'Humières
  2015-11-11 19:19 ` Jerry DeLisle
  0 siblings, 1 reply; 2+ messages in thread
From: Dominique d'Humières @ 2015-11-10 14:41 UTC (permalink / raw)
  To: gfortran; +Cc: gcc-patches

I’ld like to close PR47266 as FIXED after the commit on trunk and 5.2.1 of the following test extracted from
https://gcc.gnu.org/ml/fortran/2011-01/msg00094.html. The test succeeds on trunk and 5.2.1 (see https://gcc.gnu.org/ml/gcc-testresults/2015-11/msg00965.html in which it was included).

OK for trunk and 5.2.1?

Dominique

Index: gcc/testsuite/ChangeLog
===================================================================
--- gcc/testsuite/ChangeLog	(revision 229793)
+++ gcc/testsuite/ChangeLog	(working copy)
@@ -1,3 +1,9 @@
+2015-11-10  Dominique d'Humieres <dominiq@lps.ens.fr>
+
+	PR fortran/47266
+	* gfortran.dg/warn_unused_function_2.f90: Add a new test.
+
2015-11-10  Ilya Enkovich  <enkovich.gnu@gmail.com>

 	 * gcc.target/i386/mask-pack.c: New test.

Index: gcc/testsuite/gfortran.dg/module_private_2.f90
===================================================================
--- gcc/testsuite/gfortran.dg/module_private_2.f90	(nonexistent)
+++ gcc/testsuite/gfortran.dg/module_private_2.f90	(working copy)
@@ -0,0 +1,34 @@
+! { dg-do compile }
+! { dg-options "-O2 -fdump-tree-optimized" }
+!
+! PR fortran/47266
+!
+! Check whether the private procedure "priv" is optimized away
+!
+module m
+  implicit none
+  private :: priv
+  private :: export1, export2
+  public  :: pub
+contains
+  integer function priv()
+    priv = 44
+  end function priv
+  integer function export1()
+    export1 = 45
+  end function export1
+  function export2() bind(C) ! { dg-warning "is marked PRIVATE" }
+    use iso_c_binding, only: c_int
+    integer(c_int) :: export2
+    export2 = 46
+  end function export2
+  subroutine pub(a,b)
+    integer :: a
+    procedure(export1), pointer :: b
+    a = priv()
+    b => export1
+  end subroutine pub
+end module m
+! { dg-final { scan-tree-dump-times "priv" 0 "optimized" } }
+! { dg-final { scan-tree-dump-times "export1 \\(\\)" 1 "optimized" } }
+! { dg-final { scan-tree-dump-times "export2 \\(\\)" 1 "optimized" } }

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] PR47266
  2015-11-10 14:41 [PATCH] PR47266 Dominique d'Humières
@ 2015-11-11 19:19 ` Jerry DeLisle
  0 siblings, 0 replies; 2+ messages in thread
From: Jerry DeLisle @ 2015-11-11 19:19 UTC (permalink / raw)
  To: Dominique d'Humières, gfortran; +Cc: gcc-patches

On 11/10/2015 06:41 AM, Dominique d'Humières wrote:
> Index: gcc/testsuite/ChangeLog
> ===================================================================
> --- gcc/testsuite/ChangeLog	(revision 229793)
> +++ gcc/testsuite/ChangeLog	(working copy)
> @@ -1,3 +1,9 @@
> +2015-11-10  Dominique d'Humieres <dominiq@lps.ens.fr>
> +
> +	PR fortran/47266
> +	* gfortran.dg/warn_unused_function_2.f90: Add a new test.
>

OK for trunk

Jerry

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-11-11 19:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-10 14:41 [PATCH] PR47266 Dominique d'Humières
2015-11-11 19:19 ` Jerry DeLisle

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).