Re: [PATCH] Test cases for PR77937
Markus, thanks for fixing this during my night. Appreciate it! Bill > On Oct 14, 2016, at 6:08 AM, Markus Trippelsdorf> wrote: > > On 2016.10.13 at 22:04 +0200, Rainer Orth wrote: >> Hi Bill, >> >>> Here are torture test cases for >>> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77937. Markus Trippelsdorf >>> kindly provided the source for the tests and verified the correct >>> dejagnu options on x86_64-pc-linux-gnu. Committed. >>> >>> Thanks, >>> Bill >>> >>> >>> 2016-10-13 Bill Schmidt >>> >>> PR tree-optimization/77937 >>> * gcc.dg/torture/pr77937-1.c: New. >>> * gcc.dg/torture/pr77937-2.c: New. >>> >>> >>> Index: gcc/testsuite/gcc.dg/torture/pr77937-1.c >>> === >>> --- gcc/testsuite/gcc.dg/torture/pr77937-1.c(revision 0) >>> +++ gcc/testsuite/gcc.dg/torture/pr77937-1.c(working copy) >>> @@ -0,0 +1,14 @@ >>> +/* { dg-do compile } */ >>> +/* { dg-do options "-O3 -march=amdfam10" { target { x86_64-*-* } } } */ >> >> this can't be right: you always need target { i?86-*-* x86_64-*-* } and >> if really need be restrict it to 64-bit only with lp64. This makes sure >> the test is run correctly for multilib x86 configurations >> (e.g. i686-pc-linux-gnu with -m64). Same in the other test. > > This was in part because of my sloppy review. Sorry. > I've committed the fix as obvious. > > -- > Markus
Re: [PATCH] Test cases for PR77937
On 10/14/2016 01:33 PM, Markus Trippelsdorf wrote: Thanks. ChangeLog entries for the testsuite are not mandatory. They are actually. Bernd
Re: [PATCH] Test cases for PR77937
Hi Markus, >> You should have added a ChangeLog entry for that change. Unfortunately, >> neither the original testcases nor the fixed ones can ever have been >> properly tested: there's no such thing as dg-do options, leading to >> horrendous errors in mail-report.log: >> >> ERROR: gcc.dg/torture/pr77937-1.c -O0 : 2: too many arguments for " dg-do >> 2 options "-O3 -march=amdfam10" { target { x86_64-*-* } } " >> UNRESOLVED: gcc.dg/torture/pr77937-1.c -O0 : 2: too many arguments for " >> dg-do 2 options "-O3 -march=amdfam10" { target { x86_64-*-* } } " >> >> I missed that myself ;-( >> >> I've now applied Uros' patch merged with yours, with this ChangeLog >> entry after proper testing of both multilibs on x86_64-pc-linux-gnu. > > Thanks. ChangeLog entries for the testsuite are not mandatory. they are, but some developer choose not to add them nonetheless. Rainer -- - Rainer Orth, Center for Biotechnology, Bielefeld University
Re: [PATCH] Test cases for PR77937
On 2016.10.14 at 13:28 +0200, Rainer Orth wrote: > Hi Markus, > > > On 2016.10.13 at 22:04 +0200, Rainer Orth wrote: > >> Hi Bill, > >> > >> > Here are torture test cases for > >> > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77937. Markus Trippelsdorf > >> > kindly provided the source for the tests and verified the correct > >> > dejagnu options on x86_64-pc-linux-gnu. Committed. > >> > > >> > Thanks, > >> > Bill > >> > > >> > > >> > 2016-10-13 Bill Schmidt> >> > > >> > PR tree-optimization/77937 > >> > * gcc.dg/torture/pr77937-1.c: New. > >> > * gcc.dg/torture/pr77937-2.c: New. > >> > > >> > > >> > Index: gcc/testsuite/gcc.dg/torture/pr77937-1.c > >> > === > >> > --- gcc/testsuite/gcc.dg/torture/pr77937-1.c (revision 0) > >> > +++ gcc/testsuite/gcc.dg/torture/pr77937-1.c (working copy) > >> > @@ -0,0 +1,14 @@ > >> > +/* { dg-do compile } */ > >> > +/* { dg-do options "-O3 -march=amdfam10" { target { x86_64-*-* } } } */ > >> > >> this can't be right: you always need target { i?86-*-* x86_64-*-* } and > >> if really need be restrict it to 64-bit only with lp64. This makes sure > >> the test is run correctly for multilib x86 configurations > >> (e.g. i686-pc-linux-gnu with -m64). Same in the other test. > > > > This was in part because of my sloppy review. Sorry. > > I've committed the fix as obvious. > > You should have added a ChangeLog entry for that change. Unfortunately, > neither the original testcases nor the fixed ones can ever have been > properly tested: there's no such thing as dg-do options, leading to > horrendous errors in mail-report.log: > > ERROR: gcc.dg/torture/pr77937-1.c -O0 : 2: too many arguments for " dg-do 2 > options "-O3 -march=amdfam10" { target { x86_64-*-* } } " > UNRESOLVED: gcc.dg/torture/pr77937-1.c -O0 : 2: too many arguments for " > dg-do 2 options "-O3 -march=amdfam10" { target { x86_64-*-* } } " > > I missed that myself ;-( > > I've now applied Uros' patch merged with yours, with this ChangeLog > entry after proper testing of both multilibs on x86_64-pc-linux-gnu. Thanks. ChangeLog entries for the testsuite are not mandatory. -- Markus
Re: [PATCH] Test cases for PR77937
Hi Markus, > On 2016.10.13 at 22:04 +0200, Rainer Orth wrote: >> Hi Bill, >> >> > Here are torture test cases for >> > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77937. Markus Trippelsdorf >> > kindly provided the source for the tests and verified the correct >> > dejagnu options on x86_64-pc-linux-gnu. Committed. >> > >> > Thanks, >> > Bill >> > >> > >> > 2016-10-13 Bill Schmidt>> > >> >PR tree-optimization/77937 >> >* gcc.dg/torture/pr77937-1.c: New. >> >* gcc.dg/torture/pr77937-2.c: New. >> > >> > >> > Index: gcc/testsuite/gcc.dg/torture/pr77937-1.c >> > === >> > --- gcc/testsuite/gcc.dg/torture/pr77937-1.c (revision 0) >> > +++ gcc/testsuite/gcc.dg/torture/pr77937-1.c (working copy) >> > @@ -0,0 +1,14 @@ >> > +/* { dg-do compile } */ >> > +/* { dg-do options "-O3 -march=amdfam10" { target { x86_64-*-* } } } */ >> >> this can't be right: you always need target { i?86-*-* x86_64-*-* } and >> if really need be restrict it to 64-bit only with lp64. This makes sure >> the test is run correctly for multilib x86 configurations >> (e.g. i686-pc-linux-gnu with -m64). Same in the other test. > > This was in part because of my sloppy review. Sorry. > I've committed the fix as obvious. You should have added a ChangeLog entry for that change. Unfortunately, neither the original testcases nor the fixed ones can ever have been properly tested: there's no such thing as dg-do options, leading to horrendous errors in mail-report.log: ERROR: gcc.dg/torture/pr77937-1.c -O0 : 2: too many arguments for " dg-do 2 options "-O3 -march=amdfam10" { target { x86_64-*-* } } " UNRESOLVED: gcc.dg/torture/pr77937-1.c -O0 : 2: too many arguments for " dg-do 2 options "-O3 -march=amdfam10" { target { x86_64-*-* } } " I missed that myself ;-( I've now applied Uros' patch merged with yours, with this ChangeLog entry after proper testing of both multilibs on x86_64-pc-linux-gnu. Rainer -- - Rainer Orth, Center for Biotechnology, Bielefeld University 2016-10-14 Uros Bizjak * gcc.dg/torture/pr77937-1.c: Move -O3 to dg-options. Pass -march=amdfam10 for both i?86-?-* and x86_64-*-*. * gcc.dg/torture/pr77937-2.c: Likewise. diff --git a/gcc/testsuite/gcc.dg/torture/pr77937-1.c b/gcc/testsuite/gcc.dg/torture/pr77937-1.c --- a/gcc/testsuite/gcc.dg/torture/pr77937-1.c +++ b/gcc/testsuite/gcc.dg/torture/pr77937-1.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ -/* { dg-do options "-O3 -march=amdfam10" { target { i?86-*-* x86_64-*-* } } } */ +/* { dg-options "-O3" } */ +/* { dg-additional-options "-march=amdfam10" { target i?86-*-* x86_64-*-* } } */ int *a; int b, c, d; diff --git a/gcc/testsuite/gcc.dg/torture/pr77937-2.c b/gcc/testsuite/gcc.dg/torture/pr77937-2.c --- a/gcc/testsuite/gcc.dg/torture/pr77937-2.c +++ b/gcc/testsuite/gcc.dg/torture/pr77937-2.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ -/* { dg-do options "-O3 -march=amdfam10" { target { i?86-*-* x86_64-*-* } } } */ +/* { dg-options "-O3" } */ +/* { dg-additional-options "-march=amdfam10" { target i?86-*-* x86_64-*-* } } */ extern int fn2(int); extern int fn3(int);
Re: [PATCH] Test cases for PR77937
On 2016.10.13 at 22:04 +0200, Rainer Orth wrote: > Hi Bill, > > > Here are torture test cases for > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77937. Markus Trippelsdorf > > kindly provided the source for the tests and verified the correct > > dejagnu options on x86_64-pc-linux-gnu. Committed. > > > > Thanks, > > Bill > > > > > > 2016-10-13 Bill Schmidt> > > > PR tree-optimization/77937 > > * gcc.dg/torture/pr77937-1.c: New. > > * gcc.dg/torture/pr77937-2.c: New. > > > > > > Index: gcc/testsuite/gcc.dg/torture/pr77937-1.c > > === > > --- gcc/testsuite/gcc.dg/torture/pr77937-1.c(revision 0) > > +++ gcc/testsuite/gcc.dg/torture/pr77937-1.c(working copy) > > @@ -0,0 +1,14 @@ > > +/* { dg-do compile } */ > > +/* { dg-do options "-O3 -march=amdfam10" { target { x86_64-*-* } } } */ > > this can't be right: you always need target { i?86-*-* x86_64-*-* } and > if really need be restrict it to 64-bit only with lp64. This makes sure > the test is run correctly for multilib x86 configurations > (e.g. i686-pc-linux-gnu with -m64). Same in the other test. This was in part because of my sloppy review. Sorry. I've committed the fix as obvious. -- Markus
Re: [PATCH] Test cases for PR77937
>> Here are torture test cases for >> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77937. Markus Trippelsdorf >> kindly provided the source for the tests and verified the correct >> dejagnu options on x86_64-pc-linux-gnu. Committed. >> >> Thanks, >> Bill >> >> >> 2016-10-13 Bill Schmidt>> >> PR tree-optimization/77937 >> * gcc.dg/torture/pr77937-1.c: New. >> * gcc.dg/torture/pr77937-2.c: New. >> >> >> Index: gcc/testsuite/gcc.dg/torture/pr77937-1.c >> === >> --- gcc/testsuite/gcc.dg/torture/pr77937-1.c (revision 0) >> +++ gcc/testsuite/gcc.dg/torture/pr77937-1.c (working copy) >> @@ -0,0 +1,14 @@ >> +/* { dg-do compile } */ >> +/* { dg-do options "-O3 -march=amdfam10" { target { x86_64-*-* } } } */ > > this can't be right: you always need target { i?86-*-* x86_64-*-* } and > if really need be restrict it to 64-bit only with lp64. This makes sure > the test is run correctly for multilib x86 configurations > (e.g. i686-pc-linux-gnu with -m64). Same in the other test. I plan to commit attached patch later today. Uros. diff --git a/gcc/testsuite/gcc.dg/torture/pr77937-1.c b/gcc/testsuite/gcc.dg/torture/pr77937-1.c index 5f921fd..8661d24 100644 --- a/gcc/testsuite/gcc.dg/torture/pr77937-1.c +++ b/gcc/testsuite/gcc.dg/torture/pr77937-1.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ -/* { dg-do options "-O3 -march=amdfam10" { target { x86_64-*-* } } } */ +/* { dg-options "-O3" } */ +/* { dg-additional-options "-march=amdfam10" { target i?86-*-* x86_64-*-* } } */ int *a; int b, c, d; diff --git a/gcc/testsuite/gcc.dg/torture/pr77937-2.c b/gcc/testsuite/gcc.dg/torture/pr77937-2.c index 1c3dfc1..37b4fd6 100644 --- a/gcc/testsuite/gcc.dg/torture/pr77937-2.c +++ b/gcc/testsuite/gcc.dg/torture/pr77937-2.c @@ -1,5 +1,6 @@ /* { dg-do compile } */ -/* { dg-do options "-O3 -march=amdfam10" { target { x86_64-*-* } } } */ +/* { dg-options "-O3" } */ +/* { dg-additional-options "-march=amdfam10" { target i?86-*-* x86_64-*-* } } */ extern int fn2(int); extern int fn3(int);
Re: [PATCH] Test cases for PR77937
Hi Bill, > Here are torture test cases for > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77937. Markus Trippelsdorf > kindly provided the source for the tests and verified the correct > dejagnu options on x86_64-pc-linux-gnu. Committed. > > Thanks, > Bill > > > 2016-10-13 Bill Schmidt> > PR tree-optimization/77937 > * gcc.dg/torture/pr77937-1.c: New. > * gcc.dg/torture/pr77937-2.c: New. > > > Index: gcc/testsuite/gcc.dg/torture/pr77937-1.c > === > --- gcc/testsuite/gcc.dg/torture/pr77937-1.c (revision 0) > +++ gcc/testsuite/gcc.dg/torture/pr77937-1.c (working copy) > @@ -0,0 +1,14 @@ > +/* { dg-do compile } */ > +/* { dg-do options "-O3 -march=amdfam10" { target { x86_64-*-* } } } */ this can't be right: you always need target { i?86-*-* x86_64-*-* } and if really need be restrict it to 64-bit only with lp64. This makes sure the test is run correctly for multilib x86 configurations (e.g. i686-pc-linux-gnu with -m64). Same in the other test. Rainer -- - Rainer Orth, Center for Biotechnology, Bielefeld University
[PATCH] Test cases for PR77937
Here are torture test cases for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77937. Markus Trippelsdorf kindly provided the source for the tests and verified the correct dejagnu options on x86_64-pc-linux-gnu. Committed. Thanks, Bill 2016-10-13 Bill SchmidtPR tree-optimization/77937 * gcc.dg/torture/pr77937-1.c: New. * gcc.dg/torture/pr77937-2.c: New. Index: gcc/testsuite/gcc.dg/torture/pr77937-1.c === --- gcc/testsuite/gcc.dg/torture/pr77937-1.c(revision 0) +++ gcc/testsuite/gcc.dg/torture/pr77937-1.c(working copy) @@ -0,0 +1,14 @@ +/* { dg-do compile } */ +/* { dg-do options "-O3 -march=amdfam10" { target { x86_64-*-* } } } */ + +int *a; +int b, c, d; +void fn1(char *p1, int p2) { + int x; + while (1) { +x = 0; +for (; x < 8; x++) + p1[0] = -a[0] * d + p1[0] * c + 1 >> b >> 1; +p1 += p2; + } +} Index: gcc/testsuite/gcc.dg/torture/pr77937-2.c === --- gcc/testsuite/gcc.dg/torture/pr77937-2.c(revision 0) +++ gcc/testsuite/gcc.dg/torture/pr77937-2.c(working copy) @@ -0,0 +1,17 @@ +/* { dg-do compile } */ +/* { dg-do options "-O3 -march=amdfam10" { target { x86_64-*-* } } } */ + +extern int fn2(int); +extern int fn3(int); +int a, b, c; +void fn1(long p1) { + char *d; + for (;; d += p1) { +d[0] = fn2(1 >> a); +fn3(0); +fn3(c >> a); +d[1] = fn3(d[1] * b + c >> a); +d[4] = fn3(d[4] * b + c >> a); +d[5] = fn3(d[5] * b + c >> a); + } +}