[LLVMbugs] [Bug 4989] New: 2-element vector initialization expression doesn't work.
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Tue Sep 15 19:46:07 PDT 2009
http://llvm.org/bugs/show_bug.cgi?id=4989
Summary: 2-element vector initialization expression doesn't work.
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: major
Priority: P2
Component: LLVM Codegen
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: syoyofujita at gmail.com
CC: llvmbugs at cs.uiuc.edu
float2 a = (float2){val, val} expression seems doesn't work.
a.x should be 1.0 but it is initialized as nan.
CPU: x86
OS : Linux 32bit
CMD: clang main.c
Rev: 81991
// main.c
#include <stdio.h>
typedef float float2 __attribute__((ext_vector_type(2)));
float2
test(float2 a, float2 b)
{
return a + b;
}
int
main(
int argc,
char **argv)
{
int val = 1;
float2 a = (float2){val, val};
// Expects (1.0, 1.0), but gets (nan, 1.0)
printf("a = %f, %f\n", a.x, a.y);
return 0;
}
--
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