[Bug fortran/39876] module procedure name that collides with the GNU intrinsic
--- Comment #8 from kargl at gcc dot gnu dot org 2009-09-11 22:11 --- Subject: Bug 39876 Author: kargl Date: Fri Sep 11 22:11:06 2009 New Revision: 151645 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=151645 Log: 2009-09-11 Steven G. Kargl ka...@gcc.gnu.org Backport from mainline, r147279: 2009-05-08 Janus Weil ja...@gcc.gnu.org PR fortran/39876 * intrinsic.c (gfc_is_intrinsic): Do not add the EXTERNAL attribute if the symbol is a module procedure. 2009-05-08 Janus Weil ja...@gcc.gnu.org PR fortran/39876 * gfortran.dg/intrinsic_3.f90: New. Added: branches/gcc-4_4-branch/gcc/testsuite/gfortran.dg/intrinsic_3.f90 - copied unchanged from r147279, trunk/gcc/testsuite/gfortran.dg/intrinsic_3.f90 Modified: branches/gcc-4_4-branch/gcc/fortran/ChangeLog branches/gcc-4_4-branch/gcc/fortran/intrinsic.c branches/gcc-4_4-branch/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39876
[Bug fortran/39876] module procedure name that collides with the GNU intrinsic
--- Comment #7 from pablomme at googlemail dot com 2009-09-02 00:10 --- *** Bug 41222 has been marked as a duplicate of this bug. *** -- pablomme at googlemail dot com changed: What|Removed |Added CC||pablomme at googlemail dot ||com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39876
[Bug fortran/39876] module procedure name that collides with the GNU intrinsic
--- Comment #5 from janus at gcc dot gnu dot org 2009-05-08 09:08 --- Subject: Bug 39876 Author: janus Date: Fri May 8 09:08:13 2009 New Revision: 147279 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=147279 Log: 2009-05-08 Janus Weil ja...@gcc.gnu.org PR fortran/39876 * intrinsic.c (gfc_is_intrinsic): Do not add the EXTERNAL attribute if the symbol is a module procedure. 2009-05-08 Janus Weil ja...@gcc.gnu.org PR fortran/39876 * gfortran.dg/intrinsic_3.f90: New. Added: trunk/gcc/testsuite/gfortran.dg/intrinsic_3.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/intrinsic.c trunk/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39876
[Bug fortran/39876] module procedure name that collides with the GNU intrinsic
--- Comment #6 from janus at gcc dot gnu dot org 2009-05-08 09:11 --- Fixed with r147279. Closing. -- janus at gcc dot gnu dot org changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39876
[Bug fortran/39876] module procedure name that collides with the GNU intrinsic
-- janus at gcc dot gnu dot org changed: What|Removed |Added AssignedTo|unassigned at gcc dot gnu |janus at gcc dot gnu dot org |dot org | Status|NEW |ASSIGNED Last reconfirmed|2009-04-24 05:22:22 |2009-05-07 19:11:13 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39876
[Bug fortran/39876] module procedure name that collides with the GNU intrinsic
--- Comment #4 from janus at gcc dot gnu dot org 2009-05-06 22:07 --- From the little I understand 'external' should not be set to 1 for functions listed as intrinsics but not f95 intrinsics. I don't see any reason why 'erfc' should get the EXTERNAL attribute here at all. In any case this happens in gfc_is_intrinsic: /* See if this intrinsic is allowed in the current standard. */ if (gfc_check_intrinsic_standard (isym, symstd, false, loc) == FAILURE) { if (gfc_option.warn_intrinsics_std) gfc_warning_now (The intrinsic '%s' at %L is not included in the selected standard but %s and '%s' will be treated as if declared EXTERNAL. Use an appropriate -std=* option or define -fall-intrinsics to allow this intrinsic., sym-name, loc, symstd, sym-name); sym-attr.external = 1; return false; } This code was committed as r138122 by Daniel K. as a fix for PR33141, but it doesn't seem quite right to me. Either one should avoid setting the EXTERNAL attribute here at all, or at least only do it if the symbol is not specified by the user as a module procedure. -- janus at gcc dot gnu dot org changed: What|Removed |Added CC||janus at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39876
[Bug fortran/39876] module procedure name that collides with the GNU intrinsic
--- Comment #3 from dominiq at lps dot ens dot fr 2009-04-24 12:32 --- This patch allows the code in comment #2 to compile with -std=f95. Don't know if it is correct. ... This will remove diagnostic, but not the cause. I think the problem comes from redundant information that are inconsistant, probably attr = { allocatable = 0, dimension = 0, external = 1,--- intrinsic = 0, ... if_source = IFSRC_DECL, proc = PROC_MODULE,--- cray_pointer = 0, cray_pointee = 0, alloc_comp = 0, pointer_comp = 0, private_comp = 0, zero_comp = 0, volatile_ns = 0x0 }, From the little I understand 'external' should not be set to 1 for functions listed as intrinsics but not f95 intrinsics. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39876
[Bug fortran/39876] module procedure name that collides with the GNU intrinsic
--- Comment #1 from kargl at gcc dot gnu dot org 2009-04-23 21:19 --- Upgrade to 4.4.0. The collision problem is fixed when you use -std=f95. There is however another problem. REMOVE:kargl[159] gfc4x -c -std=f95 j.f90 f951: internal compiler error: in build_function_decl, at fortran/trans-decl.c:1396 Please submit a full bug report, with preprocessed source if appropriate. See http://gcc.gnu.org/bugs.html for instructions. module p implicit none contains subroutine test() implicit none print *, avg(erfc) end subroutine test function avg(f) implicit none double precision :: avg interface double precision function f(x) implicit none double precision, intent(in) :: x end function f end interface avg = ( f(1.0D0) + f(2.0D0) ) / 2 end function avg function erfc(x) implicit none double precision, intent(in) :: x double precision :: erfc erfc = x end function erfc end module p -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39876
[Bug fortran/39876] module procedure name that collides with the GNU intrinsic
--- Comment #2 from kargl at gcc dot gnu dot org 2009-04-24 05:22 --- This patch allows the code in comment #2 to compile with -std=f95. Don't know if it is correct. REMOVE:kargl[194] svn diff trans-decl.c Index: trans-decl.c === --- trans-decl.c(revision 146588) +++ trans-decl.c(working copy) @@ -1396,7 +1396,6 @@ build_function_decl (gfc_symbol * sym) gfc_formal_arglist *f; gcc_assert (!sym-backend_decl); - gcc_assert (!sym-attr.external); /* Set the line and filename. sym-declared_at seems to point to the last statement for subroutines, but it'll do for now. */ -- kargl at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Known to fail||4.3.2 4.5.0 Last reconfirmed|-00-00 00:00:00 |2009-04-24 05:22:22 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39876