aboutsummaryrefslogtreecommitdiffstats
path: root/test/MC/X86/expand-var.s
diff options
context:
space:
mode:
Diffstat (limited to 'test/MC/X86/expand-var.s')
-rw-r--r--test/MC/X86/expand-var.s18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/MC/X86/expand-var.s b/test/MC/X86/expand-var.s
new file mode 100644
index 0000000..ef62d8a
--- /dev/null
+++ b/test/MC/X86/expand-var.s
@@ -0,0 +1,18 @@
+// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux < %s | llvm-readobj -r | FileCheck %s
+
+// CHECK: Section (2) .rela.text {
+// CHECK-NEXT: 0x0 R_X86_64_32 d 0x0
+// CHECK-NEXT: }
+
+a:
+ b = a
+ c = a
+ d = a
+ .weak d
+ .long d + (b - c)
+
+
+a2:
+ .weak b2
+ b2 = a2
+ c2 = b2 - a2