From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7265 invoked by alias); 26 Mar 2004 21:09:34 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 7187 invoked from network); 26 Mar 2004 21:09:32 -0000 Received: from unknown (HELO yosemite.airs.com) (209.128.65.135) by sources.redhat.com with SMTP; 26 Mar 2004 21:09:32 -0000 Received: (qmail 8035 invoked by uid 10); 26 Mar 2004 21:09:32 -0000 Received: (qmail 9228 invoked by uid 500); 26 Mar 2004 21:09:24 -0000 From: Ian Lance Taylor To: DJ Delorie Cc: gcc@gcc.gnu.org Subject: Re: sdbout.c tree check error References: <200403262103.i2QL3ldu015537@greed.delorie.com> Date: Fri, 26 Mar 2004 22:43:00 -0000 In-Reply-To: <200403262103.i2QL3ldu015537@greed.delorie.com> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2004-03/txt/msg01585.txt.bz2 DJ Delorie writes: > --host=i686-pc-linux-gnu > --target=i586-pc-msdosdjgpp > > In file included from ./tm.h:5, > from /greed/dj/djgpp/gcc/gcc/libgcc2.c:43: > /greed/dj/djgpp/gcc/gcc/config/i386/i386.h:1283: internal compiler error: tree check: expected record_type, union_type or qual_union_type; have enumeral_type in sdbout_one_type, at sdbout.c:1189 > > i386.h points at the end of a typedef enum; the sdbout code looks like this: > > if (TREE_CODE (type) == ENUMERAL_TYPE) > { > for (tem = TYPE_FIELDS (type); tem; tem = TREE_CHAIN (tem)) > > This code is many years old. > > Ideas? I suspect that the loop should use TYPE_VALUES rather than TYPE_FIELDS. They reference the same field in the structure, so it would presumably work without checking, but TYPE_VALUES is for enums and TYPE_FIELDS is for struct, etc. Ian