diff options
-rw-r--r-- | gcc/objc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/objc/objc-act.c | 3 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/objc.dg/member-1.m | 5 |
4 files changed, 18 insertions, 0 deletions
diff --git a/gcc/objc/ChangeLog b/gcc/objc/ChangeLog index 67ccd3b..2953216 100644 --- a/gcc/objc/ChangeLog +++ b/gcc/objc/ChangeLog @@ -1,3 +1,8 @@ +2006-05-05 Volker Reichelt <reichelt@igpm.rwth-aachen.de> + + PR objc/27240 + * objc-act.c (objc_is_public): Return early on invalid type. + 2006-03-02 Fariborz Jahanian <fjahanian@apple.com> * objc-act.c (init_module_descriptor): Remove file name from diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c index a90c061..7ed00ae 100644 --- a/gcc/objc/objc-act.c +++ b/gcc/objc/objc-act.c @@ -7168,6 +7168,9 @@ objc_is_public (tree expr, tree identifier) return 1; #endif + if (TREE_TYPE (expr) == error_mark_node) + return 1; + basetype = TYPE_MAIN_VARIANT (TREE_TYPE (expr)); if (basetype && TREE_CODE (basetype) == RECORD_TYPE) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index ad986c9..4b75dbe 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2006-05-05 Volker Reichelt <reichelt@igpm.rwth-aachen.de> + + PR objc/27240 + * objc.dg/member-1.m: New test. + 2006-05-05 Steve Ellcey <sje@cup.hp.com> * gfortran.dg/large_real_kind_form_io_2.f90: Use nearest. diff --git a/gcc/testsuite/objc.dg/member-1.m b/gcc/testsuite/objc.dg/member-1.m new file mode 100644 index 0000000..4c7b5ae --- /dev/null +++ b/gcc/testsuite/objc.dg/member-1.m @@ -0,0 +1,5 @@ +void foo() +{ + struct A a; /* { dg-error "storage size" } */ + a.i; +} |