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] Fix PRs 14771, 20894, 25048 : keep track of parentheses


Tobi,

Built and tested on i686-pc-linux GNU, I'm seeing a regression with
unf_io_convert_4.f90 with and without the patch, but other than that the
testsuite run is clean. ChangeLog below, patch and new testcases attached. Ok
for the trunk and 4.1?


Many thanks for this one - I was contemplating how to do it just a few days ago and not really getting inspired!

I have regtested on FC3/Athlon and do not see any regressions, with this morning's tree.

OK for both trunk and 4.1.

It seems to me that you might widen the net a bit on parens_3.f90, to include the value of a pointer, as a counterpart to parens_1.f90, and an array. I have attached a version of this test that adds both.

Cheers

Paul
! PR 14771
! { dg-do run }
! Originally contributed by Walt Brainerd, modified for the testsuite
      PROGRAM fc107

! Submitted by Walt Brainerd, The Fortran Company
! GNU Fortran 95 (GCC 4.1.0 20050322 (experimental))
! Windows XP

! Return value should be 3

      INTEGER I, J, M(2), N(2)
      integer, pointer :: k
      integer, target :: l
      INTEGER TRYME

      interface
        FUNCTION TRYyou(RTNME,HITME)
          INTEGER RTNME(2),HITME(2), tryyou(2)
        END function tryyou
      end interface

      m = 7
      l = 5
      I = 3
      k => l

      j = tryme((i),i)
      if (j .ne. 3) call abort ()

      j = tryme((k),k)
      if (j .ne. 5) call abort ()

      n = tryyou((m),m)
      if (any(n .ne. 7)) call abort ()
      END

      INTEGER FUNCTION TRYME(RTNME,HITME)
      INTEGER RTNME,HITME
      HITME = 999
      TRYME = RTNME
      END

      FUNCTION TRYyou(RTNME,HITME)
      INTEGER RTNME(2),HITME(2), tryyou(2)
      HITME = 999
      TRYyou = RTNME
      END

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