This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gfortran, patch for PR 20777


coudert@lcp.u-psud.fr wrote:
> Attached patch fixes PR fortran/20777 (arithmetic IF was not flagged as
> obsolete in F95). Once again, this is a small amount of duplicate code
> (see my previous patch for embedded simple IF/arithmetic IF, and following
> comments).

The patch together with a ChangeLog is obviously correct.  (Can you please
make sure that your patches don't get encoded as application/octet-stream,
e.g. giving the files the extension .txt should work.  It makes it harder to
look at the patch or quote it in a reply.)

> This one shows a few regressions, since some testsuite codes (including
> mine) test this feature:
> 
> $ cat pr17229.f 
> ! PR fortran/17229
> ! { dg-do run }
>       integer i
>       logical l
> 
>       l = .false.
>       i = -1
>       if (l) if (i) 999,999,999
> 
> What should I do for those? I was thinking of a DG option to tell them to
> run without the -pedantic option: is that the right thing to do, and how
> should I do that?

I had a look around the existing testcases: from gfortran.dg/assign_1.f90:
! { dg-do compile }
! Option passed to avoid excess errors from obsolete warning
! { dg-options "-w" }

You'll also need to add a dg-warning annotation to the line which contains the
arithmetic if.

- Tobi


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]