integrate.c (expand_inline_function): Check for error_mark_node in actual argument.

* integrate.c (expand_inline_function): Check for error_mark_node
	in actual argument.

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

From-SVN: r41587
This commit is contained in:
Jakub Jelinek 2001-04-26 13:36:23 +02:00 committed by Jakub Jelinek
parent e9070e7b80
commit 3b07c79b24
4 changed files with 20 additions and 1 deletions

View 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

View 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. */

View 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.

View File

@ -0,0 +1,9 @@
__inline__ void bar(int x)
{
(void)x;
}
void foo(void)
{
bar(baz); /* { dg-error "undeclared|for each function" } */
}