[LLVMbugs] [Bug 9556] New: clang does not support gcc builtin llabs

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Mar 25 13:59:23 PDT 2011


           Summary: clang does not support gcc builtin llabs
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: ahatanak at gmail.com
                CC: llvmbugs at cs.uiuc.edu

In the following example, builtin function llabs is superseded by the function
defined in the same file.   

# 20021127-1.c
long long a = -1;
long long llabs (long long);
void abort (void);
  if (llabs (a) != 1)
    abort ();
  return 0;
long long llabs (long long b)
  abort ();

# generated .ll code 
# clang 20021127-1.c -o 20021127-1.ll  -S -emit-llvm -O3
target datalayout =
target triple = "i386-pc-linux-gnu"

@a = global i64 -1, align 8

define i32 @main() nounwind {
  %call = tail call i64 @llabs(i64 undef)

define i64 @llabs(i64 %b) noreturn nounwind {
  tail call void @abort() noreturn nounwind

declare void @abort() noreturn

Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list