Re: [RFA gfortran] PR 25071: dummy argument larger than actual argument
Committed as revisions r253286 and r253287. Dominique > Le 29 sept. 2017 à 15:07, Dominique d'Humièresa écrit : > > Thanks for the quick review. The change logs are > > 2017-09-29 Dominique d'Humieres > > PR fortran/25071 > * interface.c (compare_actual_formal): Change warnings to errors > when "Actual argument contains too few elements for dummy > argument", unless -std=legacy is used. > > 2017-09-29 Dominique d'Humieres > > PR fortran/25071 > * gfortran.dg/argument_checking_3.f90: Change warnings to errors. > * gfortran.dg/argument_checking_4.f90: Likewise. > * gfortran.dg/argument_checking_5.f90: Likewise. > * gfortran.dg/argument_checking_6.f90: Likewise. > * gfortran.dg/argument_checking_10.f90: Likewise. > * gfortran.dg/argument_checking_13.f90: Likewise. > * gfortran.dg/argument_checking_15.f90: Likewise. > * gfortran.dg/argument_checking_18.f90: Likewise. > * gfortran.dg/gomp/udr8.f90: Likewise. > * gfortran.dg/warn_argument_mismatch_1.f90: Add -std=legacy to > the dg-options. > > Dominique >
Re: [RFA gfortran] PR 25071: dummy argument larger than actual argument
Thanks for the quick review. The change logs are 2017-09-29 Dominique d'HumieresPR fortran/25071 * interface.c (compare_actual_formal): Change warnings to errors when "Actual argument contains too few elements for dummy argument", unless -std=legacy is used. 2017-09-29 Dominique d'Humieres PR fortran/25071 * gfortran.dg/argument_checking_3.f90: Change warnings to errors. * gfortran.dg/argument_checking_4.f90: Likewise. * gfortran.dg/argument_checking_5.f90: Likewise. * gfortran.dg/argument_checking_6.f90: Likewise. * gfortran.dg/argument_checking_10.f90: Likewise. * gfortran.dg/argument_checking_13.f90: Likewise. * gfortran.dg/argument_checking_15.f90: Likewise. * gfortran.dg/argument_checking_18.f90: Likewise. * gfortran.dg/gomp/udr8.f90: Likewise. * gfortran.dg/warn_argument_mismatch_1.f90: Add -std=legacy to the dg-options. Dominique > Le 28 sept. 2017 à 14:57, Dominique d'Humières a écrit : > > Hi all, > > In the PR there was some consensus to turn the warnings into errors. > > This is what the patch does: the warnings are kept with -std=legacy, errors > are emitted otherwise. > I am sure it may exist a better solution, but I did not find it. > > While regtesting I have found several regressions on top of > gfortran.dg/warn_argument_mismatch_1.f90 > > At this point, I had two options: use -std=legacy everywhere or replace the > dg-warning with dg-error. I have chosen the later except for > warn_argument_mismatch_1.f90. > > Regtested on x86_64-apple-darwin16. > > Comments are welcome and I’ll provide the change logs once the dust has > settled. > > TIA > > Dominique >
Re: [RFA gfortran] PR 25071: dummy argument larger than actual argument
On Thu, Sep 28, 2017 at 3:57 PM, Dominique d'Humièreswrote: > Hi all, > > In the PR there was some consensus to turn the warnings into errors. > > This is what the patch does: the warnings are kept with -std=legacy, errors > are emitted otherwise. > I am sure it may exist a better solution, but I did not find it. > > While regtesting I have found several regressions on top of > gfortran.dg/warn_argument_mismatch_1.f90 > > At this point, I had two options: use -std=legacy everywhere or replace the > dg-warning with dg-error. I have chosen the later except for > warn_argument_mismatch_1.f90. > > Regtested on x86_64-apple-darwin16. > > Comments are welcome and I’ll provide the change logs once the dust has > settled. Thanks for picking this up. I do think your solution is good enough, and I also agree with how you've dealt with the testsuite changes. So from my point of view, Ok for trunk along with a ChangeLog entry. -- Janne Blomqvist