aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorEdwin Török <edwintorok@gmail.com>2010-04-29 06:43:12 +0000
committerEdwin Török <edwintorok@gmail.com>2010-04-29 06:43:12 +0000
commitc0cf0ba1c5f40bd8313e3fc71f7f70be7a658a34 (patch)
treeb8c2a856931b2c3a53db2137c516582283f220f2 /include
parent5722df6ab13f7a3ed55218996115975ceb0666aa (diff)
downloadexternal_llvm-c0cf0ba1c5f40bd8313e3fc71f7f70be7a658a34.zip
external_llvm-c0cf0ba1c5f40bd8313e3fc71f7f70be7a658a34.tar.gz
external_llvm-c0cf0ba1c5f40bd8313e3fc71f7f70be7a658a34.tar.bz2
Fix PR6910.
Limit alignment in SmallVector 8, otherwise GCC assumes 16 byte alignment. opetaror new, and malloc only return 8-byte aligned memory on 32-bit Linux, which cause a crash if code is compiled with -O3 (or -ftree-vectorize) and some SmallVector code is vectorized. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102604 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/ADT/SmallVector.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/llvm/ADT/SmallVector.h b/include/llvm/ADT/SmallVector.h
index 2d79a02..18c8619 100644
--- a/include/llvm/ADT/SmallVector.h
+++ b/include/llvm/ADT/SmallVector.h
@@ -59,7 +59,7 @@ protected:
// number of union instances for the space, which guarantee maximal alignment.
struct U {
#ifdef __GNUC__
- char X __attribute__((aligned));
+ char X __attribute__((aligned(8)));
#else
union {
double D;