This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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]

Fwd: gfortran doesn't call targetm.init_builtins()


Forwarded to the fortran list since that is also where fortran patches go.

-- Pinski

Begin forwarded message:

From: Ira Rosen <IRAR@il.ibm.com>
Date: January 12, 2005 7:00:10 AM EST
To: gcc-patches@gcc.gnu.org
Cc: Dorit Naishlos <DORIT@il.ibm.com>
Subject: gfortran doesn't call targetm.init_builtins()





Any reason why there is no call to targetm.init_builtins() for Fortran?
(For C/C++ it is called in c-common.c c_common_nodes_and_builtins() and
for Ada in ada/utils.c gnat_install_builtins ()).


Is it O.K. to add it as following in fortran/f95-lang.c:

*************** gfc_init_builtin_functions (void)
*** 863,868 ****
--- 863,870 ----
    ftype = build_function_type (pvoid_type_node, tmp);
    gfc_define_builtin ("__builtin_alloca", ftype, BUILT_IN_ALLOCA,
                      "alloca", false);
+
+   targetm.init_builtins ();
  }

Thanks,
Ira



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