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:
parent
e9070e7b80
commit
3b07c79b24
@ -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
|
||||
|
@ -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. */
|
||||
|
@ -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.
|
||||
|
9
gcc/testsuite/gcc.dg/noncompile/20010425-1.c
Normal file
9
gcc/testsuite/gcc.dg/noncompile/20010425-1.c
Normal file
@ -0,0 +1,9 @@
|
||||
__inline__ void bar(int x)
|
||||
{
|
||||
(void)x;
|
||||
}
|
||||
|
||||
void foo(void)
|
||||
{
|
||||
bar(baz); /* { dg-error "undeclared|for each function" } */
|
||||
}
|
Loading…
Reference in New Issue
Block a user