summaryrefslogtreecommitdiff
path: root/test/LinkerScript/memory-missing-origin.test
diff options
context:
space:
mode:
Diffstat (limited to 'test/LinkerScript/memory-missing-origin.test')
-rw-r--r--test/LinkerScript/memory-missing-origin.test30
1 files changed, 30 insertions, 0 deletions
diff --git a/test/LinkerScript/memory-missing-origin.test b/test/LinkerScript/memory-missing-origin.test
new file mode 100644
index 0000000000000..50a64d17d6c54
--- /dev/null
+++ b/test/LinkerScript/memory-missing-origin.test
@@ -0,0 +1,30 @@
+/*
+ RUN: linker-script-test %s 2> %t | FileCheck %s
+ RUN: FileCheck -input-file %t -check-prefix=CHECK-ERR %s
+*/
+
+MEMORY
+{
+ ram (rwx) : LENGTH = 128M
+/*
+CHECK-ERR: [[@LINE-2]]:15: error: expected ORIGIN
+CHECK-ERR-NEXT: {{^ ram \(rwx\) : LENGTH = 128M}}
+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_length: LENGTH
+CHECK: equal: =
+CHECK: number: 128M
+CHECK: r_brace: }
+CHECK: eof:
+*/