optabs.c (init_one_libfunc): Create a dummy function type instead of using error_mark...
authorRichard Henderson <rth@redhat.com>
Wed, 26 Sep 2001 20:02:51 +0000 (13:02 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Wed, 26 Sep 2001 20:02:51 +0000 (13:02 -0700)
        * optabs.c (init_one_libfunc): Create a dummy function type
        instead of using error_mark_node.

From-SVN: r45830

gcc/ChangeLog
gcc/optabs.c

index 891bfef195b61965cd86b7835dade8cd93c2851e..a63b3030d9b045eb3c1466669127adf0bc24c4d2 100644 (file)
@@ -1,3 +1,8 @@
+2001-09-26  Richard Henderson  <rth@redhat.com>
+
+       * optabs.c (init_one_libfunc): Create a dummy function type
+       instead of using error_mark_node.
+
 2001-09-26  Neil Booth  <neil@daikokuya.demon.co.uk>
 
        * cpphash.h (struct _cpp_buff, _cpp_get_buff, _cpp_release_buff,
index 6421adf6ef3d239bb210fa23db29e5ab39edf7ac..035beac049349db14ac4e4a35927a295eec8ce8c 100644 (file)
@@ -4689,9 +4689,9 @@ init_one_libfunc (name)
 {
   /* Create a FUNCTION_DECL that can be passed to ENCODE_SECTION_INFO.  */
   /* ??? We don't have any type information except for this is
-     a function.  See if error_mark_node is good enough.  */
+     a function.  Pretend this is "int foo()".  */
   tree decl = build_decl (FUNCTION_DECL, get_identifier (name),
-                         error_mark_node);
+                         build_function_type (integer_type_node, NULL_TREE));
   DECL_ARTIFICIAL (decl) = 1;
   DECL_EXTERNAL (decl) = 1;
   TREE_PUBLIC (decl) = 1;