www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 8907] New: Selective import of a symbol after its first usage causes errors (including ICE)

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8907

           Summary: Selective import of a symbol after its first usage
                    causes errors (including ICE)
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: ice-on-valid-code, rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: verylonglogin.reg gmail.com



16:14:56 MSK ---
---
import core.stdc.config;

void f(c_ulong) { }

import core.stdc.config: c_ulong;

void main()
{
    f(3); // line 9
}
---

Compiler output:
---
main.d(9): Error: function main.f (c_ulong _param_0) is not callable using
argument types (int)
main.d(9): Error: forward reference to type c_ulong
main.d(9): Error: cannot implicitly convert expression (3) of type int to
c_ulong
---



---
import core.stdc.config;

c_ulong a;

import core.stdc.config: c_ulong;

void main()
{
    a = 3;
}
---

Compiler output:
---
Assertion failure: 'fd && fd->inferRetType' on line 81 in file 'mangle.c'
---

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 29 2012
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8907


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE



The root cause is same as bug 9514, and test cases work with 2.053a.

*** This issue has been marked as a duplicate of issue 9514 ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Apr 06 2013