This is the mail archive of the gcc-patches@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]

[Fortran] Backport of revision 147279


I've committed the following backport from mainline to 4_4-branch.
The commit was done after a bootstrap and a succesful regression
test.


2009-09-11  Steven G. Kargl  <kargl@gcc.gnu.org>

2009-05-08  Janus Weil  <janus@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  <janus@gcc.gnu.org>

    PR fortran/39876
    * gfortran.dg/intrinsic_3.f90: New.

-- 
Steve
Property changes on: .
___________________________________________________________________
Added: svn:mergeinfo
   Merged /trunk:r147279

Index: gcc/testsuite/ChangeLog
===================================================================
--- gcc/testsuite/ChangeLog	(revision 151644)
+++ gcc/testsuite/ChangeLog	(working copy)
@@ -1,3 +1,12 @@
+2009-09-11  Steven G. Kargl  <kargl@gcc.gnu.org>
+
+	Backported from mainline:
+	2009-05-08  Janus Weil  <janus@gcc.gnu.org>
+
+	PR fortran/39876
+	* gfortran.dg/intrinsic_3.f90: New.
+
+
 2009-09-10  H.J. Lu  <hongjiu.lu@intel.com>
 
 	* gcc.dg/pr41241.c: Removed.
Index: gcc/fortran/intrinsic.c
===================================================================
--- gcc/fortran/intrinsic.c	(revision 151644)
+++ gcc/fortran/intrinsic.c	(working copy)
@@ -836,13 +836,17 @@ gfc_is_intrinsic (gfc_symbol* sym, int s
   /* 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;
+      if (sym->attr.proc == PROC_UNKNOWN)
+	{
+	  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);
+	  gfc_add_external (&sym->attr, &loc);
+	}
 
       return false;
     }
Index: gcc/fortran/ChangeLog
===================================================================
--- gcc/fortran/ChangeLog	(revision 151644)
+++ gcc/fortran/ChangeLog	(working copy)
@@ -1,3 +1,13 @@
+2009-09-11  Steven G. Kargl  <kargl@gcc.gnu.org>
+
+	Backported from mainline:
+	2009-05-08  Janus Weil  <janus@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-09-05  Paul Thomas  <pault@gcc.gnu.org>
 
 	PR fortran/41258

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