Patchwork [objc,testsuite] Correct some objc.dg-struct-layout-encoding-1/t0[23]?_main.m XFAILs (PR objc/45989)

login
register
mail settings
Submitter Rainer Orth
Date Jan. 14, 2011, 5:13 p.m.
Message ID <yddaaj3l870.fsf@manam.CeBiTec.Uni-Bielefeld.DE>
Download mbox | patch
Permalink /patch/78963/
State New
Headers show

Comments

Rainer Orth - Jan. 14, 2011, 5:13 p.m.
Currently, some objc.dg-struct-layout-encoding-1/t0*_main.m execution
tests XPASS on many platforms.  The following patch, developed primarily
by Dominique with a few suggestions from myself, corrects this.

Tested on i386-pc-solaris2.11 and sparc-sun-solaris2.11, ok for
mainline?

Thanks.
	Rainer


2011-01-08  Dominique d'Humieres  <dominiq@lps.ens.fr>
	    Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	PR objc/45989
	* objc.dg/gnu-encoding/struct-layout-encoding-1_generate.c
	(switchfiles): XFAIL
	objc.dg-struct-layout-encoding-1/t02[57-9]_main.m execution tests
	on i?86-*-*, x86_64-*-*, and powerpc*-apple-darwin* && ilp32.
	XFAIL objc.dg-struct-layout-encoding-1/t03[01]_main.m execution
	tests on i?86-*-* and x86_64-*-*.
IainS - Jan. 14, 2011, 5:24 p.m.
On 14 Jan 2011, at 17:13, Rainer Orth wrote:

> Currently, some objc.dg-struct-layout-encoding-1/t0*_main.m execution
> tests XPASS on many platforms.  The following patch, developed  
> primarily
> by Dominique with a few suggestions from myself, corrects this.
>
> Tested on i386-pc-solaris2.11 and sparc-sun-solaris2.11, ok for
> mainline?

I think this is a good idea...
Since, having discussed the options with Nicola, there is no intention  
to make amendment to the way in which this is handled before 4.7.
... so it would be better to remove the test-suite noise.
(can't approve it tho).
Iain

>
> Thanks.
> 	Rainer
>
>
> 2011-01-08  Dominique d'Humieres  <dominiq@lps.ens.fr>
> 	    Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
>
> 	PR objc/45989
> 	* objc.dg/gnu-encoding/struct-layout-encoding-1_generate.c
> 	(switchfiles): XFAIL
> 	objc.dg-struct-layout-encoding-1/t02[57-9]_main.m execution tests
> 	on i?86-*-*, x86_64-*-*, and powerpc*-apple-darwin* && ilp32.
> 	XFAIL objc.dg-struct-layout-encoding-1/t03[01]_main.m execution
> 	tests on i?86-*-* and x86_64-*-*.
>
> diff -r d0e91cf6bd2d gcc/testsuite/objc.dg/gnu-encoding/struct- 
> layout-encoding-1_generate.c
> --- a/gcc/testsuite/objc.dg/gnu-encoding/struct-layout- 
> encoding-1_generate.c	Fri Jan 14 07:18:54 2011 +0000
> +++ b/gcc/testsuite/objc.dg/gnu-encoding/struct-layout- 
> encoding-1_generate.c	Fri Jan 14 18:04:04 2011 +0100
> @@ -1,5 +1,5 @@
> /* Structure layout test generator.
> -   Copyright (C) 2004, 2005, 2007, 2010 Free Software Foundation,  
> Inc.
> +   Copyright (C) 2004, 2005, 2007, 2010, 2011 Free Software  
> Foundation, Inc.
>    Contributed by Jakub Jelinek <jakub@redhat.com>.
>
> This file is part of GCC.
> @@ -236,17 +236,23 @@
>       || filecnt == 22)
>      {
>       fprintf (outfile, "\
> -/* { dg-do run { xfail { \"powerpc*-*-aix*\" } } } */\n\
> +/* { dg-do run { xfail { powerpc*-*-aix* } } } */\n\
> /* { dg-options \"-w -I%s -fgnu-runtime\" } */\n", srcdir);
>      }
>   /* FIXME: these should not be xfailed but they are because
>      of bugs in libobjc and the objc front-end.  25 is because
>      vectors are not encoded.  The rest are because or zero sized
> -     arrays are encoded as pointers.  */
> -  else if (filecnt >= 25)
> +     arrays are encoded as pointers.  See PR objc/25361.  */
> +  else if (filecnt == 25 || (filecnt >= 27 && filecnt <= 29))
>     {
>       fprintf (outfile, "\
> -/* { dg-do run { xfail *-*-* } } */\n\
> +/* { dg-do run { xfail { { i?86-*-* x86_64-*-* } || { powerpc*- 
> apple-darwin* && ilp32 } } } } */\n\
> +/* { dg-options \"-w -I%s -fgnu-runtime\" } */\n", srcdir);
> +    }
> +  else if (filecnt >= 30)
> +    {
> +      fprintf (outfile, "\
> +/* { dg-do run { xfail { i?86-*-* x86_64-*-* } } } */\n\
> /* { dg-options \"-w -I%s -fgnu-runtime\" } */\n", srcdir);
>     }
>   else
>
> -- 
> -----------------------------------------------------------------------------
> Rainer Orth, Center for Biotechnology, Bielefeld University
Mike Stump - Jan. 14, 2011, 6:34 p.m.
On Jan 14, 2011, at 9:13 AM, Rainer Orth wrote:
> Currently, some objc.dg-struct-layout-encoding-1/t0*_main.m execution
> tests XPASS on many platforms.  The following patch, developed primarily
> by Dominique with a few suggestions from myself, corrects this.
> 
> Tested on i386-pc-solaris2.11 and sparc-sun-solaris2.11, ok for
> mainline?

