This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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: [fortran patch] Don't use TREE_LISTs for storing arguments to intrinsic functions


On 7/15/07, FX Coudert <fxcoudert@gmail.com> wrote:
Sorry it took so much time for me to take time and read through your
new patch, but here I am... The patch is OK, with the following
modifications:

No problem, I appreciate the patch is quite large and obviously takes more time to review so thanks for all your feedback.

   * your testcases need to have a "! { dg-do run }" (without quotes)
line; every Fortran source file in gcc/testsuite/gfortran.dg should
have at least a dg-do directive (compile, link, run, ...)

I thought this was the default for new testcases but I've added in the necessary dg-do directives and re-tested.

   * once again, you have a problem with gfc_conv_intrinsic_minmax:
>    mvar = gfc_create_var (type, "M");
>    elsecase = build2_v (MODIFY_EXPR, mvar, limit);
> -  for (arg = TREE_CHAIN (arg), i = 0, argexpr = argexpr->next;
> -       arg != NULL_TREE; arg = TREE_CHAIN (arg), i++)
> +  for (i = 0; i < nargs; i++)
>      {
>        tree cond;
The new loop should be changed into "for (i = 1; i < nargs; i++)";
for MIN or MAX, we generate a series of comparisons; the first
comparison is to compare arg[1] with arg[0], not arg[0] with itself.

Oops! That's been fixed and re-tested. There was one other minor change that needed to be made apart from initialising "i" to 1 and that was to set "argse" equal to "argse->next" as well. I felt this qualified as obvious so have go ahead and committed the patch with that change as well (after a successful bootstrap/reg-test of course).

Other than that, I've not spotted any error. Of course, these long
mechanical patches tend to be hard to write and review, and thus
prone to errors; please keep in touch with the fortran mailing-list
in the next week so that you can quickly spot any suspicious issue.

I'll be keeping an eye on Bugzilla for the next week or so to try and pick up any reported problems straight away and get them fixed.

For reference, I've attached the final patch that has been applied.
Thanks again for your help in getting this patch ready for committing.

Cheers,
Lee.

Attachment: final_patch.txt
Description: Text document


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