public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libfortran/59764] Read logicals, line buffer, item_count, and error message consistancy
[not found] <bug-59764-4@http.gcc.gnu.org/bugzilla/>
@ 2014-01-10 19:20 ` jvdelisle at gcc dot gnu.org
2014-01-10 22:26 ` dominiq at lps dot ens.fr
` (4 subsequent siblings)
5 siblings, 0 replies; 6+ messages in thread
From: jvdelisle at gcc dot gnu.org @ 2014-01-10 19:20 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59764
Jerry DeLisle <jvdelisle at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |jvdelisle at gcc dot gnu.org
--- Comment #1 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
I will take this one.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libfortran/59764] Read logicals, line buffer, item_count, and error message consistancy
[not found] <bug-59764-4@http.gcc.gnu.org/bugzilla/>
2014-01-10 19:20 ` [Bug libfortran/59764] Read logicals, line buffer, item_count, and error message consistancy jvdelisle at gcc dot gnu.org
@ 2014-01-10 22:26 ` dominiq at lps dot ens.fr
2014-01-10 22:31 ` jvdelisle at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 6+ messages in thread
From: dominiq at lps dot ens.fr @ 2014-01-10 22:26 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59764
Dominique d'Humieres <dominiq at lps dot ens.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |diagnostic
Status|UNCONFIRMED |NEW
Last reconfirmed| |2014-01-10
Ever confirmed|0 |1
Known to fail| |4.7.3, 4.8.2, 4.9.0
--- Comment #2 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Confirmed. The test in pr59700 comment 6 when compiled with gfortran 4.3.1
returns
Bad logical value while reading item 0
(replacing the 'call abort' with 'print *, msg').
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libfortran/59764] Read logicals, line buffer, item_count, and error message consistancy
[not found] <bug-59764-4@http.gcc.gnu.org/bugzilla/>
2014-01-10 19:20 ` [Bug libfortran/59764] Read logicals, line buffer, item_count, and error message consistancy jvdelisle at gcc dot gnu.org
2014-01-10 22:26 ` dominiq at lps dot ens.fr
@ 2014-01-10 22:31 ` jvdelisle at gcc dot gnu.org
2014-01-11 18:57 ` jvdelisle at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 6+ messages in thread
From: jvdelisle at gcc dot gnu.org @ 2014-01-10 22:31 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59764
--- Comment #3 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
I have a patch successfully regression tested.
Basically, I have change in io.h as follows. The component expanded_read is
just a flag and does not need to an integer, so I have used an available bit
above it for this and and then used the integer slot for line_buffer_pos.
This integer is then used in those places where needed for the look-ahead
buffer. I will submit a patch for approval as soon as I get coordinated with
Steves patch for pr59700.
Index: io.h
===================================================================
--- io.h (revision 206351)
+++ io.h (working copy)
@@ -430,7 +430,10 @@
unsigned g0_no_blanks : 1;
/* Used to signal use of free_format_data. */
unsigned format_not_saved : 1;
- /* 14 unused bits. */
+ /* A flag used to identify when a non-standard expanded namelist read
+ has occurred. */
+ unsigned expanded_read : 1;
+ /* 13 unused bits. */
/* Used for ungetc() style functionality. Possible values
are an unsigned char, EOF, or EOF - 1 used to mark the
@@ -447,9 +450,8 @@
char *line_buffer;
struct format_data *fmt;
namelist_info *ionml;
- /* A flag used to identify when a non-standard expanded namelist read
- has occurred. */
- int expanded_read;
+ /* Current position within the look-ahead line buffer. */
+ int line_buffer_pos;
/* Storage area for values except for strings. Must be
large enough to hold a complex value (two reals) of the
largest kind. */
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libfortran/59764] Read logicals, line buffer, item_count, and error message consistancy
[not found] <bug-59764-4@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2014-01-10 22:31 ` jvdelisle at gcc dot gnu.org
@ 2014-01-11 18:57 ` jvdelisle at gcc dot gnu.org
2014-02-21 23:57 ` jvdelisle at gcc dot gnu.org
2014-02-22 2:12 ` jvdelisle at gcc dot gnu.org
5 siblings, 0 replies; 6+ messages in thread
From: jvdelisle at gcc dot gnu.org @ 2014-01-11 18:57 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59764
--- Comment #4 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
Author: jvdelisle
Date: Sat Jan 11 18:57:20 2014
New Revision: 206553
URL: http://gcc.gnu.org/viewcvs?rev=206553&root=gcc&view=rev
Log:
2014-01-11 Jerry DeLisle <jvdelisle@gcc.gnu>
Dominique d'Humieres <dominiq@lps.ens.fr>
Steven G. Kargl <kargl@gcc.gnu.org>
PR libfortran/59700
PR libfortran/59764
* io/io.h (struct st_parameter_dt): Assign expanded_read flag to
unused bit. Define new variable line_buffer_pos.
* io/list_read.c (free_saved, next_char, l_push_char,
read_logical, read_real): Replace use of item_count with
line_buffer_pos for line_buffer look ahead.
(read_logical, read_integer, parse_real, read_real, check_type):
Adjust location of free_line to after generating error messages
to retain the correct item count for the message.
Modified:
trunk/libgfortran/ChangeLog
trunk/libgfortran/io/io.h
trunk/libgfortran/io/list_read.c
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libfortran/59764] Read logicals, line buffer, item_count, and error message consistancy
[not found] <bug-59764-4@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2014-01-11 18:57 ` jvdelisle at gcc dot gnu.org
@ 2014-02-21 23:57 ` jvdelisle at gcc dot gnu.org
2014-02-22 2:12 ` jvdelisle at gcc dot gnu.org
5 siblings, 0 replies; 6+ messages in thread
From: jvdelisle at gcc dot gnu.org @ 2014-02-21 23:57 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59764
Jerry DeLisle <jvdelisle at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #5 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
Fixed on trunk. Closing
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug libfortran/59764] Read logicals, line buffer, item_count, and error message consistancy
[not found] <bug-59764-4@http.gcc.gnu.org/bugzilla/>
` (4 preceding siblings ...)
2014-02-21 23:57 ` jvdelisle at gcc dot gnu.org
@ 2014-02-22 2:12 ` jvdelisle at gcc dot gnu.org
5 siblings, 0 replies; 6+ messages in thread
From: jvdelisle at gcc dot gnu.org @ 2014-02-22 2:12 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59764
--- Comment #6 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
Author: jvdelisle
Date: Sat Feb 22 02:11:44 2014
New Revision: 208038
URL: http://gcc.gnu.org/viewcvs?rev=208038&root=gcc&view=rev
Log:
2014-02-21 Jerry DeLisle <jvdelisle@gcc.gnu>
Dominique d'Humieres <dominiq@lps.ens.fr>
Steven G. Kargl <kargl@gcc.gnu.org>
Backport from mainline
PR libfortran/59700
PR libfortran/59764
* io/io.h (struct st_parameter_dt): Assign expanded_read flag to
unused bit. Define new variable line_buffer_pos.
* io/list_read.c (free_saved, next_char, l_push_char,
read_logical, read_real): Replace use of item_count with
line_buffer_pos for line_buffer look ahead.
(read_logical, read_integer, parse_real, read_real, check_type):
Adjust location of free_line to after generating error messages
to retain the correct item count for the message.
Modified:
branches/gcc-4_8-branch/libgfortran/ChangeLog
branches/gcc-4_8-branch/libgfortran/io/io.h
branches/gcc-4_8-branch/libgfortran/io/list_read.c
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-02-22 2:12 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-59764-4@http.gcc.gnu.org/bugzilla/>
2014-01-10 19:20 ` [Bug libfortran/59764] Read logicals, line buffer, item_count, and error message consistancy jvdelisle at gcc dot gnu.org
2014-01-10 22:26 ` dominiq at lps dot ens.fr
2014-01-10 22:31 ` jvdelisle at gcc dot gnu.org
2014-01-11 18:57 ` jvdelisle at gcc dot gnu.org
2014-02-21 23:57 ` jvdelisle at gcc dot gnu.org
2014-02-22 2:12 ` jvdelisle at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).