diff mbox

[testsuite] : Skip tests for targets with int < 32 bits

Message ID 4DF0F48C.2050308@gjlay.de
State New
Headers show

Commit Message

Georg-Johann Lay June 9, 2011, 4:27 p.m. UTC
This patch fixes testsuite failures because the testcases assume
sizeof(int) >= 4.

	* gcc.c-torture/compile/pr49029.c: Add dg-require-effective-target
	int32plus
	* gcc.c-torture/compile/pr49163.c: Ditto.

Comments

Georg-Johann Lay June 13, 2011, 12:45 p.m. UTC | #1
Ping #1 for:
http://gcc.gnu.org/ml/gcc-patches/2011-06/msg00746.html


Georg-Johann Lay:
> This patch fixes testsuite failures because the testcases assume
> sizeof(int) >= 4.
> 
> 	* gcc.c-torture/compile/pr49029.c: Add dg-require-effective-target
> 	int32plus
> 	* gcc.c-torture/compile/pr49163.c: Ditto.
Mike Stump June 13, 2011, 5:53 p.m. UTC | #2
On Jun 9, 2011, at 9:27 AM, Georg-Johann Lay wrote:
> This patch fixes testsuite failures because the testcases assume
> sizeof(int) >= 4.
> 
> 	* gcc.c-torture/compile/pr49029.c: Add dg-require-effective-target
> 	int32plus
> 	* gcc.c-torture/compile/pr49163.c: Ditto.

Well, since no one objected to it, I'll approve it.  I was hoping that a specific maintainer would approve or reject it.  :-(
Georg-Johann Lay June 13, 2011, 6:18 p.m. UTC | #3
Mike Stump schrieb:
> On Jun 9, 2011, at 9:27 AM, Georg-Johann Lay wrote:
> 
>>This patch fixes testsuite failures because the testcases assume
>>sizeof(int) >= 4.
>>
>>	* gcc.c-torture/compile/pr49029.c: Add dg-require-effective-target
>>	int32plus
>>	* gcc.c-torture/compile/pr49163.c: Ditto.
> 
> 
> Well, since no one objected to it, I'll approve it.  I was hoping that a specific maintainer would approve or reject it.  :-(

Who is a "specific maintainer" here?
I found you (and Rainer Orth) as "testsuite" maintainers.
Or does that just refer to the test harness and not to specific test cases?

I CCed Kaz and Jakub because they added respective test cases.

Then I observed that
/* { dg-require-effective-target int32plus } */
does not work as intended for all test cases.

For exammple, I added this line to, e.g.
* gcc.c-torture/execute/cmpsi-2.c
* gcc.c-torture/execute/pr45262.c
in trunk r172757
http://gcc.gnu.org/viewcvs?view=revision&revision=172757

However, these tests are still executed as you can see in 
gcc-testresults for trunk r174959:
http://gcc.gnu.org/ml/gcc-testresults/2011-06/msg01429.html

Is this a bug resp. worth a bug report?

Johann
Jakub Jelinek June 13, 2011, 6:23 p.m. UTC | #4
On Mon, Jun 13, 2011 at 08:18:52PM +0200, Georg-Johann Lay wrote:
> For exammple, I added this line to, e.g.
> * gcc.c-torture/execute/cmpsi-2.c
> * gcc.c-torture/execute/pr45262.c
> in trunk r172757
> http://gcc.gnu.org/viewcvs?view=revision&revision=172757

That was a mistake.

gcc.c-torture/execute/ doesn't use the dg framework, you need
to instead add cmpsi-2.x resp. pr45262.x file alongside with
the testcase.  Look at other *.x files there for details on how they look
like.

	Jakub
Mike Stump June 13, 2011, 6:53 p.m. UTC | #5
On Jun 13, 2011, at 11:18 AM, Georg-Johann Lay wrote:
> Who is a "specific maintainer" here?

I'd be happy to have the author of the testcase weigh in, or someone that cares about int32plus, or the the person that fixed the bug in the compiler for which the testcase was written...

> I found you (and Rainer Orth) as "testsuite" maintainers.
> Or does that just refer to the test harness and not to specific test cases?

I consider the situation much like the role of a global write privs person.  They, in theory, can approve a C++ change, but such changes are at least at times, better reviewed and approved by a C++ person.  I'd rather haver a arm person ok the gcc.target/arm/* testcases, I'd rather have an x86_64 person review and approve gcc.target/i386, I'd rather have a fortran person review gcc.fotran changes.

