www.digitalmars.com         C & C++   DMDScript  

D.gnu - [Bug 253] New: Linker error when using -O


            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':
undefined reference to
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...


import some_class;

void main()

interface A
    abstract void foo(string[string] a);

interface C:A

class D:B,C


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