mirror of git://gcc.gnu.org/git/gcc.git
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
This commit is contained in:
parent
af89bd042d
commit
704fc8502f
|
|
@ -1,3 +1,8 @@
|
||||||
|
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>
|
2012-10-18 Tobias Burnus <burnus@net-b.de>
|
||||||
|
|
||||||
PR fortran/54884
|
PR fortran/54884
|
||||||
|
|
|
||||||
|
|
@ -2674,6 +2674,8 @@ conv_function_val (gfc_se * se, gfc_symbol * sym, gfc_expr * expr)
|
||||||
if (!sym->backend_decl)
|
if (!sym->backend_decl)
|
||||||
sym->backend_decl = gfc_get_extern_function_decl (sym);
|
sym->backend_decl = gfc_get_extern_function_decl (sym);
|
||||||
|
|
||||||
|
TREE_USED (sym->backend_decl) = 1;
|
||||||
|
|
||||||
tmp = sym->backend_decl;
|
tmp = sym->backend_decl;
|
||||||
|
|
||||||
if (sym->attr.cray_pointee)
|
if (sym->attr.cray_pointee)
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
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>
|
2012-10-19 Greta Yorsh <Greta.Yorsh@arm.com>
|
||||||
|
|
||||||
* lib/target-supports.exp (check_effective_target_arm_prefer_ldrd_strd):
|
* lib/target-supports.exp (check_effective_target_arm_prefer_ldrd_strd):
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
! { 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" } }
|
||||||
Loading…
Reference in New Issue