summaryrefslogtreecommitdiff
path: root/clang/test/CodeGen/pr12251.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/CodeGen/pr12251.c')
-rw-r--r--clang/test/CodeGen/pr12251.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/test/CodeGen/pr12251.c b/clang/test/CodeGen/pr12251.c
new file mode 100644
index 0000000..a644bb7
--- /dev/null
+++ b/clang/test/CodeGen/pr12251.c
@@ -0,0 +1,11 @@
+// RUN: %clang_cc1 %s -emit-llvm -O1 -relaxed-aliasing -o - | FileCheck %s
+
+enum e1 {e1_a = -1 };
+enum e1 g1(enum e1 *x) {
+ return *x;
+}
+
+// CHECK: define i32 @g1
+// CHECK: load i32* %x, align 4
+// CHECK-NOT: range
+// CHECK: ret