This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]