• reallocationCharacterArray fails

    From ygalklein@gmail.com@21:1/5 to All on Mon Nov 15 10:17:42 2021
    any idea regarding this

    https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103115

    ?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From gah4@21:1/5 to ygal...@gmail.com on Mon Nov 15 15:23:56 2021
    On Monday, November 15, 2021 at 10:17:43 AM UTC-8, ygal...@gmail.com wrote:
    any idea regarding this

    https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103115

    Seems to me slightly complicated, especially related to the character
    variable lengths. What does it do with CHARACTER(1) instead?

    As well as I know, the array constructors get the length from the first element, which in this case is a variable. I think you can put a CHARACTER(1):: at the beginning of the array constructor to tell
    it the length. In some cases, that is required. You might also
    try it with other lengths.

    Note that a character array has all strings of the same length.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From ygalklein@gmail.com@21:1/5 to All on Mon Nov 15 22:44:31 2021
    ב-יום שלישי, 16 בנובמבר 2021 בשעה 01:23:58 UTC+2, gah4 כתב/ה:
    On Monday, November 15, 2021 at 10:17:43 AM UTC-8, ygal...@gmail.com wrote:
    any idea regarding this

    https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103115
    Seems to me slightly complicated, especially related to the character variable lengths. What does it do with CHARACTER(1) instead?

    As well as I know, the array constructors get the length from the first element, which in this case is a variable. I think you can put a CHARACTER(1):: at the beginning of the array constructor to tell
    it the length. In some cases, that is required. You might also
    try it with other lengths.

    Note that a character array has all strings of the same length.
    Thanks for the reply.

    Writing explicitly character(len=1) - makes the program work also with gfortran.

    but (!) give attention to the fact that when the appended array was size 3 - the program succeeded.
    So given that - I do not see how the `len=:` makes it a problem - since appending 3 works.
    The problem arises only whn appending 4 and above.

    Anyway - this has been confirmed to be an internal compiler error, since then...

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)