www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 6107] New: ICE when a non-template member named '__ctor' exists in a struct, and the constructor is attempted to be invoked.

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

           Summary: ICE when a non-template member named '__ctor' exists
                    in a struct, and the constructor is attempted to be
                    invoked.
           Product: D
           Version: D2
          Platform: Other
        OS/Version: All
            Status: NEW
          Keywords: ice-on-invalid-code
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: kennytm gmail.com


--- Comment #0 from kennytm gmail.com 2011-06-05 00:52:47 PDT ---
Test case:

----------------------------------
struct Foo {
    enum __ctor = 4; // can also be a function, struct, alias, but template is
ok.
}
void main() {
    auto f = Foo("irrelevant"); // can also use 'new Foo(...)'
}
----------------------------------
Assertion failed: (td), function semantic, file expression.c, line 7040.
Abort trap
----------------------------------

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 05 2011
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6107


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla digitalmars.com
           Severity|normal                      |trivial


--- Comment #1 from Walter Bright <bugzilla digitalmars.com> 2012-01-20
22:38:15 PST ---
Names beginning with a double underscore are reserved for the compiler's use.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 20 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6107


Andrej Mitrovic <andrej.mitrovich gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andrej.mitrovich gmail.com


--- Comment #2 from Andrej Mitrovic <andrej.mitrovich gmail.com> 2013-01-10
07:14:02 PST ---
(In reply to comment #1)
 Names beginning with a double underscore are reserved for the compiler's use.

Should we implement some kind of identifier checks in the front-end? We could gather all double-underscore symbols the compiler uses and just compare them when instantiating Identifier from user-code. Unless the compiler also generates these symbols with random names, in such a case we would have to ban all double-underscores identifiers in user-code because they might potentially clash. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 10 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6107


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Platform|Other                       |All


--- Comment #3 from Walter Bright <bugzilla digitalmars.com> 2013-10-05
12:15:20 PDT ---
https://github.com/D-Programming-Language/dmd/pull/2631

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 05 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6107



--- Comment #4 from github-bugzilla puremagic.com 2013-10-08 21:27:55 PDT ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/69d30ad53f5b136e4e79d552e69650d1a3f576b7
fix Issue 6107 - ICE(expression.c) when a non-template member named '__ctor'
exists in a struct, and the constructor is attempted to be invoked.

https://github.com/D-Programming-Language/dmd/commit/003af73463b8126e30613b6c125ce87c45b294c6
Merge pull request #2631 from WalterBright/fix6107

fix Issue 6107 - ICE(expression.c) when a non-template member named '__c...

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 08 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6107


Walter Bright <bugzilla digitalmars.com> changed:

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


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