summaryrefslogtreecommitdiff
path: root/test/LinkerScript/memory-missing-length.test
diff options
context:
space:
mode:
Diffstat (limited to 'test/LinkerScript/memory-missing-length.test')
-rw-r--r--test/LinkerScript/memory-missing-length.test29
1 files changed, 29 insertions, 0 deletions
diff --git a/test/LinkerScript/memory-missing-length.test b/test/LinkerScript/memory-missing-length.test
new file mode 100644
index 000000000000..f317c9a26788
--- /dev/null
+++ b/test/LinkerScript/memory-missing-length.test
@@ -0,0 +1,29 @@
+/*
+ RUN: linker-script-test %s 2> %t | FileCheck %s
+ RUN: FileCheck -input-file %t -check-prefix=CHECK-ERR %s
+*/
+
+MEMORY
+{
+ ram (rwx) : ORIGIN = 0x20000000,
+}
+/*
+CHECK-ERR: [[@LINE-2]]:1: error: expected LENGTH
+CHECK-ERR-NEXT: {{^}}}
+CHECK-ERR-NEXT: {{^\^}}
+*/
+
+/*
+CHECK: kw_memory: MEMORY
+CHECK: l_brace: {
+CHECK: identifier: ram
+CHECK: l_paren: (
+CHECK: identifier: rwx
+CHECK: r_paren: )
+CHECK: colon: :
+CHECK: kw_origin: ORIGIN
+CHECK: equal: =
+CHECK: number: 0x20000000
+CHECK: r_brace: }
+CHECK: eof:
+*/