re PR fortran/54199 (Superfluous diagnostic "is also the name of an intrinsic" for internal procedures)

2012-08-09  Tobias Burnus  <burnus@net-b.de>

        PR fortran/54199
        * intrinsic.c (gfc_warn_intrinsic_shadow): Better warning
        for internal procedures.

2012-08-09  Tobias Burnus  <burnus@net-b.de>

        PR fortran/54199
        * gfortran.dg/intrinsic_shadow_4.f90: New.

From-SVN: r190251
This commit is contained in:
Tobias Burnus 2012-08-09 14:06:31 +02:00 committed by Tobias Burnus
parent 6738604187
commit 62d6a5bbc8
4 changed files with 24 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2012-08-09 Tobias Burnus <burnus@net-b.de>
PR fortran/54199
* intrinsic.c (gfc_warn_intrinsic_shadow): Better warning
for internal procedures.
2012-08-06 Janus Weil <janus@gcc.gnu.org>
PR fortran/35831

View File

@ -4503,7 +4503,7 @@ gfc_warn_intrinsic_shadow (const gfc_symbol* sym, bool in_module, bool func)
return;
/* Emit the warning. */
if (in_module)
if (in_module || sym->ns->proc_name)
gfc_warning ("'%s' declared at %L may shadow the intrinsic of the same"
" name. In order to call the intrinsic, explicit INTRINSIC"
" declarations may be required.",

View File

@ -1,3 +1,8 @@
2012-08-09 Tobias Burnus <burnus@net-b.de>
PR fortran/54199
* gfortran.dg/intrinsic_shadow_4.f90: New.
2012-08-08 H.J. Lu <hongjiu.lu@intel.com>
* gcc.dg/tree-ssa/slsr-30.c: Require non-ilp32. Remove

View File

@ -0,0 +1,12 @@
! { dg-do compile }
! { dg-options "-Wall" }
!
! PR fortran/54199
!
subroutine test()
contains
real function fraction(x) ! { dg-warning "'fraction' declared at .1. may shadow the intrinsic of the same name. In order to call the intrinsic, explicit INTRINSIC declarations may be required." }
real :: x
fraction = x
end function fraction
end subroutine test