[PATCH] PR fortran/91497 -- Silence conversion warnings

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] PR fortran/91497 -- Silence conversion warnings

Steve Kargl
The attach patch silences -Wconversion and -Wconversion-extra
warnings that had previously been issued for explicit conversions
(see testcase for examples).

The patch has been tested on x86-*-freebsd.  OK to commit?

2019-10-03  Steven G. Kargl  <[hidden email]>

        PR fortran/91497
        * simplify.c (gfc_simplify_dble, simplify_intconv, gfc_simplify_real,
        gfc_simplify_sngl): Disable -Wconversion and -Wconversion-extra
        warnings for explicit conversion of literal constants.

2019-10-03  Steven G. Kargl  <[hidden email]>

        PR fortran/91497
        * gfortran.dg/pr91497.f90: New test.

--
Steve

pr91497.diff (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] PR fortran/91497 -- Silence conversion warnings

Thomas Koenig-6
Steve,

> The attach patch silences -Wconversion and -Wconversion-extra
> warnings that had previously been issued for explicit conversions
> (see testcase for examples).
>
> The patch has been tested on x86-*-freebsd.  OK to commit?

OK.

Thanks a lot for the patch!

Regards

        Thomas
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] PR fortran/91497 -- Silence conversion warnings

Steve Kargl
In reply to this post by Steve Kargl
On Fri, Oct 04, 2019 at 05:49:13PM +0200, Rainer Orth wrote:

>
> > The attach patch silences -Wconversion and -Wconversion-extra
> > warnings that had previously been issued for explicit conversions
> > (see testcase for examples).
> >
> > The patch has been tested on x86-*-freebsd.  OK to commit?
> >
> > 2019-10-03  Steven G. Kargl  <[hidden email]>
> >
> > PR fortran/91497
> > * simplify.c (gfc_simplify_dble, simplify_intconv, gfc_simplify_real,
> > gfc_simplify_sngl): Disable -Wconversion and -Wconversion-extra
> > warnings for explicit conversion of literal constants.
> >
> > 2019-10-03  Steven G. Kargl  <[hidden email]>
> >
> > PR fortran/91497
> > * gfortran.dg/pr91497.f90: New test.
>
> the new testcases FAILs on sparc and a couple of other targets:
>
> +FAIL: gfortran.dg/pr91497.f90   -O  (test for excess errors)
>
> Excess errors:
> /vol/gcc/src/hg/trunk/local/gcc/testsuite/gfortran.dg/pr91497.f90:13:13: Error: Old-style type declaration REAL*10 not supported at (1)
> /vol/gcc/src/hg/trunk/local/gcc/testsuite/gfortran.dg/pr91497.f90:20:30: Error: Invalid real kind 10 at (1)
> /vol/gcc/src/hg/trunk/local/gcc/testsuite/gfortran.dg/pr91497.f90:55:22: Error: Invalid kind for REAL at (1)
>
Does the attach patch fix targets without REAL(10) and REAL(16)?

--
Steve

pr91497.diff (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] PR fortran/91497 -- Silence conversion warnings

Rainer Orth-2
Hi Steve,

>> the new testcases FAILs on sparc and a couple of other targets:
>>
>> +FAIL: gfortran.dg/pr91497.f90   -O  (test for excess errors)
>>
>> Excess errors:
>> /vol/gcc/src/hg/trunk/local/gcc/testsuite/gfortran.dg/pr91497.f90:13:13:
>> Error: Old-style type declaration REAL*10 not supported at (1)
>> /vol/gcc/src/hg/trunk/local/gcc/testsuite/gfortran.dg/pr91497.f90:20:30:
>> Error: Invalid real kind 10 at (1)
>> /vol/gcc/src/hg/trunk/local/gcc/testsuite/gfortran.dg/pr91497.f90:55:22:
>> Error: Invalid kind for REAL at (1)
>>
>
> Does the attach patch fix targets without REAL(10) and REAL(16)?

unfortunately not: I get

