re PR c/27718 (ICE with sizeof of incomplete type)
PR c/27718 * c-typeck.c (c_expr_sizeof_type): Handle invalid types. * gcc.dg/sizeof-1.c: New test. From-SVN: r114234
This commit is contained in:
parent
d91d2db759
commit
16464cc1bb
@ -1,3 +1,8 @@
|
||||
2006-05-30 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
|
||||
|
||||
PR c/27718
|
||||
* c-typeck.c (c_expr_sizeof_type): Handle invalid types.
|
||||
|
||||
2006-05-30 Zdenek Dvorak <dvorakz@suse.cz>
|
||||
|
||||
PR tree-optimization/27779
|
||||
|
@ -2153,7 +2153,8 @@ c_expr_sizeof_type (struct c_type_name *t)
|
||||
type = groktypename (t);
|
||||
ret.value = c_sizeof (type);
|
||||
ret.original_code = ERROR_MARK;
|
||||
pop_maybe_used (C_TYPE_VARIABLE_SIZE (type));
|
||||
pop_maybe_used (type != error_mark_node
|
||||
? C_TYPE_VARIABLE_SIZE (type) : false);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,8 @@
|
||||
2006-05-30 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
|
||||
|
||||
PR c/27718
|
||||
* gcc.dg/sizeof-1.c: New test.
|
||||
|
||||
2006-05-30 Uros Bizjak <uros@kss-loka.si>
|
||||
|
||||
PR target/27790
|
||||
|
4
gcc/testsuite/gcc.dg/sizeof-1.c
Normal file
4
gcc/testsuite/gcc.dg/sizeof-1.c
Normal file
@ -0,0 +1,4 @@
|
||||
/* PR c/27718 */
|
||||
/* { dg-do compile } */
|
||||
|
||||
int i = sizeof(struct A[]); /* { dg-error "incomplete" } */
|
Loading…
Reference in New Issue
Block a user