[LLVMbugs] [Bug 5306] New: r84987 breaks some simple code
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Mon Oct 26 07:59:14 PDT 2009
http://llvm.org/bugs/show_bug.cgi?id=5306
Summary: r84987 breaks some simple code
Product: new-bugs
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: quickslyver at free.fr
CC: llvmbugs at cs.uiuc.edu, vhernandez at apple.com
with the source C code:
$ cat bug.c
int buf[256];
void* malloc(unsigned int size)
{
return buf;
}
void free(char* ptr)
{
}
int main()
{
char *a=malloc(100);
free(a);
}
----------------------------------------
the following build commands before r84987 outputs :
$clang-cc bug.c -emit-llvm-bc && llvm-ld bug.bc && llvm-dis a.out.bc -o -
; ModuleID = 'a.out.bc'
target datalayout =
"e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32"
target triple = "i386-pc-linux-gnu"
define i32 @main() nounwind readnone {
entry:
ret i32 0
}
---------------------------------------
and after r84987 there is an unreachable:
$clang-cc bug.c -emit-llvm-bc && llvm-ld bug.bc && llvm-dis a.out.bc -o -
; ModuleID = 'a.out.bc'
target datalayout =
"e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32"
target triple = "i386-pc-linux-gnu"
define i32 @main() nounwind readnone {
entry:
unreachable
}
--
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