D.gnu - [Bug 253] New: Linker error when using -O
- via D.gnu (50/50) Mar 03 2017 https://bugzilla.gdcproject.org/show_bug.cgi?id=253
https://bugzilla.gdcproject.org/show_bug.cgi?id=253 Bug ID: 253 Summary: Linker error when using -O Product: GDC Version: 6.x Hardware: ARM OS: Linux Status: NEW Severity: normal Priority: Normal Component: gdc Assignee: ibuclaw gdcproject.org Reporter: gdc croco-puzzle.com Compiling the example below with "gdc example.d some_class.d" works. When compiling with "gdc -O example.d some_class.d" I get a linker error: /tmp/ccmXtlCq.o: In function `_DT24_D10some_class1B3fooMFHAyaAyaZv': example.d:(.text._DT24_D10some_class1B3fooMFHAyaAyaZv[_DT24_D10some_class1B3fooMFHAyaAyaZv]+0x17): undefined reference to `_D10some_class1B3fooMFHAyaAyaZ12__dgliteral2MFNaNbNiNfZAya' collect2: error: ld returned 1 exit status Here are the two files. I wasn't able to reduce them further, although I think it should be possible... example.d: import some_class; void main() { } interface A { abstract void foo(string[string] a); } interface C:A { } class D:B,C { } some_class.d: import std.conv; import example; class B:A { override void foo(string[string] a) { if (to!int(a.get("b","1"))!=1) return; } } -- You are receiving this mail because: You are watching all bug changes.
Mar 03 2017