From: Clune, T. L. (GSFC-6101) <tho...@na...> - 2016-08-16 12:41:01
|
Marco, OK managed to eradicate most fixed-length strings over the weekend. Unfortunately, the regression tests show that even GFortran 5.3 breaks. I’ve not looked, but I suspect the culprit is the gather of strings in which I need to allocate an array of deferred length strings. Could possibly insert fixed length strings there, but would prefer to just merge these into development branch for 4.0. Feel free to push back if you think a partial fix buys anything in 3.x. - Tom > On Aug 11, 2016, at 4:54 PM, Clune, Thomas L. (GSFC-6101) <tho...@na...> wrote: > > Marco, > > Well - learned something interesting just now. After getting unrelated runtime errors when building with 13.1, I went back to the master branch and saw the same issue. I went to my programmer that maintains the regression scripts and he discovered that the scripts were broken in that case and that 13.1 has been failing for quite some time. > > I’m therefore leaning towards dropping 13.1 support. My only hesitation is that formally if I break backward compatibility, I should increase the main version number. OTOH, since I already have failed in my responsibilities in that sense, how much worse can it be? > > Over the weekend I’ll make a sweep for fixed sized strings and attempt a commit. > > Cheers, > > - Tom > > > > > >> On Aug 10, 2016, at 10:18 AM, marco restelli <mre...@gm...> wrote: >> >> Hi Tom, >> OK, thank you! >> >> I see the problem with old compilers; however in the same subroutine >> there is also >> >> character(len=:), allocatable :: message_ >> >> so I was thinking if one is going to use allocatable character >> variables anyway why not going all the way and using it also for >> "throwMessage". >> >> Cheers, >> Marco >> >> >> 2016-08-10 15:49 GMT+0200, Clune, Thomas L. (GSFC-6101) >> <tho...@na...>: >>> Hi Marco, >>> >>> I’ll try including these changes, but I think that it will break some of the >>> older compilers that we currently support. (Really wish I could drop >>> support for ifort 13.) >>> >>> I expect that pfunit 4.0 will start out only supporting gfortran 6.x+ and >>> ifort 17.x+ which will avoid this issue. >>> >>> Cheers, >>> >>> - Tom >>> >>> >>> >>>> On Aug 5, 2016, at 5:51 AM, marco restelli <mre...@gm...> wrote: >>>> >>>> The following change allows comparing strings with unlimited length; >>>> given that allocatable character strings are already used here anyway, >>>> I think that throwMessage could also avoid using MAXLEN_MESSAGE. >>>> >>>> Marco >>>> >>>> >>>> diff --git a/source/AssertBasic.F90 b/source/AssertBasic.F90 >>>> index f8da2f8..8e297df 100644 >>>> --- a/source/AssertBasic.F90 >>>> +++ b/source/AssertBasic.F90 >>>> @@ -282,7 +282,7 @@ contains >>>> character(len=:), allocatable :: message_ >>>> type (WhitespaceOptions) :: whitespace_ >>>> >>>> - character(len=MAXLEN_MESSAGE) :: throwMessage >>>> + character(len=:), allocatable :: throwMessage >>>> integer :: i, j >>>> integer :: numI, numJ >>>> integer :: numSameCharacters >>>> @@ -352,7 +352,7 @@ contains >>>> numI = len(expected_); numJ = len(found_) >>>> >>>> case default >>>> - write(throwMessage,'(a)')& >>>> + throwMessage = & >>>> & 'assertEqualString_InternalError: ' & >>>> & // 'Unknown case for handling Whitespace' >>>> call throw(appendWithSpace(message_,throwMessage), location) >>>> @@ -515,11 +515,11 @@ contains >>>> found_ = found >>>> end select >>>> >>>> - write(throwMessage,'((a,a),2(a,a,a,a),(a,a,a))') & >>>> - & 'String assertion failed:', new_line('A'), & >>>> - & ' expected: <"', expected_, '">', new_line('A'), & >>>> - & ' but found: <"', found_, '">', new_line('A'), & >>>> - & ' first diff: ', repeat('-', numSameCharacters), >>>> '^' >>>> + throwMessage = & >>>> + & 'String assertion failed:' //new_line('A')// & >>>> + & ' expected: <"'// expected_ //'">'//new_line('A')// & >>>> + & ' but found: <"'// found_ //'">'//new_line('A')// & >>>> + & ' first diff: '// repeat('-', numSameCharacters) // >>>> '^' >>>> call throw(appendWithSpace(message_, throwMessage), location) >>>> >>>> end if >>>> lines 47-113/113 (END) >>>> >>>> ------------------------------------------------------------------------------ >>>> _______________________________________________ >>>> Pfunit-support mailing list >>>> Pfu...@li... >>>> https://lists.sourceforge.net/lists/listinfo/pfunit-support >>> >>> > |