This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[fortran patch] Fix PR32823
- From: "Lee Millward" <lee dot millward at gmail dot com>
- To: "gcc-patches List" <gcc-patches at gcc dot gnu dot org>
- Cc: "fortran at gcc dot gnu dot org List" <fortran at gcc dot gnu dot org>
- Date: Fri, 20 Jul 2007 19:59:48 +0100
- Subject: [fortran patch] Fix PR32823
Hi,
This bug is fallout of my recent intrinsic handling changes but is
fortunatelty an easy one to fix. The problem here is the old code was
evaluating all arguments to the "int" intrinsic regardless of whether
they was actually used them or not. With the change to switch over to
stack allocated arrays, gfc_conv_intrinsic_function_args only process
the number of arguments we tell it to, which is typically the number
of arguments we're interested in rather than processing the whole lot
by default and picking out those we need. The fix I've attached below
restores the original behaviour by evaluating all arguments passed to
the intrinsic.
Bootstrapped and regression tested successfully on i686-pc-linux-gnu
with no new failures, ok for mainline?
Cheers,
Lee.
:ADDPATCH fortran:
fortran/
PR fortran/32823
* trans-intrinsic.c (gfc_conv_intrinsic_int): Evaluate all
arguments passed, not just the first one. Adjust code to refer
to "args[0]" instead of "arg" as a result.
testsuite/
PR fortran/32823
* gfortran.dg/int_2.f90: New test.