> Then I observed that
> /* { dg-require-effective-target int32plus } */
> does not work as intended for all test cases.

Ah, yes, right.  Longer term, I think that's a bug we should fix.  For now, as Jakub points out, you need to create a .x file for them.  I'd like to see the .x files go away.

> For exammple, I added this line to, e.g.
> * gcc.c-torture/execute/cmpsi-2.c
> * gcc.c-torture/execute/pr45262.c
> in trunk r172757
> http://gcc.gnu.org/viewcvs?view=revision&revision=172757
> 
> However, these tests are still executed as you can see in gcc-testresults for trunk r174959:
> http://gcc.gnu.org/ml/gcc-testresults/2011-06/msg01429.html

I don't understand why you'd propose a change that doesn't work?  In general, maintainers rely upon contributors to test and ensure that a change does something worthwhile.  So, yes, I agree with Jakub, this part of the patch should be reverted, and an .x file created/modified, or possibly the testcase modified to be more portable.  If you want to enhance the driver to process the dg stuff, I like that direction.

> Is this a bug resp. worth a bug report?

If you want, though, I think it might make more sense in a forward looking design document, or a open projects file.  It isn't a bug, because it was never a feature.
Jakub Jelinek June 13, 2011, 6:56 p.m. UTC | #6
On Thu, Jun 09, 2011 at 06:27:56PM +0200, Georg-Johann Lay wrote:
> This patch fixes testsuite failures because the testcases assume
> sizeof(int) >= 4.
> 
> 	* gcc.c-torture/compile/pr49029.c: Add dg-require-effective-target
> 	int32plus
> 	* gcc.c-torture/compile/pr49163.c: Ditto.

> Index: gcc.c-torture/compile/pr49029.c
> ===================================================================
> --- gcc.c-torture/compile/pr49029.c	(Revision 174701)
> +++ gcc.c-torture/compile/pr49029.c	(Arbeitskopie)
> @@ -1,3 +1,4 @@
> +/* { dg-require-effective-target int32plus } */
>  /* PR middle-end/49029 */
>  struct S { volatile unsigned f : 11; signed g : 30; } __attribute__((packed));
>  struct T { volatile struct S h; } __attribute__((packed)) a;

Please keep the PR number comment as the first thing in the files.

> Index: gcc.c-torture/compile/pr49163.c
> ===================================================================
> --- gcc.c-torture/compile/pr49163.c	(Revision 174701)
> +++ gcc.c-torture/compile/pr49163.c	(Arbeitskopie)
> @@ -1,3 +1,4 @@
> +/* { dg-require-effective-target int32plus } */
>  /* PR target/49163 */
>  struct S1
>  {


	Jakub
Richard Biener June 14, 2011, 10:03 a.m. UTC | #7
On Mon, Jun 13, 2011 at 2:45 PM, Georg-Johann Lay <avr@gjlay.de> wrote:
> Ping #1 for:
> http://gcc.gnu.org/ml/gcc-patches/2011-06/msg00746.html

Ok.

THanks,
Richard.

>
> Georg-Johann Lay:
>>
>> This patch fixes testsuite failures because the testcases assume
>> sizeof(int) >= 4.
>>
>>        * gcc.c-torture/compile/pr49029.c: Add dg-require-effective-target
>>        int32plus
>>        * gcc.c-torture/compile/pr49163.c: Ditto.
>
diff mbox

Patch

Index: gcc.c-torture/compile/pr49029.c
===================================================================
--- gcc.c-torture/compile/pr49029.c	(Revision 174701)
+++ gcc.c-torture/compile/pr49029.c	(Arbeitskopie)
@@ -1,3 +1,4 @@ 
+/* { dg-require-effective-target int32plus } */
 /* PR middle-end/49029 */
 struct S { volatile unsigned f : 11; signed g : 30; } __attribute__((packed));
 struct T { volatile struct S h; } __attribute__((packed)) a;
Index: gcc.c-torture/compile/pr49163.c
===================================================================
--- gcc.c-torture/compile/pr49163.c	(Revision 174701)
+++ gcc.c-torture/compile/pr49163.c	(Arbeitskopie)
@@ -1,3 +1,4 @@ 
+/* { dg-require-effective-target int32plus } */
 /* PR target/49163 */
 struct S1
 {