[LLVMbugs] [Bug 2399] New: cbe generates illegal code for sret of array
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Sun Jun 1 09:57:59 PDT 2008
http://llvm.org/bugs/show_bug.cgi?id=2399
Summary: cbe generates illegal code for sret of array
Product: new-bugs
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: sharparrow1 at yahoo.com
CC: llvmbugs at cs.uiuc.edu
Testcase:
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 = "i686-pc-linux-gnu"
%union.a = type [4 x i8]
define void @a(%union.a* sret %agg.result, ...) {
ret void
}
gcc output from generated code:
<stdin>:109: error: ‘a’ declared as function returning an array
<stdin>:110: warning: conflicting types for built-in function ‘malloc’
<stdin>:131: error: ‘a’ declared as function returning an array
<stdin>: In function ‘a’:
<stdin>:134: warning: return makes integer from pointer without a cast
<stdin>:134: warning: function returns address of local variable
llc doesn't seem to have any issues with this construct in general.
(This is generated by clang; I could fix clang not to do this, but I don't see
anything particularly wrong with it.)
--
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