aboutsummaryrefslogtreecommitdiff
path: root/test/MC
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2012-01-28 05:57:00 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2012-01-28 05:57:00 +0000
commite71cc86ad10143173195182f28bf90844f682436 (patch)
tree2fd46ef7768e4eeb74c0a98185f3e6beeea27f37 /test/MC
parentf1639abf1aaba1448f719f595156cd0f4cd560cc (diff)
Handle recursive variable definitions directly. This gives us better error
messages and allows us to fix PR11865. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149174 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC')
-rw-r--r--test/MC/AsmParser/pr11865.s6
-rw-r--r--test/MC/AsmParser/variables-invalid.s8
2 files changed, 13 insertions, 1 deletions
diff --git a/test/MC/AsmParser/pr11865.s b/test/MC/AsmParser/pr11865.s
new file mode 100644
index 0000000000..1c03e117d9
--- /dev/null
+++ b/test/MC/AsmParser/pr11865.s
@@ -0,0 +1,6 @@
+// RUN: llvm-mc -triple i386-unknown-unknown %s
+
+i:
+ .long g
+g = h
+h = i
diff --git a/test/MC/AsmParser/variables-invalid.s b/test/MC/AsmParser/variables-invalid.s
index 9656889c5b..c0f6c39876 100644
--- a/test/MC/AsmParser/variables-invalid.s
+++ b/test/MC/AsmParser/variables-invalid.s
@@ -2,7 +2,7 @@
// RUN: FileCheck --input-file %t %s
.data
-// CHECK: invalid assignment to 't0_v0'
+// CHECK: Recursive use of 't0_v0'
t0_v0 = t0_v0 + 1
t1_v1 = 1
@@ -15,3 +15,9 @@ t2_s0:
t3_s0 = t2_s0 + 1
// CHECK: invalid reassignment of non-absolute variable 't3_s0'
t3_s0 = 1
+
+
+// CHECK: Recursive use of 't4_s2'
+ t4_s0 = t4_s1
+ t4_s1 = t4_s2
+ t4_s2 = t4_s0