https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65800

            Bug ID: 65800
           Summary: gengtype aborts when run with -d (debug dump)
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: other
          Assignee: unassigned at gcc dot gnu.org
          Reporter: maltsevm at gmail dot com

Running gengtype with the following parameters (from GCC build directory):
$ ./gcc/gengtype -r ./gcc/gtype.state -d

Triggers assertion failure:
typedefs:
 pair: name = vec<ivarref_entry,va_gc>
 Type at 0x1e59200:
 kind = TYPE_USER_STRUCT
  pointer_to = 0x1e592c0
  gc_used = GC_POINTED_TO
  u.s.tag = vec<ivarref_entry,va_gc>
  fileloc: file = /home/miyuki/gcc/src/gcc/objc/objc-next-runtime-abi-02.c,
line = 2776
  u.s.fields =
    pair: name = va_gc
    Type at 0x1e59520:
    kind = TYPE_UNDEFINED
      pointer_to = (nil)
      gc_used = GC_UNUSED
gengtype: Internal error: abort in dump_type, at gengtype.c:4956

I noticed two situations, where this (i.e. presence of TYPE_UNDEFINED in dumps)
is possible: first, a combination of templates and typedefs (see comment for
function gengtype.c:set_gc_used_type). Second is rtl expressions with optional
fields (struct block_symbol in SYMBOL_REF).

Reply via email to