[llvm-bugs] [Bug 45432] New: Assertion failed: (isImm() && "Wrong MachineOperand accessor"), function getImm, file llvm/include/llvm/CodeGen/MachineOperand.h, line 536.

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Apr 4 17:11:04 PDT 2020


https://bugs.llvm.org/show_bug.cgi?id=45432

            Bug ID: 45432
           Summary: Assertion failed: (isImm() && "Wrong MachineOperand
                    accessor"), function getImm, file
                    llvm/include/llvm/CodeGen/MachineOperand.h, line 536.
           Product: libraries
           Version: 10.0
          Hardware: Other
                OS: FreeBSD
            Status: NEW
          Severity: normal
          Priority: P
         Component: Common Code Generator Code
          Assignee: unassignedbugs at nondot.org
          Reporter: pkubaj at anongoth.pl
                CC: llvm-bugs at lists.llvm.org

FreeBSD head on powerpc64, LLVM 10.0.0.

The following problem happens when compiling astro/swe port. Reduced test case:
struct a {
  int b
};
struct c {
  double d;
  struct a e[]
};
__thread struct c f;
g;
h() {
  struct a i = f.e[g];
  if (i.b)
    j();
}

Compiling flags:
/usr/bin/cc -cc1 -triple powerpc64-unknown-freebsd13.0 -emit-obj
-mrelocation-model static -O1 -x c sweph-e7e60d.c

When -mrelocation-model static and -O1 or higher are passed, assertion failure
happens.

Without -mrelocation-model static, -O2 and -O3 may be set.
With -mrelocation-model static, only -O0 works.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200405/dd8ea82c/attachment-0001.html>


More information about the llvm-bugs mailing list