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

            Bug ID: 23684
           Summary: optnone causes CodeGen crash on ARM
           Product: tools
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: llc
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

Created attachment 14399
  --> https://llvm.org/bugs/attachment.cgi?id=14399&action=edit
crash log

On LLVM r238172 and Clang r238166, following code causes clang crash:
$ clang -fPIC -target arm-linux-gnueabi -O1 -x c -o /dev/null - 2>>
crash-log.txt <<EOF

int i = 0;

void g(int* x) {
  *x = 0;
}

__attribute__((optnone))
void f() {
  g(&i);
}
EOF

And in IR, this also causes crash:
$ clang -fPIC -target arm-linux-gnueabi -O1 -x ir -o /dev/null - 2>>
crash-log.txt <<EOF

target triple = "armv4t--linux-gnueabi"
@i = global i32 0, align 4

define void @g(i32* %x) {
  store i32 0, i32* %x, align 4
  ret void
}

define void @f() noinline optnone {
  call void @g(i32* @i)
  ret void
}
EOF

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to