http://llvm.org/bugs/show_bug.cgi?id=15333

            Bug ID: 15333
           Summary: Cannot select: intrinsic %llvm.spu.si.sf
           Product: clang
           Version: 3.2
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

It seems, the following code cannot be compiled:

void main() {
  int N = 100;
  double f[N];
}

> clang -std=c99 -c test.c -o test.a
fatal error: error in backend: Cannot select: intrinsic %llvm.spu.si.sf


changing N to `const int` will make the program work. This makes sense.
I don't know what the C99 Standard says on this, but if using a non-const is
not valid, at least the error message should be more "legible". 

For comparison: `gcc -std=c99 -Wall test.c` does not complain at all if N is
non-const and produces a working binary.

More information can be found on StackOverflow:
http://stackoverflow.com/questions/15023592/llvm-cannot-select-intrinsic-llvm-spu-si-sf

My Clang version:

Ubuntu clang version 3.2-1~exp5ubuntu2 (tags/RELEASE_32/final) (based on LLVM
3.2)
Target: x86_64-pc-linux-gnu
Thread model: posix

-- 
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