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

            Bug ID: 22277
           Summary: fast-isel cannot handle strlen
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

~/llvmw/build/Deb~/llvmw/build/Debug+Asserts/bin/clang -O0  -mllvm
-fast-isel-verbose -mllvm -fast-isel strlen1.c
strlen1.c:12:3: warning: implicitly declaring library function 'printf' with
      type 'int (const char *, ...)'
  printf("%i\n", len);
  ^
strlen1.c:12:3: note: include the header <stdio.h> or explicitly provide a
      declaration for 'printf'
FastISel missed call:   %call = call i64 @strlen(i8* %0) #3
1 warning generated.

#include <string.h>

char *hello = "hello";
int len;

void foo() {
  len = strlen(hello);
}

int main() {
  foo();
  printf("%i\n", len);
}

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