Ok.

Patch

diff -r d0e91cf6bd2d gcc/testsuite/objc.dg/gnu-encoding/struct-layout-encoding-1_generate.c
--- a/gcc/testsuite/objc.dg/gnu-encoding/struct-layout-encoding-1_generate.c	Fri Jan 14 07:18:54 2011 +0000
+++ b/gcc/testsuite/objc.dg/gnu-encoding/struct-layout-encoding-1_generate.c	Fri Jan 14 18:04:04 2011 +0100
@@ -1,5 +1,5 @@ 
 /* Structure layout test generator.
-   Copyright (C) 2004, 2005, 2007, 2010 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2005, 2007, 2010, 2011 Free Software Foundation, Inc.
    Contributed by Jakub Jelinek <jakub@redhat.com>.
 
 This file is part of GCC.
@@ -236,17 +236,23 @@ 
       || filecnt == 22)
      {
       fprintf (outfile, "\
-/* { dg-do run { xfail { \"powerpc*-*-aix*\" } } } */\n\
+/* { dg-do run { xfail { powerpc*-*-aix* } } } */\n\
 /* { dg-options \"-w -I%s -fgnu-runtime\" } */\n", srcdir);
      }
   /* FIXME: these should not be xfailed but they are because
      of bugs in libobjc and the objc front-end.  25 is because
      vectors are not encoded.  The rest are because or zero sized
-     arrays are encoded as pointers.  */
-  else if (filecnt >= 25)
+     arrays are encoded as pointers.  See PR objc/25361.  */
+  else if (filecnt == 25 || (filecnt >= 27 && filecnt <= 29))
     {
       fprintf (outfile, "\
-/* { dg-do run { xfail *-*-* } } */\n\
+/* { dg-do run { xfail { { i?86-*-* x86_64-*-* } || { powerpc*-apple-darwin* && ilp32 } } } } */\n\
+/* { dg-options \"-w -I%s -fgnu-runtime\" } */\n", srcdir);
+    }
+  else if (filecnt >= 30)
+    {
+      fprintf (outfile, "\
+/* { dg-do run { xfail { i?86-*-* x86_64-*-* } } } */\n\
 /* { dg-options \"-w -I%s -fgnu-runtime\" } */\n", srcdir);
     }
   else