Bug ID: 78029
           Summary: ICE in maybe_record_trace_start, at dwarf2cfi.c:2285
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot
          Reporter: pthaugen at gcc dot
                CC: dje at gcc dot, segher at gcc dot,
                    wschmidt at gcc dot
  Target Milestone: ---
              Host: powerpc64*-unknown-linux-gnu
            Target: powerpc64*-unknown-linux-gnu
             Build: powerpc64*-unknown-linux-gnu

The following reduced testcase shows an ICE that occurs when building
483.xalancbmk from cpu2006.

class A {
  static unsigned short fgXMLString[];
class B {
  bool hasFeature() const;
class XMLString {
  static int compareIString(const unsigned short *);
  static bool equals(const unsigned short *, const unsigned short *);
const short chDigit_1 = 1;
const unsigned short g1_0[]{chDigit_1};
const unsigned short g2_0[]{2};
const unsigned short g3_0[]{3, 4};
const unsigned short gRange[]{};
unsigned short *hasFeature_version;
inline bool XMLString::equals(const unsigned short *p1,
                              const unsigned short *p2) {
  if (p1 == 0)
    return false;
  while (*p1 == *p2) {
    if (!*p1)
      return true;
  return false;
bool B::hasFeature() const {
  bool anyVersion = hasFeature_version == 0 || !*hasFeature_version,
       version1_0 = XMLString::equals(hasFeature_version, g1_0);
  bool version2_0 = XMLString::equals(hasFeature_version, g2_0);
  bool version3_0 = XMLString::equals(hasFeature_version, g3_0);
  if (XMLString::compareIString(A::fgXMLString) && version2_0)
    return true;
  if (anyVersion || version1_0 || version2_0 || version3_0)
    return true;

$ /home/pthaugen/install/gcc/trunk/bin/g++ -s -m64 -O2 -mcpu=power6
DOMImplementationImpl.ii: In member function ‘bool B::hasFeature() const’:
DOMImplementationImpl.ii:41:1: internal compiler error: in
maybe_record_trace_start, at dwarf2cfi.c:2285
0x10665753 maybe_record_trace_start
0x10665c27 create_trace_edges
0x10665e07 scan_trace
0x10666aa3 create_cfi_notes
0x10666aa3 execute_dwarf2_frame
0x10666aa3 execute
Please submit a full bug report,
with preprocessed source if appropriate.

Reply via email to