summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/compile/pr49163.c
diff options
context:
space:
mode:
authorkkojima <kkojima@138bc75d-0d04-0410-961f-82ee72b054a4>2011-06-02 22:26:42 +0000
committerkkojima <kkojima@138bc75d-0d04-0410-961f-82ee72b054a4>2011-06-02 22:26:42 +0000
commitcb022464ce06f6dffc5336c96b7ba8524fb732e1 (patch)
tree4d23397d21aeaa5440d07cc7bdf414f59f96eea0 /gcc/testsuite/gcc.c-torture/compile/pr49163.c
parent4c43a9988bd88e540c3415571576efd8a5e9e9fb (diff)
downloadgcc-cb022464ce06f6dffc5336c96b7ba8524fb732e1.tar.gz
* config/sh/predicates.md (general_movsrc_operand): Return 0
for memory and memory subreg of which address is an invalid indexed address for QI and HImode. (general_movdst_operand): Likewise. * gcc.c-torture/compile/pr49163.c: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@174586 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/compile/pr49163.c')
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr49163.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr49163.c b/gcc/testsuite/gcc.c-torture/compile/pr49163.c
new file mode 100644
index 00000000000..f14ab1531e6
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr49163.c
@@ -0,0 +1,35 @@
+/* PR target/49163 */
+struct S1
+{
+ unsigned f0:18;
+ int f1;
+} __attribute__ ((packed));
+
+struct S2
+{
+ volatile long long f0;
+ int f1;
+};
+
+struct S1 s1;
+struct S2 s2;
+const struct S2 s2array[2][1] = { };
+
+struct S2 **sptr;
+
+extern int bar (char a, long long b, int * c, long long d, long long e);
+extern int baz (void);
+
+int i;
+int *ptr;
+
+void
+foo (int *arg)
+{
+ for (i = 0; i < 1; i = baz())
+ {
+ *arg = *(int *)sptr;
+ *ptr = bar (*arg, s2.f1, ptr,
+ bar (s2array[1][0].f0, *arg, ptr, s1.f1, *ptr), *arg);
+ }
+}