Commit 704fc850 by Janus Weil

re PR fortran/54224 (Warn for unused internal procedures)

2012-10-19  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/54224
	* trans-expr.c (conv_function_val): Set TREE_USED.

2012-10-19  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/54224
	* gfortran.dg/warn_unused_function.f90: New.

From-SVN: r192620
parent af89bd04
2012-10-19 Janus Weil <janus@gcc.gnu.org>
PR fortran/54224
* trans-expr.c (conv_function_val): Set TREE_USED.
2012-10-18 Tobias Burnus <burnus@net-b.de>
PR fortran/54884
......
......@@ -2674,6 +2674,8 @@ conv_function_val (gfc_se * se, gfc_symbol * sym, gfc_expr * expr)
if (!sym->backend_decl)
sym->backend_decl = gfc_get_extern_function_decl (sym);
TREE_USED (sym->backend_decl) = 1;
tmp = sym->backend_decl;
if (sym->attr.cray_pointee)
......
2012-10-19 Janus Weil <janus@gcc.gnu.org>
PR fortran/54224
* gfortran.dg/warn_unused_function.f90: New.
2012-10-19 Greta Yorsh <Greta.Yorsh@arm.com>
* lib/target-supports.exp (check_effective_target_arm_prefer_ldrd_strd):
......
! { dg-do compile }
! { dg-options "-Wunused-function" }
!
! PR 54224: [4.8 Regression] Bogus -Wunused-function warning with static function
!
! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
module mod_say_hello
private :: hello_integer
contains
subroutine say_hello()
call hello_integer(123)
end subroutine
subroutine hello_integer( a )
integer, intent(in) :: a
print *, "Hello ", a, "!"
end subroutine
end module
! { dg-final { cleanup-modules "mod_say_hello" } }
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