Commit 755fdaab by Dominique d'Humieres Committed by Dominique d'Humieres

re PR fortran/47266 (Optimization: Declare PRIVATE module procedures as…

re PR fortran/47266 (Optimization: Declare PRIVATE module procedures as "TREE_PUBLIC = 0" ("static function"))

2015-11-13  Dominique d'Humieres <dominiq@lps.ens.fr>

	PR fortran/47266
	* gfortran.dg/warn_unused_function_2.f90: New test.

From-SVN: r230298
parent 360e3406
2015-11-13 Alan Hayward <alan.hayward@arm.com>
PR tree-optimization/66558
* gcc.dg/vect/pr65947-1.c: Add checks.
* gcc.dg/vect/pr65947-2.c: Add checks.
* gcc.dg/vect/pr65947-3.c: Add checks.
* gcc.dg/vect/pr65947-4.c: Add checks.
* gcc.dg/vect/pr65947-5.c: Add checks.
* gcc.dg/vect/pr65947-6.c: Add checks.
* gcc.dg/vect/pr65947-10.c: Add checks.
* gcc.dg/vect/pr65947-12.c: New test.
* gcc.dg/vect/pr65947-13.c: New test.
2015-11-13 Dominique d'Humieres <dominiq@lps.ens.fr>
PR fortran/47266
* gfortran.dg/warn_unused_function_2.f90: New test.
2015-11-13 Christophe Lyon <christophe.lyon@linaro.org>
......
! { 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" } }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment