https://llvm.org/bugs/show_bug.cgi?id=24386
Bug ID: 24386
Summary: compiler aborted with "Function return type does not
match operand type of return inst!"
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Backend: ARM
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
The test case is reduced from main-05c473.cpp in
https://code.google.com/p/android/issues/detail?id=182036
$ cat test.cpp
struct Vec2 {
union {
struct {
float x, y;
};
float data[2];
};
};
Vec2 getVec2()
{
Vec2 out;
union { Vec2* v; unsigned char* u; } x;
x.v = &out;
return out;
}
$ clang++ \
-cc1 \
-triple armv7-none-linux-androideabi \
-target-cpu cortex-a8 \
-target-abi aapcs-linux \
-mfloat-abi hard \
-x c++ -emit-llvm \
test.cpp
Clang++ aborted with error message:
Function return type does not match operand type of return inst!
ret void <badref>
%struct.Vec2 = type { %union.anon }fatal error: error in backend: Broken
function found, compilation aborted!
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs