diff mbox

[libfortran,4.9/4.10,Regression] PR61049 NIST test FM906 fails

Message ID 5366E618.9060408@charter.net
State New
Headers show

Commit Message

Jerry DeLisle May 5, 2014, 1:15 a.m. UTC
Hi all,

The attached patch fixes this regression and retains the desired behavior for
PR46800. We don't have a test case for PR46800 since it involves user input at a
terminal. (It would be good to get such a test case of course)

This patch has been regression tested with 4.9 and 4.10 on x86-64 linux.

OK for trunk and then 4.9?  Test case from PR.

Regards,

Jerry

2014-05-04  Jerry DeLisle  <jvdelisle@gcc.gnu>

	PR libfortran/61049
	* io/list_read.c (list_formatted_read_scalar): Use eat_separator
	and delete extraneous code.

Comments

Janne Blomqvist May 5, 2014, 6:04 a.m. UTC | #1
On Mon, May 5, 2014 at 4:15 AM, Jerry DeLisle <jvdelisle@charter.net> wrote:
> Hi all,
>
> The attached patch fixes this regression and retains the desired behavior for
> PR46800. We don't have a test case for PR46800 since it involves user input at a
> terminal. (It would be good to get such a test case of course)
>
> This patch has been regression tested with 4.9 and 4.10 on x86-64 linux.
>
> OK for trunk and then 4.9?  Test case from PR.

Ok, thanks for the patch.

>
> Regards,
>
> Jerry
>
> 2014-05-04  Jerry DeLisle  <jvdelisle@gcc.gnu>
>
>         PR libfortran/61049
>         * io/list_read.c (list_formatted_read_scalar): Use eat_separator
>         and delete extraneous code.
>
diff mbox

Patch

Index: list_read.c
===================================================================
--- list_read.c	(revision 210049)
+++ list_read.c	(working copy)
@@ -2054,21 +2078,10 @@  list_formatted_read_scalar (st_parameter_dt *dtp,
 	}
       if (is_separator (c))
 	{
-	  /* Found a null value. Do not use eat_separator here otherwise
-	     we will do an extra read from stdin.  */
+	  /* Found a null value.  */
 	  dtp->u.p.repeat_count = 0;
+	  eat_separator (dtp);
 
-	  /* Set comma_flag.  */
-	  if ((c == ';' 
-	      && dtp->u.p.current_unit->decimal_status == DECIMAL_COMMA)
-	      ||
-	      (c == ','
-	      && dtp->u.p.current_unit->decimal_status == DECIMAL_POINT))
-	    {
-	      dtp->u.p.comma_flag = 1;
-	      goto cleanup;
-	    }
-
 	  /* Set end-of-line flag.  */
 	  if (c == '\n' || c == '\r')
 	    {
@@ -2082,7 +2095,6 @@  list_formatted_read_scalar (st_parameter_dt *dtp,
 	  else
 	    goto cleanup;
 	}
-
     }
   else
     {