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: [patch, fortran] PR 40638 "Unit number in I/O statement too large"


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;
>
>


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