integrate.c (expand_inline_function): Check for error_mark_node in actual argument.
authorJakub Jelinek <jakub@redhat.com>
Thu, 26 Apr 2001 11:36:23 +0000 (13:36 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 26 Apr 2001 11:36:23 +0000 (13:36 +0200)
* integrate.c (expand_inline_function): Check for error_mark_node
in actual argument.

* gcc.dg/noncompile/20010425-1.c: New test.

From-SVN: r41587

gcc/ChangeLog
gcc/integrate.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/noncompile/20010425-1.c [new file with mode: 0644]

index 7fd71305dfc471bc097dfc22cdba450679b9cd17..092820c20603667ce25be2c8887a8a484f4ee180 100644 (file)
@@ -1,3 +1,8 @@
+2001-04-26  Jakub Jelinek  <jakub@redhat.com>
+
+       * integrate.c (expand_inline_function): Check for error_mark_node
+       in actual argument.
+
 2001-04-26  Jakub Jelinek  <jakub@redhat.com>
 
        * config/i386/i386.h (CC1_CPU_SPEC): Fix deprecation warnings for
index 1955c0511bdd101ceac61bd2004ee7d909f21be3..2417661cc1e3fecfc2f6d3ad57c12def92824fb5 100644 (file)
@@ -650,7 +650,8 @@ expand_inline_function (fndecl, parms, target, ignore, type,
       arg = TREE_VALUE (actual);
       mode = TYPE_MODE (DECL_ARG_TYPE (formal));
 
-      if (mode != TYPE_MODE (TREE_TYPE (arg))
+      if (arg == error_mark_node
+         || mode != TYPE_MODE (TREE_TYPE (arg))
          /* If they are block mode, the types should match exactly.
             They don't match exactly if TREE_TYPE (FORMAL) == ERROR_MARK_NODE,
             which could happen if the parameter has incomplete type.  */
index 8025228b6f6486e5b8670c2b2b09431ede86d48a..7fea9e9be4e8d3715d81d870ce764fca121d23d5 100644 (file)
@@ -1,3 +1,7 @@
+2001-04-26  Jakub Jelinek  <jakub@redhat.com>
+
+       * gcc.dg/noncompile/20010425-1.c: New test.
+
 2001-04-26  Nathan Sidwell <nathan@codesourcery.com>
 
        * g++.old-deja/g++.pt/mangle2.C: New test.
diff --git a/gcc/testsuite/gcc.dg/noncompile/20010425-1.c b/gcc/testsuite/gcc.dg/noncompile/20010425-1.c
new file mode 100644 (file)
index 0000000..e36269e
--- /dev/null
@@ -0,0 +1,9 @@
+__inline__ void bar(int x)
+{
+  (void)x;
+}
+
+void foo(void)
+{
+  bar(baz);  /* { dg-error "undeclared|for each function" } */
+}