gm2
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: String constant in a module


From: Gaius Mulley
Subject: Re: String constant in a module
Date: Mon, 19 Feb 2024 14:12:42 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)

Philip Munts <phil@munts.net> writes:

> I think this is a severe bug, seen in both Debian GCC 12 and Crosstool-NG GCC 
> 13:
>
> DEFINITION MODULE Foo;
>
>   CONST Bar = "Blech";
>
> END Foo.
>
> IMPLEMENTATION MODULE Foo;
> END Foo.
>
> MODULE test_foo;
>
>   IMPORT Foo;
>
>   FROM STextIO IMPORT WriteString, WriteLn;
>   FROM Foo     IMPORT Bar;
>
> BEGIN
>   WriteString("Bar => ");
>   WriteString(Foo.Bar);
>   WriteLn;
>
>   WriteString("Bar => ");
>   WriteString(Bar);
>   WriteLn;
> END test_foo.
>
> At test program run time, Bar becomes an empty string, with the following 
> result:
>
> Bar =>
> Bar =>

Hi Philip,

many thanks for the bug report - all very useful.  This is now fixed on
the gcc git master branch.  I'd like to back port it to gcc-13 - but
will wait a couple of weeks to allow wider testing,

regards,
Gaius





reply via email to

[Prev in Thread] Current Thread [Next in Thread]