aboutsummaryrefslogtreecommitdiffstats
path: root/test/MC
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-10-16 01:57:39 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-10-16 01:57:39 +0000
commit9ce249c9b86d74dec723948d70f533194e750807 (patch)
treedf1aeb9b697d49ebf34b3e742fbdc933de86918b /test/MC
parent86cd1e91b877072006f660b7a8baaa96c4e5597a (diff)
downloadexternal_llvm-9ce249c9b86d74dec723948d70f533194e750807.zip
external_llvm-9ce249c9b86d74dec723948d70f533194e750807.tar.gz
external_llvm-9ce249c9b86d74dec723948d70f533194e750807.tar.bz2
MC: Tweak variable assignment diagnostics, and make reassignment of non-absolute
variables and symbols invalid. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84232 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC')
-rw-r--r--test/MC/AsmParser/variables-invalid.s17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/MC/AsmParser/variables-invalid.s b/test/MC/AsmParser/variables-invalid.s
new file mode 100644
index 0000000..d480670
--- /dev/null
+++ b/test/MC/AsmParser/variables-invalid.s
@@ -0,0 +1,17 @@
+// RUN: not llvm-mc %s 2> %t
+// RUN: FileCheck --input-file %t %s
+
+ .data
+// CHECK: invalid assignment to 't0_v0'
+ t0_v0 = t0_v0 + 1
+
+ t1_v1 = 1
+ t1_v1 = 2
+
+t2_s0:
+// CHECK: redefinition of 't2_s0'
+ t2_s0 = 2
+
+ t3_s0 = t2_s0 + 1
+// CHECK: invalid reassignment of non-absolute variable 't3_s0'
+ t3_s0 = 1