[patch, libgfortran] PR34782 tab format failure to display properly (regression vs. g77)

Jerry DeLisle jvdelisle@verizon.net
Fri Jan 18 23:31:00 GMT 2008


Hi,

I plan to commit this patch as obvious.

Regression tested on X86-64, NIST tested.

Several of the NIST tests require visual inspection of test results.  To 
automate this, I created a set of baseline output reference files a couple of 
years ago after inspecting.  Some of the test results have two possible correct 
answers according to the comments in the NIST test cases.

My test script diffs against this baseline reference.  After this patch, FM903.f 
was flagged as not matching.  I inspected this, and the mismatch is that we now 
print a different "correct answer" to inspect against and it is one of these two 
possible choices.  We still have it right.  I have adjusted my baseline 
reference output file.

Regards,

Jerry

2008-01-18  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	* io/transfer.c (formatted_transfer_scalar): Set max_pos to the greater
	of the current max_pos or the newly calculated position.


Index: io/transfer.c
===================================================================
--- io/transfer.c       (revision 131639)
+++ io/transfer.c       (working copy)
@@ -948,9 +948,12 @@ formatted_transfer_scalar (st_parameter_
         {
           if (dtp->u.p.skips > 0)
             {
+             int tmp;
               write_x (dtp, dtp->u.p.skips, dtp->u.p.pending_spaces);
-             dtp->u.p.max_pos = (int)(dtp->u.p.current_unit->recl
-                                      - dtp->u.p.current_unit->bytes_left);
+             tmp = (int)(dtp->u.p.current_unit->recl
+                         - dtp->u.p.current_unit->bytes_left);
+             dtp->u.p.max_pos =
+               dtp->u.p.max_pos > tmp ? dtp->u.p.max_pos : tmp;
             }
           if (dtp->u.p.skips < 0)
             {



More information about the Gcc-patches mailing list