http://llvm.org/bugs/show_bug.cgi?id=20157
Bug ID: 20157
Summary: ext_vector_type is not compatible with constexpr
Product: clang
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
It seems many uses of a type based on ext_vector_type are not suitable for use
in a constexpr, for example:
typedef float __attribute__((ext_vector_type(4))) float4;
constexpr float4 MultiplyByTwo(float4 x)
{
return x * 2.0f;
}
main.cpp:3:18: error: constexpr function never produces a constant expression
[-Winvalid-constexpr]
constexpr float4 MultiplyByTwo(float4 x)
^
main.cpp:5:12: note: subexpression not valid in a constant expression
return x * 2.0f;
^
1 error generated.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs