Patchwork [2/2] Test case for PR55033

login
register
mail settings
Submitter Sebastian Huber
Date Jan. 29, 2013, 2:38 p.m.
Message ID <1359470337-4709-2-git-send-email-sebastian.huber@embedded-brains.de>
Download mbox | patch
Permalink /patch/216555/
State New
Headers show

Comments

Sebastian Huber - Jan. 29, 2013, 2:38 p.m.
2013-01-29  Sebastian Huber  <sebastian.huber@embedded-brains.de>

	PR target/55033
	* gcc.target/powerpc/pr55033.c: New.
---
 gcc/testsuite/gcc.target/powerpc/pr55033.c |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)
 create mode 100644 gcc/testsuite/gcc.target/powerpc/pr55033.c
Sebastian Huber - Jan. 29, 2013, 2:42 p.m.
Test results with these patches are here:

http://gcc.gnu.org/ml/gcc-testresults/2013-01/msg03064.html

Patch

diff --git a/gcc/testsuite/gcc.target/powerpc/pr55033.c b/gcc/testsuite/gcc.target/powerpc/pr55033.c
new file mode 100644
index 0000000..cd8abcb
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr55033.c
@@ -0,0 +1,21 @@ 
+/* { dg-do compile } */
+/* { dg-require-effective-target powerpc_eabi_ok } */
+/* { dg-options "-mcpu=8540 -msoft-float -msdata=eabi -G 8 -fno-common" } */
+
+void f(void);
+
+struct s {
+  int *p;
+  int *q;
+};
+
+extern int a;
+
+extern const struct s c;
+
+const struct s c = { &a, 0 };
+
+void f(void)
+{
+  char buf[4] = { 0, 1, 2, 3 };
+}