aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/sso-1.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2015-11-09 10:21:04 +0000
committerJakub Jelinek <jakub@redhat.com>2015-11-09 10:21:04 +0000
commit1a7ad2f1ed99afd9770ae968b900cd18d343f98f (patch)
treed44d9675e4d20413b860ba3dbd98a7d0c8d91745 /gcc/testsuite/gcc.dg/sso-1.c
parente1eb0a700ca6283fdb17bb334a869ef0dedd90d3 (diff)
svn merge -r229832:230008 svn+ssh://gcc.gnu.org/svn/gcc/trunk
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/gomp-4_5-branch@230009 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/sso-1.c')
-rw-r--r--gcc/testsuite/gcc.dg/sso-1.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/sso-1.c b/gcc/testsuite/gcc.dg/sso-1.c
new file mode 100644
index 00000000000..b2e11bd00d3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/sso-1.c
@@ -0,0 +1,19 @@
+/* Test support of scalar_storage_order attribute */
+
+/* { dg-do compile } */
+
+int i;
+
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+struct __attribute__((scalar_storage_order("big-endian"))) Rec
+{
+ int *p;
+};
+#else
+struct __attribute__((scalar_storage_order("little-endian"))) Rec
+{
+ int *p;
+};
+#endif
+
+struct Rec r = { &i }; /* { dg-error "element is not constant" } */