[Bug fortran/70235] [4.9/5/6 Regression] Incorrect output with PF format

2016-03-30 Thread dominiq at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70235 --- Comment #25 from dominiq at gcc dot gnu.org --- Author: dominiq Date: Wed Mar 30 20:47:45 2016 New Revision: 234600 URL: https://gcc.gnu.org/viewcvs?rev=234600=gcc=rev Log: 2016-03-30 Jerry DeLisle

[Bug fortran/70235] [4.9/5/6 Regression] Incorrect output with PF format

2016-03-29 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70235 --- Comment #24 from Jerry DeLisle --- Dominiq, I have tested as much as I can with several variations of values of the float and all looks good. I am ready to approve your patch when you are.

[Bug fortran/70235] [4.9/5/6 Regression] Incorrect output with PF format

2016-03-28 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70235 --- Comment #23 from Jerry DeLisle --- (In reply to Dominique d'Humieres from comment #22) > Created attachment 38107 [details] > New patch with test. > > With the patch we now get for y=6431.25 > > ru,-8pf18.2 y= 0.01 > > IMO

[Bug fortran/70235] [4.9/5/6 Regression] Incorrect output with PF format

2016-03-27 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70235 --- Comment #22 from Dominique d'Humieres --- Created attachment 38107 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38107=edit New patch with test. With the patch we now get for y=6431.25 ru,-8pf18.2 y= 0.01 IMO this is

[Bug fortran/70235] [4.9/5/6 Regression] Incorrect output with PF format

2016-03-26 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70235 --- Comment #21 from Dominique d'Humieres --- > Nice work! Unfortunately not finished yet!-( program fmt implicit none real*4 y character(45) :: fmtstr integer :: p,w,d y = 643.125 d=2 w=18 do p=-8,7

[Bug fortran/70235] [4.9/5/6 Regression] Incorrect output with PF format

2016-03-25 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70235 --- Comment #20 from Jerry DeLisle --- (In reply to Dominique d'Humieres from comment #19) > Created attachment 38100 [details] > Another patch with correct rounding > > > While I think the handling of nafter < 0 is correct, it is probably > >

[Bug fortran/70235] [4.9/5/6 Regression] Incorrect output with PF format

2016-03-25 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70235 --- Comment #19 from Dominique d'Humieres --- Created attachment 38100 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38100=edit Another patch with correct rounding > While I think the handling of nafter < 0 is correct, it is probably > a

[Bug fortran/70235] [4.9/5/6 Regression] Incorrect output with PF format

2016-03-25 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70235 --- Comment #18 from Dominique d'Humieres --- Created attachment 38097 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38097=edit Patch with correct rounding With the attached patch I get the expected rounding ... -6pf18.2 y=

[Bug fortran/70235] [4.9/5/6 Regression] Incorrect output with PF format

2016-03-25 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70235 --- Comment #17 from Dominique d'Humieres --- Created attachment 38092 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38092=edit Updated patch "hiding" the problem reported in 16 With the attached patch I get -8pf18.2 y=

[Bug fortran/70235] [4.9/5/6 Regression] Incorrect output with PF format

2016-03-24 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70235 --- Comment #16 from Dominique d'Humieres --- > Created attachment 38090 [details] > Updated patch correcting problem found by Dominique With this updated patch and y = 643.125 and d=2, I get -8pf18.2 y= 1.00 -7pf18.2 y=

[Bug fortran/70235] [4.9/5/6 Regression] Incorrect output with PF format

2016-03-24 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70235 --- Comment #15 from Jerry DeLisle --- Created attachment 38091 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38091=edit A more exhaustive testing program This test allows at least visual inspection of the patterns. The test omits the

[Bug fortran/70235] [4.9/5/6 Regression] Incorrect output with PF format

2016-03-24 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70235 --- Comment #14 from Jerry DeLisle --- Created attachment 38090 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38090=edit Updated patch correcting problem found by Dominique This is what I came up with independent of Dominiques patch.

