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

            Bug ID: 51448
           Summary: [attributor] Segmentation fault when bitcast
           Product: clang
           Version: 12.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected],
                    [email protected]

When I try to compile this C file, I got the Segmentation fault:

// clang -mcpu=tsv110 -O3 -fuse-ld=lld -flto=full test-creduce.c -w
int a;
static unsigned long b();
void c() {
  long d = b();
  a = d;
}
unsigned long b(char *e, long f) { return f; }
int main() {}


Attributor optimization has been disabled, but we can still reproduce this
problem.
// opt -attributor -enable-new-pm=0 -attributor-manifest-internal -S %s
define i16 @foo3() {
  %call = call i16 bitcast (i16 (i16*, i16) * @bar3 to i16 () *)()
  ret i16 %call
}
define internal i16 @bar3(i16* %p1, i16 %p2) {
  ret i16 %p2
}

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to