re PR middle-end/59827 (ICE on array with incomplete element type)
PR middle-end/59827 * gimple-low.c (gimple_check_call_args): Don't use DECL_ARG_TYPE if it is error_mark_node. testsuite/ * gcc.dg/pr59827.c: New test. From-SVN: r206665
This commit is contained in:
parent
769a99095f
commit
0ef2774749
|
@ -1,3 +1,12 @@
|
|||
2014-01-16 Marek Polacek <polacek@redhat.com>
|
||||
|
||||
Backport from mainline
|
||||
2014-01-16 Marek Polacek <polacek@redhat.com>
|
||||
|
||||
PR middle-end/59827
|
||||
* gimple-low.c (gimple_check_call_args): Don't use DECL_ARG_TYPE if
|
||||
it is error_mark_node.
|
||||
|
||||
2014-01-14 Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
Revert:
|
||||
|
|
|
@ -249,6 +249,7 @@ gimple_check_call_args (gimple stmt, tree fndecl)
|
|||
break;
|
||||
arg = gimple_call_arg (stmt, i);
|
||||
if (p == error_mark_node
|
||||
|| DECL_ARG_TYPE (p) == error_mark_node
|
||||
|| arg == error_mark_node
|
||||
|| (!types_compatible_p (DECL_ARG_TYPE (p), TREE_TYPE (arg))
|
||||
&& !fold_convertible_p (DECL_ARG_TYPE (p), arg)))
|
||||
|
|
|
@ -1,3 +1,11 @@
|
|||
2014-01-16 Marek Polacek <polacek@redhat.com>
|
||||
|
||||
Backport from mainline
|
||||
2014-01-16 Marek Polacek <polacek@redhat.com>
|
||||
|
||||
PR middle-end/59827
|
||||
* gcc.dg/pr59827.c: New test.
|
||||
|
||||
2014-01-10 Richard Earnshaw <rearnsha@arm.com>
|
||||
|
||||
PR rtl-optimization/54300
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
/* PR middle-end/59827 */
|
||||
/* { dg-do compile } */
|
||||
|
||||
int
|
||||
foo (int p[2][]) /* { dg-error "array type has incomplete element type" } */
|
||||
{
|
||||
return p[0][0];
|
||||
}
|
||||
|
||||
void
|
||||
bar (void)
|
||||
{
|
||||
int p[2][1];
|
||||
foo (p); /* { dg-error "type of formal parameter 1 is incomplete" } */
|
||||
}
|
Loading…
Reference in New Issue