[Bug fortran/70235] [4.9/5/6 Regression] Incorrect output with PF format

2016-03-24 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70235 --- Comment #13 from Dominique d'Humieres --- Created attachment 38084 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38084=edit A new patch for testing With y = 1.0 and d=8 I now get -8pf18.8 y=0.0001 -7pf18.8 y=

[Bug fortran/70235] [4.9/5/6 Regression] Incorrect output with PF format

2016-03-24 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70235 --- Comment #12 from Jerry DeLisle --- (In reply to Dominique d'Humieres from comment #11) > > Created attachment 38075 [details] > > A patch for testing > > With the patch and using the test attached to comment 5 with y = 1.0 and > d=8, I get

[Bug fortran/70235] [4.9/5/6 Regression] Incorrect output with PF format

2016-03-24 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70235 --- Comment #11 from Dominique d'Humieres --- > Created attachment 38075 [details] > A patch for testing With the patch and using the test attached to comment 5 with y = 1.0 and d=8, I get the following output -8pf18.8 y=0.000.

[Bug fortran/70235] [4.9/5/6 Regression] Incorrect output with PF format

2016-03-23 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70235 --- Comment #10 from Jerry DeLisle --- Created attachment 38075 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38075=edit A patch for testing Please test this patch as much as possible. I think I have it right, but one can never tell so

[Bug fortran/70235] [4.9/5/6 Regression] Incorrect output with PF format

2016-03-19 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70235 --- Comment #8 from Jerry DeLisle --- (In reply to Tobias Burnus from comment #7) ... snip ... > > My gut feeling is that it has something to do with having "precision" == 17 > in that function. In any case, the nafter is too large when nblanks

[Bug fortran/70235] [4.9/5/6 Regression] Incorrect output with PF format

2016-03-19 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70235 --- Comment #5 from Jerry DeLisle --- Created attachment 37990 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37990=edit A useful test program I get correct results using the attached with gcc version 4.6.4 (GCC) Broken in 4.9, 5, and 6.

[Bug fortran/70235] [4.9/5/6 Regression] Incorrect output with PF format

2016-03-19 Thread burnus at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70235 --- Comment #7 from Tobias Burnus --- (In reply to Jerry DeLisle from comment #4) > I will get started on this one. Dominique, if you spot the problem let me > know. In determine_precision, one has: int precision = f->u.real.d; // "3" as

[Bug fortran/70235] [4.9/5/6 Regression] Incorrect output with PF format

2016-03-19 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70235 --- Comment #6 from Jerry DeLisle --- *** Bug 70237 has been marked as a duplicate of this bug. ***

[Bug fortran/70235] [4.9/5/6 Regression] Incorrect output with PF format

2016-03-18 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70235 --- Comment #9 from Jerry DeLisle --- I have isolated to a block of code which is dead relative to our current testsuite. Now to work on the solution.

[Bug fortran/70235] [4.9/5/6 Regression] Incorrect output with PF format

2016-03-15 Thread jvdelisle at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70235 Jerry DeLisle changed: What|Removed |Added CC||jvdelisle at gcc dot gnu.org

[Bug fortran/70235] [4.9/5/6 Regression] Incorrect output with PF format

2016-03-15 Thread agardeux.ge at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70235 --- Comment #3 from Antoine Gardeux --- Thanks for the quick confirmation. Since this kind of format is widely used in our code base, it would be very tedious to change all the occurrences. Is there any other way to work around this issue ?

[Bug fortran/70235] [4.9/5/6 Regression] Incorrect output with PF format

2016-03-15 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70235 --- Comment #2 from Dominique d'Humieres --- > Related to pr702357. Fat fingers;-( Read pr70237.

[Bug fortran/70235] [4.9/5/6 Regression] Incorrect output with PF format

2016-03-15 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70235 Dominique d'Humieres changed: What|Removed |Added Priority|P3 |P4