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] |
Jerry DeLisle wrote:The attached patch fixes this bug by resetting the pprev_nl pointer to NULL when the rank of the previous object read was zero. pprev_nl is used to track multiple reads from the same namelist variable. Regression tested on x86-64. OK for trunk? I suggest we should back port to 4.5 and possibly earlier.
OK for 4.6 and for 4.4/4.5.
} + if (prev_nl && prev_nl->var_rank == 0) + prev_nl = NULL;
I wonder whether a comment would help to understand the code.
--- io/list_read.c (revision 170543) +++ io/list_read.c (working copy) @@ -2985,6 +2985,9 @@ { int c; char nml_err_msg[200]; + + snprintf (nml_err_msg, sizeof nml_err_msg, "Internal namelist read error");
Is there a reason that you do not use:
char nml_err_msg[200] = "Internal namelist read error";
That looks simpler too me.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |