Patchwork [testsuite] ad PR52641: More fixes for not-so-common targets

login
register
mail settings
Submitter Georg-Johann Lay
Date Nov. 23, 2012, 1:36 p.m.
Message ID <50AF7BE8.7000105@gjlay.de>
Download mbox | patch
Permalink /patch/201320/
State New
Headers show

Comments

Georg-Johann Lay - Nov. 23, 2012, 1:36 p.m.
Here are some more fixes for 16-bit int and similar.

Ok for trunk?

Johann

	* gcc.dg/c1x-align-4.c: Skip avr.
	* gcc.dg/54455.c: Require scheduling.
	* gcc.dg/pr44024.c: Skip avr in final scan.

	PR testsuite/52641
	* gcc.c-torture/execute/20120919-1.x: New file (int32plus).
	* gcc.dg/pr54676.c: Make work for 16-bit int.
Hans-Peter Nilsson - Nov. 24, 2012, 10:31 a.m.
On Fri, 23 Nov 2012, Georg-Johann Lay wrote:
> Here are some more fixes for 16-bit int and similar.

> 	* gcc.c-torture/execute/20120919-1.x: New file (int32plus).

No, you should be able to use dg-directives in the main file these days.
(The .x files are obsolete since a few years, IIRC.)

brgds, H-P
Georg-Johann Lay - Nov. 26, 2012, 9:45 a.m.
Hans-Peter Nilsson wrote:
> On Fri, 23 Nov 2012, Georg-Johann Lay wrote:
>> Here are some more fixes for 16-bit int and similar.
> 
>> 	* gcc.c-torture/execute/20120919-1.x: New file (int32plus).
> 
> No, you should be able to use dg-directives in the main file these days.
> (The .x files are obsolete since a few years, IIRC.)

Would you be more specific?

AFAIK this works only with dg.

After removing the x file and adding

/* { dg-do run } */
/* { dg-require-effective-target int32plus } */

to the test it is still executed.

Thanks,

Johann
Hans-Peter Nilsson - Nov. 26, 2012, 11:16 a.m.
On Mon, 26 Nov 2012, Georg-Johann Lay wrote:
> Hans-Peter Nilsson wrote:
> > On Fri, 23 Nov 2012, Georg-Johann Lay wrote:
> >> Here are some more fixes for 16-bit int and similar.
> >
> >> 	* gcc.c-torture/execute/20120919-1.x: New file (int32plus).
> >
> > No, you should be able to use dg-directives in the main file these days.
> > (The .x files are obsolete since a few years, IIRC.)
>
> Would you be more specific?

You seem to have understood what I meant, so I guess not needed. :)

> AFAIK this works only with dg.

I had another look.  I thought Mark Mitchells overhaul in
2003 adjusted *all* gcc/testsuite subdirectories; I grepped
gcc.c-torture/execute/* and gcc.c-torture/compile/* for "dg-",
lots of apparently-working examples.

But that's wrong; observe the differences between
gcc.c-torture/execute/execute.exp and
gcc.c-torture/compile/compile.exp; they should differ only in
the dg-do-what-default, but the whole dg- thing is missing in
gcc.c-torture/execute/execute.exp.  I haven't dug into the ml
archives for the reason, maybe there were problems and not
enough time to solve them.  At least according to svn it doesn't
seem to be a reverted change.

> After removing the x file and adding
>
> /* { dg-do run } */
> /* { dg-require-effective-target int32plus } */
>
> to the test it is still executed.

Yeah...  If it had been a new test, I would have suggested to
put it in gcc.dg/torture instead, the new preferred home for
executed torture-tests.  So unless you feel like completing
Mark's dg- makeover for gcc.c-torture/execute you'll have to go
with your .x file.  Sorry for putting you on the wrong track,
but thanks for getting light on the issue.

Mike, other testsuite maintainers; heads-up: there are several
dg- directives in files in gcc.c-torture/execute.  That's just
misleading, since they have no effect.  (I just verified that,
testing a few examples.)

brgds, H-P

Patch

Index: gcc.c-torture/execute/20120919-1.x
===================================================================
--- gcc.c-torture/execute/20120919-1.x	(revision 0)
+++ gcc.c-torture/execute/20120919-1.x	(revision 0)
@@ -0,0 +1,7 @@ 
+load_lib target-supports.exp
+
+if { [check_effective_target_int32plus] } {
+	return 0
+}
+
+return 1;
Index: gcc.dg/pr54676.c
===================================================================
--- gcc.dg/pr54676.c	(revision 193748)
+++ gcc.dg/pr54676.c	(working copy)
@@ -9,6 +9,10 @@  struct S
 
 struct S bar (void);
 
+#if __SIZEOF_INT__ < 4
+#define int __INT32_TYPE__
+#endif
+
 int a;
 
 void
Index: gcc.dg/c1x-align-4.c
===================================================================
--- gcc.dg/c1x-align-4.c	(revision 193748)
+++ gcc.dg/c1x-align-4.c	(working copy)
@@ -2,6 +2,7 @@ 
    are at least some alignment constraints).  */
 /* { dg-do compile } */
 /* { dg-options "-std=c1x -pedantic-errors" } */
+/* { dg-skip-if "no alignment constraints" { "avr-*-*" } { "*" } { "" } } */
 
 #include <stddef.h>
 
Index: gcc.dg/54455.c
===================================================================
--- gcc.dg/54455.c	(revision 193748)
+++ gcc.dg/54455.c	(working copy)
@@ -1,6 +1,7 @@ 
 /* PR rtl-optimization/54455 */
 /* { dg-do compile } */
 /* { dg-options "-O1 -fschedule-insns -fselective-scheduling --param max-sched-extend-regions-iters=2" } */
+/* { dg-require-effective-target scheduling } */
 
 extern void fn1 (void), fn2 (void);
 
Index: gcc.dg/pr44024.c
===================================================================
--- gcc.dg/pr44024.c	(revision 193748)
+++ gcc.dg/pr44024.c	(working copy)
@@ -10,5 +10,5 @@  int main()
   return 0;
 }
 
-/* { dg-final { scan-tree-dump-not "foo" "original" } } */
+/* { dg-final { scan-tree-dump-not "foo" "original" { target { ! avr*-*-* } } } } */
 /* { dg-final { cleanup-tree-dump "original" } } */