[Issue 12860] New: REG 2.065: typeid(_error_) symbols leaks to backend

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Thu Jun 5 15:28:57 PDT 2014


https://issues.dlang.org/show_bug.cgi?id=12860

          Issue ID: 12860
           Summary: REG 2.065: typeid(_error_) symbols leaks to backend
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: regression
          Priority: P1
         Component: DMD
          Assignee: nobody at puremagic.com
          Reporter: ibuclaw at gdcproject.org

Reduced from the 2.065 testsuite:

---

void test83()
{
    assert(!__traits(compiles, typeid(inout(int*) ())));
}

---

This leaks a typeid(_error_) TypeInfoDeclaration to the backend, and expects it
to compile the Error symbol down to object file.


With DMD, this appears in the object file as:

.data._D10TypeInfo_ at 6__initZ    0000000000000010 _D10TypeInfo_ at 6__initZ


However, given the invalid name of the symbol, it instead causes the following
error in GDC:

 Assembler messages:
19: Error: junk at end of line, first unrecognised character is `@'
22: Error: junk at end of line, first unrecognised character is `_'
23: Error: expected comma after name `_D10TypeInfo_' in .size directive
24: Error: invalid character '@' in mnemonic


This is preventing GDC from updating to 2.065 frontend sources.


It's hard to track down which commit caused this, however looking at the
specific test, it shows areas around these PRs:

https://github.com/D-Programming-Language/dmd/pull/3081/files
https://github.com/D-Programming-Language/dmd/pull/3034/files

--


More information about the Digitalmars-d-bugs mailing list