mirror of
https://github.com/llvm/llvm-project.git
synced 2025-05-14 12:06:07 +00:00

As reported in PR33035, LLVM crashes if given a common object with an alignment of greater than 32 bits. This is because the COFF file format does not support these alignments, so emitting them is broken anyway. This patch changes any global definitions greater than 32 bit alignment to no longer be in 'common'. https://bugs.llvm.org/show_bug.cgi?id=33035 Differential Revision: https://reviews.llvm.org/D56391 Change-Id: I48609289753b7f3b58c5e2bc1712756750fbd45a llvm-svn: 350643
9 lines
434 B
C
9 lines
434 B
C
// RUN: %clang_cc1 -triple x86_64-windows-msvc -emit-llvm -o - %s | FileCheck %s
|
|
typedef float TooLargeAlignment __attribute__((__vector_size__(64)));
|
|
typedef float NormalAlignment __attribute__((__vector_size__(4)));
|
|
|
|
TooLargeAlignment TooBig;
|
|
// CHECK: @TooBig = dso_local global <16 x float> zeroinitializer, align 64
|
|
NormalAlignment JustRight;
|
|
// CHECK: @JustRight = common dso_local global <1 x float> zeroinitializer, align 4
|