D.gnu - [Bug 158] New: immutable vector incorrectly initialized from static
- via D.gnu (34/34) Sep 06 2014 Date: Sun, 7 Sep 2014 00:57:23 +0100
Date: Sun, 7 Sep 2014 00:57:23 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" http://bugzilla.gdcproject.org/show_bug.cgi?id=158 Bug ID: 158 Summary: immutable vector incorrectly initialized from static constructor Product: GDC Version: 4.9.x Hardware: x86_64 OS: Linux Status: NEW Severity: normal Priority: Normal Component: gdc Assignee: ibuclaw gdcproject.org Reporter: vicencb gmail.com This code: import std.stdio; immutable int[] int_vector; static this() { int_vector = [4]; } void main() { writeln(int_vector); } Compiled with gdc and executed: gdc test.d && ./a.out Prints: [1] Compiled with dmd and executed: dmd test.d && ./gdc_bug Prints: [4] Tested with branch gdc-4.9 commit e748df611430b497e6147309fbec4aad11e4ae26 -- You are receiving this mail because: You are watching all bug changes.
Sep 06 2014