summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/arc/pic-1.c
diff options
context:
space:
mode:
authorjamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4>2017-07-31 14:52:19 +0000
committerjamborm <jamborm@138bc75d-0d04-0410-961f-82ee72b054a4>2017-07-31 14:52:19 +0000
commitb31856d3ac23cf3dab1e95cb96230dc81564c84a (patch)
tree49524df297e69390449c3ef5037b2360d14c7b1a /gcc/testsuite/gcc.target/arc/pic-1.c
parent1ade4d1864f2cf61eb5c045f57c0bcac80943c04 (diff)
parenta168a775e93ec31ae743ad282d8e60fa1c116891 (diff)
downloadgcc-b31856d3ac23cf3dab1e95cb96230dc81564c84a.tar.gz
Merged trunk revision 250739 into the hsa branch
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/hsa@250744 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.target/arc/pic-1.c')
-rw-r--r--gcc/testsuite/gcc.target/arc/pic-1.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/arc/pic-1.c b/gcc/testsuite/gcc.target/arc/pic-1.c
new file mode 100644
index 00000000000..ab24763b67f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arc/pic-1.c
@@ -0,0 +1,11 @@
+/* Tests how complex pic constant expressions are handled. */
+/* { dg-do assemble } */
+/* { dg-skip-if "PIC not available for ARC6xx" { arc6xx } } */
+/* { dg-options "-mno-sdata -w -Os -fpic" } */
+
+a() {
+ char *b = "";
+ char c;
+ int d = &c - " \n\t\v\b\r\f\a/\0";
+ e(b[d]);
+}