[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
String constant in a module
From: |
Philip Munts |
Subject: |
String constant in a module |
Date: |
Sat, 10 Feb 2024 11:41:50 -0800 |
User-agent: |
Mozilla Thunderbird |
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 =>
- String constant in a module,
Philip Munts <=