public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [testsuite]: Skip tests for targets with int < 32 bits
@ 2011-06-09 17:21 Georg-Johann Lay
  2011-06-13 13:09 ` Ping: " Georg-Johann Lay
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Georg-Johann Lay @ 2011-06-09 17:21 UTC (permalink / raw)
  To: gcc-patches; +Cc: Mike Stump, Kaz Kojima, Jakub Jelinek

[-- Attachment #1: Type: text/plain, Size: 206 bytes --]

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.

[-- Attachment #2: int32plus.diff --]
[-- Type: text/x-patch, Size: 760 bytes --]

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
 {

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Ping: [testsuite]: Skip tests for targets with int < 32 bits
  2011-06-09 17:21 [testsuite]: Skip tests for targets with int < 32 bits Georg-Johann Lay
@ 2011-06-13 13:09 ` Georg-Johann Lay
  2011-06-14 10:10   ` Richard Guenther
  2011-06-13 18:04 ` Mike Stump
  2011-06-13 19:09 ` Jakub Jelinek
  2 siblings, 1 reply; 10+ messages in thread
From: Georg-Johann Lay @ 2011-06-13 13:09 UTC (permalink / raw)
  To: gcc-patches; +Cc: Georg-Johann Lay, Mike Stump, Kaz Kojima, Jakub Jelinek

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.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [testsuite]: Skip tests for targets with int < 32 bits
  2011-06-09 17:21 [testsuite]: Skip tests for targets with int < 32 bits Georg-Johann Lay
  2011-06-13 13:09 ` Ping: " Georg-Johann Lay
@ 2011-06-13 18:04 ` Mike Stump
  2011-06-13 18:40   ` Georg-Johann Lay
  2011-06-13 19:09 ` Jakub Jelinek
  2 siblings, 1 reply; 10+ messages in thread
From: Mike Stump @ 2011-06-13 18:04 UTC (permalink / raw)
  To: Georg-Johann Lay; +Cc: gcc-patches, Kaz Kojima, Jakub Jelinek

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.  :-(

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [testsuite]: Skip tests for targets with int < 32 bits
  2011-06-13 18:04 ` Mike Stump
@ 2011-06-13 18:40   ` Georg-Johann Lay
  2011-06-13 18:53     ` Jakub Jelinek
  2011-06-13 19:07     ` Mike Stump
  0 siblings, 2 replies; 10+ messages in thread
From: Georg-Johann Lay @ 2011-06-13 18:40 UTC (permalink / raw)
  To: Mike Stump; +Cc: gcc-patches, Kaz Kojima, Jakub Jelinek, Rainer Orth

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [testsuite]: Skip tests for targets with int < 32 bits
  2011-06-13 18:40   ` Georg-Johann Lay
@ 2011-06-13 18:53     ` Jakub Jelinek
  2011-06-14  9:38       ` Georg-Johann Lay
  2011-06-13 19:07     ` Mike Stump
  1 sibling, 1 reply; 10+ messages in thread
From: Jakub Jelinek @ 2011-06-13 18:53 UTC (permalink / raw)
  To: Georg-Johann Lay
  Cc: Mike Stump, gcc-patches, Kaz Kojima, Jakub Jelinek, Rainer Orth

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [testsuite]: Skip tests for targets with int < 32 bits
  2011-06-13 18:40   ` Georg-Johann Lay
  2011-06-13 18:53     ` Jakub Jelinek
@ 2011-06-13 19:07     ` Mike Stump
  1 sibling, 0 replies; 10+ messages in thread
From: Mike Stump @ 2011-06-13 19:07 UTC (permalink / raw)
  To: Georg-Johann Lay; +Cc: gcc-patches, Kaz Kojima, Jakub Jelinek, Rainer Orth

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.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [testsuite]: Skip tests for targets with int < 32 bits
  2011-06-09 17:21 [testsuite]: Skip tests for targets with int < 32 bits Georg-Johann Lay
  2011-06-13 13:09 ` Ping: " Georg-Johann Lay
  2011-06-13 18:04 ` Mike Stump
@ 2011-06-13 19:09 ` Jakub Jelinek
  2 siblings, 0 replies; 10+ messages in thread
From: Jakub Jelinek @ 2011-06-13 19:09 UTC (permalink / raw)
  To: Georg-Johann Lay; +Cc: gcc-patches, Mike Stump, Kaz Kojima

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [testsuite]: Skip tests for targets with int < 32 bits
  2011-06-13 18:53     ` Jakub Jelinek
@ 2011-06-14  9:38       ` Georg-Johann Lay
  2011-06-14 15:57         ` Mike Stump
  0 siblings, 1 reply; 10+ messages in thread
From: Georg-Johann Lay @ 2011-06-14  9:38 UTC (permalink / raw)
  To: gcc-patches; +Cc: Jakub Jelinek, Mike Stump, Kaz Kojima, Rainer Orth

