September 13, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2962


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |alvcastro@yahoo.es


--- Comment #19 from Don <clugdbug@yahoo.com.au> 2009-09-13 03:39:51 PDT ---
*** Issue 3283 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: -------
September 21, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2962


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|accepts-invalid,            |ice-on-valid-code
                   |ice-on-invalid-code         |


--- Comment #20 from Don <clugdbug@yahoo.com.au> 2009-09-21 12:14:39 PDT ---
Here's a reduced test case for the ice-on-valid case. dmd moduleC.d moduleA.d
The instantiation of funcD inside funcC is failing, if funcC is only
instantiated from another module. Some kind of instantiation order problem
(semantic not run, perhaps). This is definitely valid code.
Quite probably related to the other template alias ICE and bad codegen
bugs.(eg, bug 3293, bug 2325, bug 2845, ...)

moduleA.d
==========
import moduleC;

void main() {
    funcC!(bool)(1.0);
}
=====
moduleC.d
=======
void funcD(alias x)() {
   assert(x==1.0);
}

void funcC(T)(double a){
    // Case 1: ICE(glue.c)
    funcD!(a)();

    // Case 2: wrong code
    double b = 1.0; funcD!(b)();
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
October 13, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2962



--- Comment #21 from Don <clugdbug@yahoo.com.au> 2009-10-13 02:54:53 PDT ---
This is really tough, it's an order-of-evaluation issue.
When generating the code for a template, which has a local variable as an alias
parameter, the alias parameter MUST be created before the code for template is.

But I have no idea how the order of code generation is supposed to be enforced. It seems to always get it right if everything is in the same file.

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


Leandro Lucarella <llucax@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |llucax@gmail.com


--- Comment #22 from Leandro Lucarella <llucax@gmail.com> 2009-11-05 06:26:17 PST ---
Related SVN commit: http://www.dsource.org/projects/dmd/changeset/240

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
December 01, 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2962


David Simcha <dsimcha@yahoo.com> changed:

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


--- Comment #23 from David Simcha <dsimcha@yahoo.com> 2009-12-01 11:07:54 PST ---
I can confirm that this bug is dependent on the order of code generation.  I just ran into this on a project I'm working on and it seems that whether this bug is exposed or not depends on the order in which I pass the files to DMD. Some permutations result in my project compiling and linking w/o errors. Others result in this bug being exposed.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
April 10, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=2962


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|major                       |critical


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
December 29, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=2962


Haruki Shigemori <rayerd.wiz@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rayerd.wiz@gmail.com


--- Comment #24 from Haruki Shigemori <rayerd.wiz@gmail.com> 2010-12-28 19:59:09 PST ---
Phobos unittest is broken.
I tried to build dmd, druntime, and phobos of trunk.
You should notice -unittest below.

c:\d\svnproj\phobos_trunk\phobos\std>dmd -c -of_ -unittest algorithm.d stdio.d
...
std.algorithm.canFindSorted is scheduled for deprecation.  Use
std.range.SortedR
ange.canFind instead.
std.algorithm.lowerBound is scheduled for deprecation.  Use
std.range.SortedRang
e.lowerBound instead.
std.algorithm.upperBound is scheduled for deprecation.  Use
std.range.SortedRang
e.upperBound instead.
std.algorithm.equalRange is scheduled for deprecation.  Use
std.range.SortedRang
e.equalRange instead.
C:\D\dmd2\windows\bin\..\..\src\phobos\std\conv.d(1263): Error: function
std.con
v.parse!(float,LockingTextReader).parse compiler error, parameter 'p', bugzilla
2962?
Assertion failure: '0' on line 729 in file 'glue.c'

abnormal program termination

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
December 29, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=2962



--- Comment #25 from Haruki Shigemori <rayerd.wiz@gmail.com> 2010-12-28 23:08:59 PST ---
Sorry, you will encounter this issue when dmd and phobos are debug build.
For dmd, you will build dmd with "make -f win32.mak" and "DEBUG=-g -D
-DUNITTEST -L/detailedmap".
For phobos, "you will build phobos with "make -f win32.mak" and
"DFLAGS=-unittest -g -d -debug -L/detailedmap".
If you do so, you will get the following result.

C:\d\svnproj\phobos_trunk\phobos\std>dmd -c -of_ -unittest algorithm.d stdio.d
2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2:
2:
 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2:
2
: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2:
2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2:
2:
 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2:
2
: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2:
2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2:
2:
 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2:
2
: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2:
2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2:
2:
 2: std.algorithm.canFindSorted is scheduled for deprecation.  Use
std.range.Sor
tedRange.canFind instead.
std.algorithm.lowerBound is scheduled for deprecation.  Use
std.range.SortedRang
e.lowerBound instead.
std.algorithm.upperBound is scheduled for deprecation.  Use
std.range.SortedRang
e.upperBound instead.
std.algorithm.equalRange is scheduled for deprecation.  Use
std.range.SortedRang
e.equalRange instead.
2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2:
2:
 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2: 2:
2
: 2: 2: C:\D\dmd2\windows\bin\..\..\src\phobos\std\conv.d(1263): Error:
function
 std.conv.parse!(float,LockingTextReader).parse compiler error, parameter 'p',
b
ugzilla 2962?
assert glue.c(729) 0      <---- AND HALT!

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
December 29, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=2962



--- Comment #26 from Don <clugdbug@yahoo.com.au> 2010-12-29 00:03:44 PST ---
(In reply to comment #25)
> Sorry, you will encounter this issue when dmd and phobos are debug build. For dmd, you will build dmd with "make -f win32.mak" and "DEBUG=-g -D -DUNITTEST -L/detailedmap".

No problem, I was able to reproduce it from your first comment.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
December 29, 2010
http://d.puremagic.com/issues/show_bug.cgi?id=2962



--- Comment #27 from Don <clugdbug@yahoo.com.au> 2010-12-29 00:19:59 PST ---
A simpler command line is this:
/dmd/src/phobos/std> dmd -c -unittest conv.d stdio.d
The unittest which it's failing in, is in stdio.d, line 1630:

unittest
{
    float f;
    if (false) readf("%s", &f);
}
Which just shows how nasty this bug is.

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