Thread overview
[Issue 1576] New: Crash on const ref parameters
Oct 13, 2007
d-bugmail
Oct 13, 2007
d-bugmail
Oct 13, 2007
d-bugmail
Oct 13, 2007
d-bugmail
Oct 13, 2007
d-bugmail
Oct 13, 2007
d-bugmail
Oct 13, 2007
d-bugmail
Oct 13, 2007
Bill Baxter
Oct 16, 2007
John Mandeville
Oct 16, 2007
Bill Baxter
October 13, 2007
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.


-- 

October 13, 2007
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.


-- 

October 13, 2007
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);
}


-- 

October 13, 2007
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);
}


-- 

October 13, 2007
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 ***


-- 

October 13, 2007
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.


-- 

October 13, 2007
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.


-- 

October 13, 2007
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
October 16, 2007
== 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.

October 16, 2007
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