[Bug objc/47073] New: ICE when producing error for method argument which "does not have know size"
nicola at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Dec 27 23:14:00 GMT 2010
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47073
Summary: ICE when producing error for method argument which
"does not have know size"
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: objc
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: nicola@gcc.gnu.org
The following testcase crashes the compiler. It is a regression; it works with
my stock "gcc version 4.1.2 20080704 (Red Hat 4.1.2-48)" compiler --
[nicola@nicola objc.dg]$ gcc incomplete-type-1.m -c
cc1obj: error: type ‘({anonymous})’ does not have a known size
cc1obj: error: type ‘({anonymous})’ does not have a known size
(the error message is not great though)
Instead, with GCC 4.6 I get --
[nicola@nicola objc.dg]$ gcc incomplete-type-1.m -c -Wall
‘
tree check: expected tree that contains ‘decl minimal’ structure, have
‘enumeral_type’ in c_tree_printer, at c-objc-common.c:110
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
Thanks
/* Contributed by Nicola Pero <nicola.pero@meta-innovation.com>, December 2010.
*/
/* { dg-do compile } */
#include <objc/objc.h>
enum type1;
struct type2;
@interface MyObject
- (void) method1: (enum type1)argument;
- (void) method2: (struct type2)argument;
@end
@implementation MyObject
- (void) method1: (enum type1)argument /* { dg-error "does not have a known
size" } */
{
return;
}
- (void) method2: (struct type2)argument /* { dg-error "does not have a known
size" } */
{
return;
}
@end
More information about the Gcc-bugs
mailing list