This program causes an ICE in today's sources.
Created attachment 7506 [details] Code that causes ICE to Objective C compiler mgd@arrow[~] $ gcc -v Reading specs from /packages/gcc/lib/gcc/i686-pc-linux-gnu/4.0.0/specs Configured with: /src/gcc/configure --prefix=/packages/gcc --srcdir=/src/gcc Thread model: posix gcc version 4.0.0 20041109 (experimental) $ gcc in.m -lobjc in.m: In function '-[ListIndex(linked) _next]': in.m:35: internal compiler error: in check_pointer_types_r, at gimplify.c:4214 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. Compare to: $ gcc -DCAST_TYPE=List in.m -lobjc
Confirmed, reduced testcase: @interface List { @public int firstLink; } @end @interface ListIndex_linked { @public List *collection; int link; } @end @interface List_linked: List @end @implementation List @end @implementation ListIndex_linked - next { link = ((List_linked*)collection)->firstLink; } @end
This is a recent regression because it was fine with 20041019. I think it was caused by: 2004-11-02 Ziemowit Laski <zlaski@apple.com> * c-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Remove. (c_types_compatible_p): Move function definition... * c-objc-common.c (c_types_compatible_p): ...here. * c-objc-common.h (LANG_HOOKS_TYPES_COMPATIBLE_P): Moved here from c-lang.c.
I'll take a look.
Patch posted here: http://gcc.gnu.org/ml/gcc-patches/2004-11/msg00925.html Awaiting feedback.
Fwiw, this does prevent the related ICEs I had..
This should not be in waiting (waiting is mainly to get information from the reporter and not other developers).
*** Bug 18771 has been marked as a duplicate of this bug. ***
Objective-C is not part of the release criteria; removing target milestone.
(In reply to comment #9) > Objective-C is not part of the release criteria; removing target milestone. I should note that this PR blocks building GNUstep with 4.0.0.
(In reply to comment #9) > Objective-C is not part of the release criteria; removing target milestone. Mark, allow me to mention that GCC offers the only free Objective-C compiler with modern features (like Categories and Exceptions) and is as such the only free Objective-C Compiler available to the GNUstep ( http://www.gnustep.org/ ) and swarm ( http://www.swarm.org/ ) folks (The other free Objective-C Compiler is POC ( http://users.pandora.be/stes/compiler.html ) which has the problem that it's Maintainer David Stes is constantly fighting any additions which would make POC useful for other stuff than it's own small class library). Whoever decides what the release criteria are should put that into consideration. regards, Lars
Of course, for this particular bug, someone could just review the patch that I posted two months ago...
*** Bug 19553 has been marked as a duplicate of this bug. ***
With --disable-checking, we get the correct code but we don't get an ICE.
Subject: Bug 18408 CVSROOT: /cvs/gcc Module name: gcc Changes by: pinskia@gcc.gnu.org 2005-01-25 03:13:11 Modified files: gcc/objc : ChangeLog objc-act.c objc-act.h objc-lang.c Log message: 2005-01-25 Alexander Malmberg <alexander@malmberg.org> PR objc/18408 * objc-act.c (objc_types_compatible_p): New function. * objc-act.h (objc_types_compatible_p): Declare. * objc-lang.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Define. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/objc/ChangeLog.diff?cvsroot=gcc&r1=1.25&r2=1.26 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/objc/objc-act.c.diff?cvsroot=gcc&r1=1.262&r2=1.263 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/objc/objc-act.h.diff?cvsroot=gcc&r1=1.33&r2=1.34 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/objc/objc-lang.c.diff?cvsroot=gcc&r1=1.52&r2=1.53
Subject: Bug 18408 CVSROOT: /cvs/gcc Module name: gcc Changes by: pinskia@gcc.gnu.org 2005-01-25 03:16:48 Modified files: gcc/testsuite : ChangeLog Added files: gcc/testsuite/objc.dg: comp-types-7.m Log message: 2005-01-25 Alexander Malmberg <alexander@malmberg.org> PR objc/18408 * objc.dg/comp-types-7.m: New test. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4933&r2=1.4934 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/objc.dg/comp-types-7.m.diff?cvsroot=gcc&r1=1.1&r2=1.2
Fixed.