[LLVMbugs] [Bug 7148] New: alignment attribute don't pass through template meta-function
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sun May 16 13:07:36 PDT 2010
http://llvm.org/bugs/show_bug.cgi?id=7148
Summary: alignment attribute don't pass through template
meta-function
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: joel.falcou at lri.fr
CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com
The following code:
#include <iostream>
template<class T> struct align_on_16
{
typedef T __attribute__((aligned(16))) type;
};
int main()
{
// this works
float __attribute__((aligned(16))) x;
std::cout << (void*)(&x) << std::endl;
// this works
typedef float __attribute__((aligned(16))) x_t;
x_t y;
std::cout << (void*)(&y) << std::endl;
// this doesn't work
typedef align_on_16<float>::type a_t;
a_t z;
std::cout << (void*)(&z) << std::endl;
}
don't produce expected result for &z. It seems related to Bug #6322.
--
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