Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

reallocationCharacterArray fails

67 views
Skip to first unread message

ygal...@gmail.com

unread,
Nov 15, 2021, 1:17:43 PM11/15/21
to

gah4

unread,
Nov 15, 2021, 6:23:58 PM11/15/21
to
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.



ygal...@gmail.com

unread,
Nov 16, 2021, 1:44:33 AM11/16/21
to
ב-יום שלישי, 16 בנובמבר 2021 בשעה 01:23:58 UTC+2, gah4 כתב/ה:
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...
0 new messages