diff mbox

Potential fix for PR55033

Message ID 50912DFD.4030503@embedded-brains.de
State New
Headers show

Commit Message

Sebastian Huber Oct. 31, 2012, 1:56 p.m. UTC
Hello Alan,

maybe it is better to use a require effective target instead of the

{ target powerpc*-*-eabi* powerpc*-*-elf* powerpc*-*-linux* }

patterns scattered around in the testsuite?  One problem with this is that test 
cases for one of these will likely also work with powerpc*-*-rtems*.  I want to 
look at the remaining 104 test cases which are marked as UNSUPPORTED for RTEMS 
some time in the future.  Please have a look at the attached patches.

On 10/31/2012 01:12 AM, Alan Modra wrote:
> On Tue, Oct 30, 2012 at 02:45:40PM +0100, Sebastian Huber wrote:
>> On 10/26/2012 02:22 PM, Sebastian Huber wrote:
>>> Hello,
>>>
>>> here is a test case for PR55033.
>>>
>>
>> Is there something wrong with this test case?  It compiles well with Alan's patch.
>
> It looks OK to me if you replace your "gd-do compile" line with the
> following two lines to avoid failures on powerpc targets that don't
> support -meabi -msdata.
>
> /* { dg-do compile { target powerpc*-*-eabi* powerpc*-*-elf* powerpc*-*-linux* } } */
> /* { dg-require-effective-target ilp32 } */
>
>
diff mbox

Patch

From 0a8c10e6f41339c16557a76dd11a4de08244acdf Mon Sep 17 00:00:00 2001
From: Sebastian Huber <sebastian.huber@embedded-brains.de>
Date: Tue, 23 Oct 2012 12:27:05 +0200
Subject: [PATCH 2/2] Test case for PR55033

2012-10-31  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

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 };
+}
-- 
1.7.7