www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 1576] New: Crash on const ref parameters

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

           Summary: Crash on const ref parameters
           Product: D
           Version: 2.005
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: jemandy earthlink.net


A formal function parameter specified as const ref (or as ref const) causes DMD
2.005 to crash with a "tell Microsoft about the problem" dialog box.


-- 
Oct 13 2007
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1576





------- Comment #1 from braddr puremagic.com  2007-10-13 13:08 -------
Please add a reproducable testcase.


-- 
Oct 13 2007
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1576


spam extrawurst.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |spam extrawurst.org




------- Comment #2 from spam extrawurst.org  2007-10-13 13:33 -------
i came across this one a few times too!

testcase:


struct Foo {
        void bar(ref const int _a) {
        }
}

void main()
{
        Foo a;

        int b=0;

        a.bar(b);
}


-- 
Oct 13 2007
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1576





------- Comment #3 from spam extrawurst.org  2007-10-13 13:34 -------
oh sorry there is even a smaller one:


void bar(ref const int _a) {
}

void main()
{
        int b=0;

        bar(b);
}


-- 
Oct 13 2007
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1576


wbaxter gmail.com changed:

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




------- Comment #4 from wbaxter gmail.com  2007-10-13 15:00 -------


*** This bug has been marked as a duplicate of 1319 ***


-- 
Oct 13 2007
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1576





------- Comment #5 from wbaxter gmail.com  2007-10-13 15:06 -------
Please at least *try* to do a search for a pre-existing bug before you report a
new one.


-- 
Oct 13 2007
prev sibling parent reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=1576





------- Comment #6 from jemandy earthlink.net  2007-10-13 15:29 -------
(In reply to comment #5)
 Please at least *try* to do a search for a pre-existing bug before you report a
 new one.
 
Sorry. I actually did try. My search for "const ref" turned up 200 items of which 199 were irrelevant. The other one, I'm afaid, I missed. My apologies. --
Oct 13 2007
parent reply Bill Baxter <dnewsgroup billbaxter.com> writes:
d-bugmail puremagic.com wrote:
 http://d.puremagic.com/issues/show_bug.cgi?id=1576
 
 
 
 
 
 ------- Comment #6 from jemandy earthlink.net  2007-10-13 15:29 -------
 (In reply to comment #5)
 Please at least *try* to do a search for a pre-existing bug before you report a
 new one.
Sorry. I actually did try. My search for "const ref" turned up 200 items of which 199 were irrelevant. The other one, I'm afaid, I missed. My apologies.
Huh. Weird. When I did the search I got 3 hits. Where did you enter the search terms? I just put them in here: http://d.puremagic.com/issues/ Maybe you did a search including all closed and resolved items? --bb
Oct 13 2007
parent reply John Mandeville <jemandy earthlink.net> writes:
== Quote from Bill Baxter (dnewsgroup billbaxter.com)'s article
 Huh.  Weird.  When I did the search I got 3 hits.  Where did you enter
 the search terms?  I just put them in here:
 http://d.puremagic.com/issues/
 Maybe you did a search including all closed and resolved items?
 --bb
Argh, yes, I searched for all items from http://d.puremagic.com/issues/query.cgi. Now I feel *really* silly. I guess there is no need to include closed issues. Again, I apologize.
Oct 15 2007
parent Bill Baxter <dnewsgroup billbaxter.com> writes:
John Mandeville wrote:
 == Quote from Bill Baxter (dnewsgroup billbaxter.com)'s article
 Huh.  Weird.  When I did the search I got 3 hits.  Where did you enter
 the search terms?  I just put them in here:
 http://d.puremagic.com/issues/
 Maybe you did a search including all closed and resolved items?
 --bb
Argh, yes, I searched for all items from http://d.puremagic.com/issues/query.cgi. Now I feel *really* silly. I guess there is no need to include closed issues. Again, I apologize.
No prob. Sorry I accused you of not searching the DB, when you were just a victim bad UI. Looks like you must have also used "any of the search terms" rather than "all of the search terms" (which is the default of the simpler search entry on the main page.) --bb
Oct 15 2007