[Bug fortran/36771] Non-Standard addition for C_LOC and character strings

burnus at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Fri Dec 12 16:20:00 GMT 2008



------- Comment #2 from burnus at gcc dot gnu dot org  2008-12-12 16:19 -------
I have the gut feeling that the program in comment 1 is valid, even though
gfortran, g95, ifort and NAG f95 reject it. See PR 38506.

Regarding the c_loc: I think that should be possible; I'm not 100% sure whether
there exists scenarios where it causes problems, but ad hoc I don't see any.

Patch:

--- resolve.c   (Revision 142706)
+++ resolve.c
@@ -2165,7 +2165,7 @@ gfc_iso_c_func_interface (gfc_symbol *sy
                       if (args_sym->attr.dimension != 0
                           && (args_sym->as && args_sym->as->rank == 0))
                         {
-                          gfc_error_now ("Allocatable variable '%s' used as a
"
+                          gfc_notify_std (GFC_STD_F2003, "Allocatable variable
'%s' used as a "
                                          "parameter to '%s' at %L must not be
"
                                          "an array of zero size",
                                          args_sym->name, sym->name,


-- 

burnus at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |burnus at gcc dot gnu dot
                   |                            |org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36771



More information about the Gcc-bugs mailing list