This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
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))
- From: Rainer Orth <ro at CeBiTec dot Uni-Bielefeld dot DE>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Richard Biener <rguenther at suse dot de>, Mike Stump <mikestump at comcast dot net>, "Joseph S. Myers" <joseph at codesourcery dot com>, Tamar Christina <Tamar dot Christina at arm dot com>, gcc-patches at gcc dot gnu dot org
- Date: Tue, 30 Jul 2019 09:05:35 +0200
- Subject: 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))
- References: <20190625083126.GA19632@arm.com> <DB6PR0802MB230918BEA271728437E6CA57FFE30@DB6PR0802MB2309.eurprd08.prod.outlook.com> <alpine.LSU.2.20.1906251044350.10704@zhemvz.fhfr.qr> <20190702094115.GA22370@arm.com> <alpine.LSU.2.20.1907021214070.2976@zhemvz.fhfr.qr> <20190702164351.GA12197@arm.com> <20190730065739.GG15878@tucnak>
Hi Jakub,
> On Tue, Jul 02, 2019 at 04:43:54PM +0000, 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 <jakub@redhat.com>
>
> * gcc.dg/type-convert-var.c: Add -0fexcess-precision=fast to
^ typo
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University