aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Baylis <charles.baylis@linaro.org>2017-06-08 11:40:49 +0100
committerCharles Baylis <charles.baylis@linaro.org>2017-06-09 15:41:04 +0000
commite6c451aa97df0d24b0e680f4dea078dd6eab1922 (patch)
treeabae70bb56f4cd0f4bc424367ed1800999b6f750
parentf053611264deab37097a6fcd3d4740a79176a15d (diff)
bug-2915: New test.
Add a regression test using the test case provided in https://bugs.linaro.org/show_bug.cgi?id=2915 Change-Id: I278fd08bd94bc283294648fb7d7ea4e954b5a3b3
-rw-r--r--bug-2915/Makefile1
-rw-r--r--bug-2915/bug-2915.c11
-rwxr-xr-xbug-2915/build.sh23
3 files changed, 35 insertions, 0 deletions
diff --git a/bug-2915/Makefile b/bug-2915/Makefile
new file mode 100644
index 0000000..23f8a8f
--- /dev/null
+++ b/bug-2915/Makefile
@@ -0,0 +1 @@
+include ../common.mk
diff --git a/bug-2915/bug-2915.c b/bug-2915/bug-2915.c
new file mode 100644
index 0000000..fd0bfab
--- /dev/null
+++ b/bug-2915/bug-2915.c
@@ -0,0 +1,11 @@
+int main()
+{
+ return 0;
+}
+
+__attribute(( target("thumb") )) int bar()
+{
+ int foo;
+ asm ("mcr p15, 0, %0, c13, c0, 3" : : "r" (foo) );
+}
+
diff --git a/bug-2915/build.sh b/bug-2915/build.sh
new file mode 100755
index 0000000..1afbb0d
--- /dev/null
+++ b/bug-2915/build.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+set -e
+
+case ${TARGET} in
+ arm*linux*)
+ CFLAGS="-marm -g"
+ ;;
+ arm*-eabi*)
+ CFLAGS="-marm -g -mcpu=cortex-a8"
+ ;;
+ *)
+ echo "$(basename $(pwd)): SKIP" > result.txt
+ exit 0
+ ;;
+esac
+
+echo "$(basename $(pwd)): FAIL" > result.txt
+set -x
+
+${CC} ${CFLAGS} -c bug-2915.c
+
+set +x
+echo "$(basename $(pwd)): PASS" > result.txt