This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch, fortran] PR 40638 "Unit number in I/O statement too large"
- From: Tobias Burnus <burnus at net-b dot de>
- To: Jerry DeLisle <jvdelisle at verizon dot net>
- Cc: Fortran List <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 04 Jul 2009 08:51:50 +0200
- Subject: Re: [patch, fortran] PR 40638 "Unit number in I/O statement too large"
- References: <4A4E983F.2040108@verizon.net>
Jerry DeLisle wrote:
> I plan to commit the following as obvious to 4.4 and 4.3.
> This is a regression respective to g77 and is a rejects valid bug. I
> will turn the test case in the PR into a dg-run for the test suite.
> Will commit after full regression testing.
I was wondering whether one should add a test case to, e.g., GCC 4.5.
Otherwise the patch looks OK.
Tobias
> 2009-07-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
>
> PR fortran/40638
> * trans-io.c (set_parameter_value): Don't build un-necessary run-time
> checks for units of KIND less than 4.
>
> Index: trans-io.c
> ===================================================================
> --- trans-io.c (revision 149123)
> +++ trans-io.c (working copy)
> @@ -471,7 +471,7 @@ set_parameter_value (stmtblock_t *block,
> gfc_conv_expr_val (&se, e);
>
> /* If we're storing a UNIT number, we need to check it first. */
> - if (type == IOPARM_common_unit && e->ts.kind != 4)
> + if (type == IOPARM_common_unit && e->ts.kind > 4)
> {
> tree cond, max;
> int i;
>
>