[LLVMbugs] [Bug 1728] New: Inconsistent arguments to malloc
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Thu Oct 11 21:20:33 PDT 2007
http://llvm.org/bugs/show_bug.cgi?id=1728
Summary: Inconsistent arguments to malloc
Product: new-bugs
Version: unspecified
Platform: Macintosh
OS/Version: MacOS X
Status: NEW
Severity: minor
Priority: P2
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: tbirch at apple.com
CC: llvmbugs at cs.uiuc.edu
Created an attachment (id=1155)
--> (http://llvm.org/bugs/attachment.cgi?id=1155)
Test file showing the bug
Compiling the attached file with `llvm-gcc -O3 -c test.c -emit-llvm -S -o
test.ll` results in two malloc instructions with different arguments:
1) %tmp11617 = malloc [11 x %struct.foo*] ; <[11 x
%struct.foo*]*> [#uses=2]
2) %tmp315 = malloc %struct.foo ; <%struct.foo*> [#uses=2]
It seems that (2) is the correct behaviour and that (1), while allocating the
correct size, should use 'malloc %struct.foo' instead.
--
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