This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: gfortran, patch for PR 20777
- From: Tobias Schlüter <tobias dot schlueter at physik dot uni-muenchen dot de>
- To: coudert at lcp dot u-psud dot fr
- Cc: fortran at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Sun, 10 Apr 2005 16:49:37 +0200
- Subject: Re: gfortran, patch for PR 20777
- References: <1113130700.425906cc1d177@webmail.lcp.u-psud.fr>
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