Jump to page: 1 2
Thread overview
[Issue 7199] New: std.string.indexof cannot be compiled with -inline
Jan 02, 2012
Rainer Schuetze
Jan 20, 2012
Jesse Phillips
Jan 20, 2012
Trass3r
Jan 24, 2012
Don
Jan 24, 2012
Don
Jan 27, 2012
Richard Webb
Jan 27, 2012
Trass3r
Feb 05, 2012
Walter Bright
Feb 05, 2012
Walter Bright
Feb 05, 2012
Walter Bright
Feb 05, 2012
Walter Bright
January 02, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7199

           Summary: std.string.indexof cannot be compiled with -inline
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Keywords: rejects-valid
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: r.sagitario@gmx.de


--- Comment #0 from Rainer Schuetze <r.sagitario@gmx.de> 2012-01-02 07:30:11 PST ---
With the latest version from github, this code fails to compile with "-inline":

module test;

import std.string;

int main()
{
    string s = "abcd";
    int index = indexOf(s, "b");
    return index;
}

m:\s\d\rainers\phobos\std\algorithm.d(2970): Error: function
std.string.indexOf!
(char,char).indexOf.simpleMindedFind!(__lambda6,const(char)[],const(char)[]).sim
pleMindedFind is a nested function and cannot be accessed from main

This works with dmd 2.057 or without -inline.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 20, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7199


Jesse Phillips <Jesse.K.Phillips+D@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |Jesse.K.Phillips+D@gmail.co
                   |                            |m
   Target Milestone|---                         |2.059


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 20, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7199


Trass3r <mrmocool@gmx.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mrmocool@gmx.de
           Platform|Other                       |All
         OS/Version|Windows                     |All


--- Comment #1 from Trass3r <mrmocool@gmx.de> 2012-01-20 04:59:43 PST ---
I posted a reduced version to http://d.puremagic.com/issues/show_bug.cgi?id=4841#c2 cause I thought they were the same.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 24, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7199


Don <clugdbug@yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dsimcha@yahoo.com


--- Comment #2 from Don <clugdbug@yahoo.com.au> 2012-01-24 12:34:40 PST ---
*** Issue 7339 has been marked as a duplicate of this issue. ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 24, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7199


Don <clugdbug@yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |clugdbug@yahoo.com.au
          Component|DMD                         |Phobos


--- Comment #3 from Don <clugdbug@yahoo.com.au> 2012-01-24 12:38:12 PST ---
I've changed this to a Phobos bug, since it's a regression caused by a change in Phobos. The root cause DMD bug 4841 is not a regression.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 27, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7199


Richard Webb <webby@beardmouse.org.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |webby@beardmouse.org.uk


--- Comment #4 from Richard Webb <webby@beardmouse.org.uk> 2012-01-27 15:19:56 PST ---
If i try to build Juno with the latest DMD/Phobos as of now, i get

Error: function juno.locale.core.Culture.displayName cannot get frame pointer to simpleMindedFind

(Where displayName calls std.string.indexOf).
It builds ok without -inline.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 27, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7199



--- Comment #5 from Trass3r <mrmocool@gmx.de> 2012-01-28 00:55:48 CET ---
Richard, yes, see my comment 1 for the reduced version.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 05, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7199


Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla@digitalmars.com


--- Comment #6 from Walter Bright <bugzilla@digitalmars.com> 2012-02-05 12:36:22 PST ---
This is not a duplicate of bug 4841.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 05, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7199



--- Comment #7 from Walter Bright <bugzilla@digitalmars.com> 2012-02-05 12:38:07 PST ---
Trass3r's example fails:

R1 find(alias pred = "a == b", R1, R2)(R1 haystack, R2 needle)
{
        return simpleMindedFind!pred(haystack, needle);
}
R1 simpleMindedFind(alias pred, R1, R2)(R1 haystack, R2 needle)
{
    bool haystackTooShort()
    {
            return true;
    }

    return haystack;
}

sizediff_t indexOf(Char1, Char2)(const(Char1)[] s, const(Char2)sub)
{
    const(Char1)[] balance = find!({})(s, sub);
    return -1;
}

string extStr;
void main()
{
    extStr.indexOf("bla");
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 05, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7199



--- Comment #8 from Walter Bright <bugzilla@digitalmars.com> 2012-02-05 12:48:05 PST ---
A simplified example:

void find(alias pred)()
{
    bool hay()
    {
        return true;
    }
}

void index()
{
    find!({})();
}

void main()
{
    index();
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
« First   ‹ Prev
1 2