Re: [PATCH] Fix up gcc.dg/type-convert-var.c testcase (was Re: [GCC][middle-end] Add rules to strip away unneeded type casts in expressions (2nd patch))
On Tue, 30 Jul 2019, Jakub Jelinek wrote: > On Tue, Jul 30, 2019 at 09:05:35AM +0200, Rainer Orth wrote: > > > This new testcase FAILs e.g. on i686-linux. The problem is that > > > > this is PR middle-end/91282. > > Indeed. > > > > with no dg-options, the testcase options default to -ansi, which > > > implies -fexcess-precision=standard. On i686-linux, that is conversion to > > > long double which must (and does) survive until expansion. > > > > > > Fixed by using -fexcess-precision=fast, tested on x86_64-linux and > > > i686-linux, ok for trunk? > > > > > > 2019-07-30 Jakub Jelinek > > > > > > * gcc.dg/type-convert-var.c: Add -0fexcess-precision=fast to > > ^ typo > > Oops, fixed: OK. > 2019-07-30 Jakub Jelinek > > PR middle-end/91282 > * gcc.dg/type-convert-var.c: Add -fexcess-precision=fast to > dg-additional-options. > > --- gcc/testsuite/gcc.dg/type-convert-var.c.jj2019-07-28 > 17:29:27.156351325 +0200 > +++ gcc/testsuite/gcc.dg/type-convert-var.c 2019-07-30 08:51:33.349558035 > +0200 > @@ -1,5 +1,5 @@ > /* { dg-do compile } */ > -/* { dg-additional-options "-O1 -fdump-tree-optimized" } */ > +/* { dg-additional-options "-fexcess-precision=fast -O1 > -fdump-tree-optimized" } */ > void foo (float a, float b, float *c) > { >double e = (double)a * (double)b; > > > Jakub > -- Richard Biener SUSE Linux GmbH, Maxfeldstrasse 5, 90409 Nuernberg, Germany; GF: Felix Imendörffer, Mary Higgins, Sri Rasiah; HRB 21284 (AG Nürnberg)
Re: [PATCH] Fix up gcc.dg/type-convert-var.c testcase (was Re: [GCC][middle-end] Add rules to strip away unneeded type casts in expressions (2nd patch))
On Tue, Jul 30, 2019 at 09:05:35AM +0200, Rainer Orth wrote: > > This new testcase FAILs e.g. on i686-linux. The problem is that > > this is PR middle-end/91282. Indeed. > > with no dg-options, the testcase options default to -ansi, which > > implies -fexcess-precision=standard. On i686-linux, that is conversion to > > long double which must (and does) survive until expansion. > > > > Fixed by using -fexcess-precision=fast, tested on x86_64-linux and > > i686-linux, ok for trunk? > > > > 2019-07-30 Jakub Jelinek > > > > * gcc.dg/type-convert-var.c: Add -0fexcess-precision=fast to > ^ typo Oops, fixed: 2019-07-30 Jakub Jelinek PR middle-end/91282 * gcc.dg/type-convert-var.c: Add -fexcess-precision=fast to dg-additional-options. --- gcc/testsuite/gcc.dg/type-convert-var.c.jj 2019-07-28 17:29:27.156351325 +0200 +++ gcc/testsuite/gcc.dg/type-convert-var.c 2019-07-30 08:51:33.349558035 +0200 @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-additional-options "-O1 -fdump-tree-optimized" } */ +/* { dg-additional-options "-fexcess-precision=fast -O1 -fdump-tree-optimized" } */ void foo (float a, float b, float *c) { double e = (double)a * (double)b; Jakub
Re: [PATCH] Fix up gcc.dg/type-convert-var.c testcase (was Re: [GCC][middle-end] Add rules to strip away unneeded type casts in expressions (2nd patch))
Hi Jakub, > On Tue, Jul 02, 2019 at 04:43:54PM +, Tamar Christina wrote: >> --- /dev/null >> +++ b/gcc/testsuite/gcc.dg/type-convert-var.c >> @@ -0,0 +1,9 @@ >> +/* { dg-do compile } */ >> +/* { dg-additional-options "-O1 -fdump-tree-optimized" } */ >> +void foo (float a, float b, float *c) >> +{ >> + double e = (double)a * (double)b; >> + *c = (float)e; >> +} >> + >> +/* { dg-final { scan-tree-dump-not {double} "optimized" } } */ >> > > This new testcase FAILs e.g. on i686-linux. The problem is that this is PR middle-end/91282. > with no dg-options, the testcase options default to -ansi, which > implies -fexcess-precision=standard. On i686-linux, that is conversion to > long double which must (and does) survive until expansion. > > Fixed by using -fexcess-precision=fast, tested on x86_64-linux and > i686-linux, ok for trunk? > > 2019-07-30 Jakub Jelinek > > * gcc.dg/type-convert-var.c: Add -0fexcess-precision=fast to ^ typo Rainer -- - Rainer Orth, Center for Biotechnology, Bielefeld University
[PATCH] Fix up gcc.dg/type-convert-var.c testcase (was Re: [GCC][middle-end] Add rules to strip away unneeded type casts in expressions (2nd patch))
On Tue, Jul 02, 2019 at 04:43:54PM +, Tamar Christina wrote: > --- /dev/null > +++ b/gcc/testsuite/gcc.dg/type-convert-var.c > @@ -0,0 +1,9 @@ > +/* { dg-do compile } */ > +/* { dg-additional-options "-O1 -fdump-tree-optimized" } */ > +void foo (float a, float b, float *c) > +{ > + double e = (double)a * (double)b; > + *c = (float)e; > +} > + > +/* { dg-final { scan-tree-dump-not {double} "optimized" } } */ > This new testcase FAILs e.g. on i686-linux. The problem is that with no dg-options, the testcase options default to -ansi, which implies -fexcess-precision=standard. On i686-linux, that is conversion to long double which must (and does) survive until expansion. Fixed by using -fexcess-precision=fast, tested on x86_64-linux and i686-linux, ok for trunk? 2019-07-30 Jakub Jelinek * gcc.dg/type-convert-var.c: Add -0fexcess-precision=fast to dg-additional-options. --- gcc/testsuite/gcc.dg/type-convert-var.c.jj 2019-07-28 17:29:27.156351325 +0200 +++ gcc/testsuite/gcc.dg/type-convert-var.c 2019-07-30 08:51:33.349558035 +0200 @@ -1,5 +1,5 @@ /* { dg-do compile } */ -/* { dg-additional-options "-O1 -fdump-tree-optimized" } */ +/* { dg-additional-options "-fexcess-precision=fast -O1 -fdump-tree-optimized" } */ void foo (float a, float b, float *c) { double e = (double)a * (double)b; Jakub