Commit 3b07c79b by Jakub Jelinek Committed by Jakub Jelinek

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
parent e9070e7b
2001-04-26 Jakub Jelinek <jakub@redhat.com> 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 * config/i386/i386.h (CC1_CPU_SPEC): Fix deprecation warnings for
-m386 and -m486. -m386 and -m486.
......
...@@ -650,7 +650,8 @@ expand_inline_function (fndecl, parms, target, ignore, type, ...@@ -650,7 +650,8 @@ expand_inline_function (fndecl, parms, target, ignore, type,
arg = TREE_VALUE (actual); arg = TREE_VALUE (actual);
mode = TYPE_MODE (DECL_ARG_TYPE (formal)); 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. /* If they are block mode, the types should match exactly.
They don't match exactly if TREE_TYPE (FORMAL) == ERROR_MARK_NODE, They don't match exactly if TREE_TYPE (FORMAL) == ERROR_MARK_NODE,
which could happen if the parameter has incomplete type. */ which could happen if the parameter has incomplete type. */
......
2001-04-26 Jakub Jelinek <jakub@redhat.com>
* gcc.dg/noncompile/20010425-1.c: New test.
2001-04-26 Nathan Sidwell <nathan@codesourcery.com> 2001-04-26 Nathan Sidwell <nathan@codesourcery.com>
* g++.old-deja/g++.pt/mangle2.C: New test. * g++.old-deja/g++.pt/mangle2.C: New test.
......
__inline__ void bar(int x)
{
(void)x;
}
void foo(void)
{
bar(baz); /* { dg-error "undeclared|for each function" } */
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment