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

            Bug ID: 79786
           Summary: ICE tree check: expected class 'type', have
                    'declaration' (var_decl) in iamcu_alignment, at
                    config/i386/i386.c:30263
           Product: gcc
           Version: 7.0.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gerhard.steinmetz.fort...@t-online.de
  Target Milestone: ---

Over 400 testfiles from ./gcc/testsuite/g++.dg/*
expose a symptom with options "-m32 -miamcu"
and version 6/7 (-miamcu not implemented before) :
  ./g++.dg/rtti/anon-ns1.C
  ./g++.dg/opt/inline1.C
  ./g++.dg/abi/inline1.C
  ./g++.dg/abi/rtti3.C
  ./g++.dg/eh/throw3.C
  ./g++.dg/abi/vtt1.C
  ./g++.dg/opt/vt1.C
  ...


$ cat vt1.C   # for example
struct S
{
  virtual void vm (void) {};
} x;


$ gcc-7-20170226 -m32 -miamcu -c vt1.C
vt1.C:4:4: internal compiler error: tree check: expected class 'type', have
'declaration' (var_decl) in iamcu_alignment, at config/i386/i386.c:30263
 } x;
    ^
0x1090287 tree_class_check_failed(tree_node const*, tree_code_class, char
const*, int, char const*)
        ../../gcc/tree.c:9866
0x1111538 tree_class_check(tree_node*, tree_code_class, char const*, int, char
const*)
        ../../gcc/tree.h:3187
0x1111538 iamcu_alignment
        ../../gcc/config/i386/i386.c:30263
0x115203b ix86_data_alignment(tree_node*, int, bool)
        ../../gcc/config/i386/i386.c:30317
0x7d2cff emit_tinfo_decl(tree_node*)
        ../../gcc/cp/rtti.c:1616
0x777894 c_parse_final_cleanups()
        ../../gcc/cp/decl2.c:4568

Reply via email to