public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re:  sdbout.c tree check error
@ 2004-03-27  0:40 Richard Kenner
  2004-03-27  0:48 ` DJ Delorie
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Kenner @ 2004-03-27  0:40 UTC (permalink / raw)
  To: dj; +Cc: gcc

    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?

TYPE_FIELDS should be TYPE_VALUES.

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

* Re: sdbout.c tree check error
  2004-03-27  0:40 sdbout.c tree check error Richard Kenner
@ 2004-03-27  0:48 ` DJ Delorie
  0 siblings, 0 replies; 4+ messages in thread
From: DJ Delorie @ 2004-03-27  0:48 UTC (permalink / raw)
  To: kenner; +Cc: gcc


> TYPE_FIELDS should be TYPE_VALUES.

Yeah, Ian suggested that too.  Seems to work, I'll work up a patch in
a bit (unless someone wants to beat me to it ;-)

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

* Re: sdbout.c tree check error
  2004-03-26 22:32 DJ Delorie
@ 2004-03-26 22:43 ` Ian Lance Taylor
  0 siblings, 0 replies; 4+ messages in thread
From: Ian Lance Taylor @ 2004-03-26 22:43 UTC (permalink / raw)
  To: DJ Delorie; +Cc: gcc

DJ Delorie <dj@redhat.com> 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

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

* sdbout.c tree check error
@ 2004-03-26 22:32 DJ Delorie
  2004-03-26 22:43 ` Ian Lance Taylor
  0 siblings, 1 reply; 4+ messages in thread
From: DJ Delorie @ 2004-03-26 22:32 UTC (permalink / raw)
  To: gcc


--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?

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

end of thread, other threads:[~2004-03-26 22:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-27  0:40 sdbout.c tree check error Richard Kenner
2004-03-27  0:48 ` DJ Delorie
  -- strict thread matches above, loose matches on Subject: below --
2004-03-26 22:32 DJ Delorie
2004-03-26 22:43 ` Ian Lance Taylor

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).