public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug objc/27240]  New: [4.1/4.2 regression] ICE with invalid fields
@ 2006-04-21 18:26 reichelt at gcc dot gnu dot org
  2006-04-21 19:05 ` [Bug objc/27240] " pinskia at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-04-21 18:26 UTC (permalink / raw)
  To: gcc-bugs

Compiling the following invalid objc testcase results in an ICE:

============================
void foo()
{
  struct A a;
  a.i;
}
============================

bug1.m: In function 'foo':
bug1.m:3: error: storage size of 'a' isn't known
bug1.m:4: internal compiler error: tree check: expected class 'type', have
'exceptional' (error_mark) in objc_is_public, at objc/objc-act.c:7171
Please submit a full bug report, [etc.]


The following patch fixes the problem for me, but hasn't been bootstrapped yet:

===================================================================
--- gcc/gcc/objc/objc-act.c     (revision 113130)
+++ gcc/gcc/objc/objc-act.c     (working copy)
@@ -7168,6 +7168,9 @@
     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)
===================================================================


-- 
           Summary: [4.1/4.2 regression] ICE with invalid fields
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code, error-recovery
          Severity: normal
          Priority: P3
         Component: objc
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: reichelt at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27240


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2006-05-15 19:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-21 18:26 [Bug objc/27240] New: [4.1/4.2 regression] ICE with invalid fields reichelt at gcc dot gnu dot org
2006-04-21 19:05 ` [Bug objc/27240] " pinskia at gcc dot gnu dot org
2006-05-04 20:04 ` reichelt at gcc dot gnu dot org
2006-05-05 19:48 ` reichelt at gcc dot gnu dot org
2006-05-05 19:51 ` reichelt at gcc dot gnu dot org
2006-05-05 19:54 ` reichelt at gcc dot gnu dot org
2006-05-15 19:33 ` patchapp at dberlin dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).