summaryrefslogtreecommitdiff
path: root/test/CodeGenCXX/unaligned.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-04-16 16:02:28 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-04-16 16:02:28 +0000
commit7442d6faa2719e4e7d33a7021c406c5a4facd74d (patch)
treec72b9241553fc9966179aba84f90f17bfa9235c3 /test/CodeGenCXX/unaligned.cpp
parentb52119637f743680a99710ce5fdb6646da2772af (diff)
Diffstat (limited to 'test/CodeGenCXX/unaligned.cpp')
-rw-r--r--test/CodeGenCXX/unaligned.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/CodeGenCXX/unaligned.cpp b/test/CodeGenCXX/unaligned.cpp
new file mode 100644
index 0000000000000..95549d3339f01
--- /dev/null
+++ b/test/CodeGenCXX/unaligned.cpp
@@ -0,0 +1,6 @@
+// RUN: %clang_cc1 -x c++ -std=c++11 -triple x86_64-unknown-linux-gnu -fms-extensions -emit-llvm < %s | FileCheck %s
+
+int foo() {
+ // CHECK: ret i32 1
+ return alignof(__unaligned int);
+}