]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/fortran/trans-decl.c
gfortran.h (gfc_options_t): Add flag_allow_leading_underscore.
[thirdparty/gcc.git] / gcc / fortran / trans-decl.c
index 000772c2090785578c8db1cdbb4a474fef79e577..3028c8fa422dda4af0e41eb602f776e8349205f3 100644 (file)
@@ -1060,7 +1060,7 @@ gfc_get_extern_function_decl (gfc_symbol * sym)
   gfc_expr e;
   gfc_intrinsic_sym *isym;
   gfc_expr argexpr;
-  char s[GFC_MAX_SYMBOL_LEN + 13]; /* "f2c_specific" and '\0'.  */
+  char s[GFC_MAX_SYMBOL_LEN + 23]; /* "_gfortran_f2c_specific" and '\0'.  */
   tree name;
   tree mangled_name;
 
@@ -1108,10 +1108,10 @@ gfc_get_extern_function_decl (gfc_symbol * sym)
        {
          /* Specific which needs a different implementation if f2c
             calling conventions are used.  */
-         sprintf (s, "f2c_specific%s", e.value.function.name);
+         sprintf (s, "_gfortran_f2c_specific%s", e.value.function.name);
        }
       else
-       sprintf (s, "specific%s", e.value.function.name);
+       sprintf (s, "_gfortran_specific%s", e.value.function.name);
 
       name = get_identifier (s);
       mangled_name = name;
@@ -2082,13 +2082,15 @@ gfc_build_intrinsic_function_decls (void)
                                     gfc_charlen_type_node, pchar_type_node);
 
   gfor_fndecl_si_kind =
-    gfc_build_library_function_decl (get_identifier ("selected_int_kind"),
+    gfc_build_library_function_decl (get_identifier
+                                       (PREFIX("selected_int_kind")),
                                      gfc_int4_type_node,
                                      1,
                                      pvoid_type_node);
 
   gfor_fndecl_sr_kind =
-    gfc_build_library_function_decl (get_identifier ("selected_real_kind"),
+    gfc_build_library_function_decl (get_identifier 
+                                       (PREFIX("selected_real_kind")),
                                      gfc_int4_type_node,
                                      2, pvoid_type_node,
                                      pvoid_type_node);