FAIL: gfortran.dg/pr91497_1.f90   -O  (test for excess errors)
Excess errors:
/vol/gcc/src/hg/trunk/local/gcc/testsuite/gfortran.dg/pr91497_1.f90:16:13: Error: Old-style type declaration REAL*10 not supported at (1)
/vol/gcc/src/hg/trunk/local/gcc/testsuite/gfortran.dg/pr91497_1.f90:23:30: Error: Invalid real kind 10 at (1)
/vol/gcc/src/hg/trunk/local/gcc/testsuite/gfortran.dg/pr91497_1.f90:30:15: Error: Symbol 'c' at (1) has no IMPLICIT type
/vol/gcc/src/hg/trunk/local/gcc/testsuite/gfortran.dg/pr91497_1.f90:54:8: Error: Symbol 'cc' at (1) has no IMPLICIT type
/vol/gcc/src/hg/trunk/local/gcc/testsuite/gfortran.dg/pr91497_1.f90:54:22: Error: Invalid kind for REAL at (1)

on sparc-sun-solaris2.11.

        Rainer

--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] PR fortran/91497 -- Silence conversion warnings

Steve Kargl
On Sat, Oct 05, 2019 at 03:18:45PM +0200, Rainer Orth wrote:

> Hi Steve,
>
> >> the new testcases FAILs on sparc and a couple of other targets:
> >>
> >> +FAIL: gfortran.dg/pr91497.f90   -O  (test for excess errors)
> >>
> >> Excess errors:
> >> /vol/gcc/src/hg/trunk/local/gcc/testsuite/gfortran.dg/pr91497.f90:13:13:
> >> Error: Old-style type declaration REAL*10 not supported at (1)
> >> /vol/gcc/src/hg/trunk/local/gcc/testsuite/gfortran.dg/pr91497.f90:20:30:
> >> Error: Invalid real kind 10 at (1)
> >> /vol/gcc/src/hg/trunk/local/gcc/testsuite/gfortran.dg/pr91497.f90:55:22:
> >> Error: Invalid kind for REAL at (1)
> >>
> >
> > Does the attach patch fix targets without REAL(10) and REAL(16)?
>
> unfortunately not: I get
>

The failures are in a test with

+! { dg-require-effective-target fortran_large_real }

so that directive does not do what I thought.  Guess I'll
simply stripe out the testing of large REAL kinds.

--
Steve
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] PR fortran/91497 -- Silence conversion warnings

Steve Kargl
On Sat, Oct 05, 2019 at 06:27:08AM -0700, Steve Kargl wrote:

> On Sat, Oct 05, 2019 at 03:18:45PM +0200, Rainer Orth wrote:
> > Hi Steve,
> >
> > >> the new testcases FAILs on sparc and a couple of other targets:
> > >>
> > >> +FAIL: gfortran.dg/pr91497.f90   -O  (test for excess errors)
> > >>
> > >> Excess errors:
> > >> /vol/gcc/src/hg/trunk/local/gcc/testsuite/gfortran.dg/pr91497.f90:13:13:
> > >> Error: Old-style type declaration REAL*10 not supported at (1)
> > >> /vol/gcc/src/hg/trunk/local/gcc/testsuite/gfortran.dg/pr91497.f90:20:30:
> > >> Error: Invalid real kind 10 at (1)
> > >> /vol/gcc/src/hg/trunk/local/gcc/testsuite/gfortran.dg/pr91497.f90:55:22:
> > >> Error: Invalid kind for REAL at (1)
> > >>
> > >
> > > Does the attach patch fix targets without REAL(10) and REAL(16)?
> >
> > unfortunately not: I get
> >
>
> The failures are in a test with
>
> +! { dg-require-effective-target fortran_large_real }
>
> so that directive does not do what I thought.  Guess I'll
> simply stripe out the testing of large REAL kinds.
>

Should be fixed with

Index: gcc/testsuite/ChangeLog
===================================================================
--- gcc/testsuite/ChangeLog (revision 276625)
+++ gcc/testsuite/ChangeLog (working copy)
@@ -1,3 +1,8 @@
+2019-10-05  Steven G. Kargl  <[hidden email]>
+
+ PR fortran/91497
+ * gfortran.dg/pr91497.f90: Run on i?86-*-* and x86_64-*-* only.
+
 2019-10-05  Paul Thomas  <[hidden email]>
 
  PR fortran/91926
Index: gcc/testsuite/gfortran.dg/pr91497.f90
===================================================================
--- gcc/testsuite/gfortran.dg/pr91497.f90 (revision 276625)
+++ gcc/testsuite/gfortran.dg/pr91497.f90 (working copy)
@@ -1,4 +1,4 @@
-! { dg-do compile }
+! { dg-do compile { target { i?86-*-* x86_64-*-* } } }
 ! { dg-options "-Wall" }
 ! Code contributed by Manfred Schwarb <manfred99 at gmx dot ch>
 ! PR fortran/91497

--
Steve