Thread overview
[Issue 14510] Bad tail call optimization with static arrays
Apr 27, 2015
Vladimir Panteleev
Jun 27, 2015
Walter Bright
April 27, 2015
https://issues.dlang.org/show_bug.cgi?id=14510

Vladimir Panteleev <thecybershadow@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://issues.dlang.org/sh
                   |                            |ow_bug.cgi?id=14480

--
June 27, 2015
https://issues.dlang.org/show_bug.cgi?id=14510

Walter Bright <bugzilla@digitalmars.com> changed:

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

--- Comment #1 from Walter Bright <bugzilla@digitalmars.com> ---
https://github.com/D-Programming-Language/dmd/pull/4778

--
June 27, 2015
https://issues.dlang.org/show_bug.cgi?id=14510

--- Comment #2 from github-bugzilla@puremagic.com ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/af82ac6208a576ddae3bfab6b3ec2e4c211015a3 fix Issue 14510 - Bad tail call optimization with static arrays

https://github.com/D-Programming-Language/dmd/commit/6071f1dbd7c5d70d9b0c4781e8d5efad0f6d95c6 Merge pull request #4778 from WalterBright/fix14510

Critical: fix Issue 14510 - Bad tail call optimization with static arrays

--
July 01, 2015
https://issues.dlang.org/show_bug.cgi?id=14510

--- Comment #3 from github-bugzilla@puremagic.com ---
Commit pushed to stable at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/86757a2f4efc5562d8621207676d2a187e91b33a Merge pull request #4778 from WalterBright/fix14510

Critical: fix Issue 14510 - Bad tail call optimization with static arrays

--
July 24, 2015
https://issues.dlang.org/show_bug.cgi?id=14510

--- Comment #4 from github-bugzilla@puremagic.com ---
Commit pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/86757a2f4efc5562d8621207676d2a187e91b33a Merge pull request #4778 from WalterBright/fix14510

--
August 30, 2015
https://issues.dlang.org/show_bug.cgi?id=14510

tbanelwebmin@free.fr changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tbanelwebmin@free.fr

--- Comment #5 from tbanelwebmin@free.fr ---
I came across something similar.
The following program crashes on assert,
but only when compiled with -O
DMD64 D Compiler v2.068.0

----------------------------
struct SomeStruct
{
  void fff (int n)
  {
    SomeStruct next;
    assert (&next != &this);
    if (n)
      next.fff(n-1);
  }
}

void main()
{
  SomeStruct root;
  root.fff(2);
}
----------------------------

As a workaround, add
  return 3;
at the end of fff
and change void to int

--
October 04, 2015
https://issues.dlang.org/show_bug.cgi?id=14510

--- Comment #6 from github-bugzilla@puremagic.com ---
Commits pushed to stable at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/af82ac6208a576ddae3bfab6b3ec2e4c211015a3 fix Issue 14510 - Bad tail call optimization with static arrays

https://github.com/D-Programming-Language/dmd/commit/6071f1dbd7c5d70d9b0c4781e8d5efad0f6d95c6 Merge pull request #4778 from WalterBright/fix14510

--
July 22, 2017
https://issues.dlang.org/show_bug.cgi?id=14510

--- Comment #7 from github-bugzilla@puremagic.com ---
Commits pushed to dmd-cxx at https://github.com/dlang/dmd

https://github.com/dlang/dmd/commit/af82ac6208a576ddae3bfab6b3ec2e4c211015a3 fix Issue 14510 - Bad tail call optimization with static arrays

https://github.com/dlang/dmd/commit/6071f1dbd7c5d70d9b0c4781e8d5efad0f6d95c6 Merge pull request #4778 from WalterBright/fix14510

--