This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/65242] [5 Regression] ICE (in gen_add2_insn, at optabs.c:4761) on powerpc64le-linux-gnu


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

--- Comment #2 from Matthias Klose <doko at gcc dot gnu.org> ---
shorter testcase from another package:

$ g++ -c -g -O3 -Wno-write-strings Channel.ii 
Channel.ii: In member function 'void C::m_fn2()':
Channel.ii:46:1: internal compiler error: in gen_add2_insn, at optabs.c:4761
 }
 ^
Please submit a full bug report,
with preprocessed source if appropriate.

$ cat Channel.ii
enum tCapiStructType { cxt_FacilityReq_WakeUp, cxt_FacilityReq_WakeUpParam };
class CCStruct {
public:
  virtual ~CCStruct();
  CCStruct(tCapiStructType, void *);
  tCapiStructType m_DataType;
  char *m_Format;
  int m_MaxLen;
  unsigned char *m_pData;
};
char a;
class A {
public:
  A();
};
class B {
public:
  void m_fn1(unsigned *);
};
class C {
  void m_fn2();
  int m_fn3();
};
unsigned b;
int c;
CCStruct::CCStruct(tCapiStructType p1, void *p2)
    : m_DataType(p1), m_Format(&a), m_MaxLen(), m_pData((unsigned char *)p2) {}

#pragma pack(1)
class D : CCStruct {
public:
  D()
      : CCStruct(cxt_FacilityReq_WakeUpParam, &pCalledPartyNumber),
        pCalledPartyNumber() {}
  A *pCalledPartyNumber;
  A m_CalledPartyNumber;
};

void C::m_fn2() {
  do {
    B d;
    D e;
    d.m_fn1(&b);
    new D[c];
  } while (m_fn3());
}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]