[-- Attachment #1: Type: text/plain, Size: 1011 bytes --]

Jakub Jelinek schrieb:
> 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

Thanks for your help Mike and Jakub.

Updated patch and testrun looks cleaner now.

Johann

--

testsuite/

	* gcc.c-torture/execute/cmpsi-2.c: Undo 172757.
	* gcc.c-torture/execute/cmpsi-2.x: New file.
	* gcc.c-torture/execute/pr45262.c: Undo 172757.
	* gcc.c-torture/execute/pr45262.x: New file.
	* gcc.c-torture/compile/pr46534.c: Skip for AVR.
	* gcc.c-torture/compile/pr49029.c: Add dg-require-effective-target
	int32plus
	* gcc.c-torture/compile/pr49163.c: Ditto.

[-- Attachment #2: testsuite-int32plus-2.diff --]
[-- Type: text/x-patch, Size: 2509 bytes --]

Index: gcc.c-torture/execute/cmpsi-2.c
===================================================================
--- gcc.c-torture/execute/cmpsi-2.c	(Revision 174701)
+++ gcc.c-torture/execute/cmpsi-2.c	(Arbeitskopie)
@@ -1,5 +1,3 @@
-/* { dg-require-effective-target int32plus } */
-
 #define F 140
 #define T 13
 
Index: gcc.c-torture/execute/cmpsi-2.x
===================================================================
--- gcc.c-torture/execute/cmpsi-2.x	(Revision 0)
+++ gcc.c-torture/execute/cmpsi-2.x	(Revision 0)
@@ -0,0 +1,7 @@
+load_lib target-supports.exp
+
+if { [check_effective_target_int16] } {
+	return 1
+}
+
+return 0;
Index: gcc.c-torture/execute/pr45262.c
===================================================================
--- gcc.c-torture/execute/pr45262.c	(Revision 174701)
+++ gcc.c-torture/execute/pr45262.c	(Arbeitskopie)
@@ -1,5 +1,4 @@
 /* PR middle-end/45262 */
-/* { dg-require-effective-target int32plus } */
 
 extern void abort (void);
 
Index: gcc.c-torture/execute/pr45262.x
===================================================================
--- gcc.c-torture/execute/pr45262.x	(Revision 0)
+++ gcc.c-torture/execute/pr45262.x	(Revision 0)
@@ -0,0 +1,7 @@
+load_lib target-supports.exp
+
+if { [check_effective_target_int16] } {
+	return 1
+}
+
+return 0;
Index: gcc.c-torture/compile/pr46534.c
===================================================================
--- gcc.c-torture/compile/pr46534.c	(Revision 174701)
+++ gcc.c-torture/compile/pr46534.c	(Arbeitskopie)
@@ -1,4 +1,4 @@
-/* { dg-skip-if "too big" { pdp11-*-* } { "*" } { "" } } */
+/* { dg-skip-if "too big" { avr-*-* pdp11-*-* } { "*" } { "" } } */
 /* PR middle-end/46534 */
 
 extern int printf (const char *, ...);
Index: gcc.c-torture/compile/pr49029.c
===================================================================
--- gcc.c-torture/compile/pr49029.c	(Revision 174701)
+++ gcc.c-torture/compile/pr49029.c	(Arbeitskopie)
@@ -1,4 +1,5 @@
 /* PR middle-end/49029 */
+/* { dg-require-effective-target int32plus } */
 struct S { volatile unsigned f : 11; signed g : 30; } __attribute__((packed));
 struct T { volatile struct S h; } __attribute__((packed)) a;
 void foo (int);
Index: gcc.c-torture/compile/pr49163.c
===================================================================
--- gcc.c-torture/compile/pr49163.c	(Revision 174701)
+++ gcc.c-torture/compile/pr49163.c	(Arbeitskopie)
@@ -1,4 +1,5 @@
 /* PR target/49163 */
+/* { dg-require-effective-target int32plus } */
 struct S1
 {
  unsigned f0:18;

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Ping: [testsuite]: Skip tests for targets with int < 32 bits
  2011-06-13 13:09 ` Ping: " Georg-Johann Lay
@ 2011-06-14 10:10   ` Richard Guenther
  0 siblings, 0 replies; 10+ messages in thread
From: Richard Guenther @ 2011-06-14 10:10 UTC (permalink / raw)
  To: Georg-Johann Lay; +Cc: gcc-patches, Mike Stump, Kaz Kojima, Jakub Jelinek

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.
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [testsuite]: Skip tests for targets with int < 32 bits
  2011-06-14  9:38       ` Georg-Johann Lay
@ 2011-06-14 15:57         ` Mike Stump
  0 siblings, 0 replies; 10+ messages in thread
From: Mike Stump @ 2011-06-14 15:57 UTC (permalink / raw)
  To: Georg-Johann Lay; +Cc: gcc-patches, Jakub Jelinek, Kaz Kojima, Rainer Orth

On Jun 14, 2011, at 2:20 AM, Georg-Johann Lay wrote:

> testsuite/
> 
> 	* gcc.c-torture/execute/cmpsi-2.c: Undo 172757.

Please always include the PR number in the changelog entries when there is one.  This autolinks the work to the PR.  Use the exact formatting found in the changelog file.  It goes just before the above line.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-06-14 15:53 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-09 17:21 [testsuite]: Skip tests for targets with int < 32 bits Georg-Johann Lay
2011-06-13 13:09 ` Ping: " Georg-Johann Lay
2011-06-14 10:10   ` Richard Guenther
2011-06-13 18:04 ` Mike Stump
2011-06-13 18:40   ` Georg-Johann Lay
2011-06-13 18:53     ` Jakub Jelinek
2011-06-14  9:38       ` Georg-Johann Lay
2011-06-14 15:57         ` Mike Stump
2011-06-13 19:07     ` Mike Stump
2011-06-13 19:09 ` Jakub Jelinek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).