[llvm] r204582 - Add back tests that were reverted in r204203.
Rafael Espindola
rafael.espindola at gmail.com
Sun Mar 23 20:48:15 PDT 2014
Author: rafael
Date: Sun Mar 23 22:48:15 2014
New Revision: 204582
URL: http://llvm.org/viewvc/llvm-project?rev=204582&view=rev
Log:
Add back tests that were reverted in r204203.
They pass again with the fix in r204581.
Modified:
llvm/trunk/test/MC/ELF/offset.s
Modified: llvm/trunk/test/MC/ELF/offset.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ELF/offset.s?rev=204582&r1=204581&r2=204582&view=diff
==============================================================================
--- llvm/trunk/test/MC/ELF/offset.s (original)
+++ llvm/trunk/test/MC/ELF/offset.s Sun Mar 23 22:48:15 2014
@@ -3,25 +3,70 @@
// Test that a variable declared with "var = other_var + cst" is in the same
// section as other_var and its value is the value of other_var + cst.
+ .data
+ .globl sym_a
+ .byte 42
+ .type sym_a, @object
sym_a:
-sym_d = sym_a + 1
-
// CHECK: Symbol {
// CHECK: Name: sym_a
-// CHECK-NEXT: Value: 0x0
+// CHECK-NEXT: Value: 0x1
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Global
+// CHECK-NEXT: Type: Object
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: .data
+// CHECK-NEXT: }
+
+ .long 42
+ .globl sym_b
+sym_b:
+ .globl sym_c
+sym_c = sym_a
+// CHECK: Symbol {
+// CHECK: Name: sym_c
+// CHECK-NEXT: Value: 0x1
// CHECK-NEXT: Size: 0
-// CHECK-NEXT: Binding: Local (0x0)
-// CHECK-NEXT: Type: None (0x0)
+// CHECK-NEXT: Binding: Global
+// CHECK-NEXT: Type: Object
// CHECK-NEXT: Other: 0
-// CHECK-NEXT: Section: .text (0x1)
+// CHECK-NEXT: Section: .data
// CHECK-NEXT: }
-// CHECK-NEXT: Symbol {
-// CHECK-NEXT: Name: sym_d
+
+ .globl sym_d
+sym_d = sym_a + 1
+// CHECK: Symbol {
+// CHECK: Name: sym_d
+// CHECK-NEXT: Value: 0x2
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Global
+// CHECK-NEXT: Type: Object
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: .data
+// CHECK-NEXT: }
+
+ .globl sym_e
+sym_e = sym_a + (sym_b - sym_a) * 3
+// CHECK: Symbol {
+// CHECK: Name: sym_e
+// CHECK-NEXT: Value: 0xD
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Global
+// CHECK-NEXT: Type: Object
+// CHECK-NEXT: Other: 0
+// CHECK-NEXT: Section: .data
+// CHECK-NEXT: }
+
+
+ .globl sym_f
+sym_f = sym_a + (1 - 1)
+// CHECK: Symbol {
+// CHECK: Name: sym_f
// CHECK-NEXT: Value: 0x1
// CHECK-NEXT: Size: 0
-// CHECK-NEXT: Binding: Local (0x0)
-// CHECK-NEXT: Type: None (0x0)
+// CHECK-NEXT: Binding: Global
+// CHECK-NEXT: Type: Object
// CHECK-NEXT: Other: 0
-// CHECK-NEXT: Section: .text (0x1)
+// CHECK-NEXT: Section: .data
// CHECK-NEXT: }
More information about the llvm-commits
mailing list