Thread overview
[Issue 19941] [ICE] Segmentation fault in ImplicitConvTo::visit(AddrExp*) at dmd/dcast.d(980)
Jun 05, 2019
Iain Buclaw
Jun 05, 2019
Iain Buclaw
Jun 06, 2019
Iain Buclaw
Jun 06, 2019
Dlang Bot
Jun 07, 2019
Dlang Bot
Jun 09, 2019
Dlang Bot
Jun 15, 2019
steven kladitis
June 05, 2019
https://issues.dlang.org/show_bug.cgi?id=19941

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ibuclaw@gdcproject.org

--
June 05, 2019
https://issues.dlang.org/show_bug.cgi?id=19941

--- Comment #1 from Iain Buclaw <ibuclaw@gdcproject.org> ---
Related fail tests:

immutable d = 42;
immutable b = new a;
class a { int c = d; }
---
immutable b = new a;
immutable d = 42;
class a { int c = d; }
---
immutable b = new a;
class a { int c = d; }
immutable d = 42;


Swap the order of `class a` and `immutable b` declarations, and compilation succeeds, making this another forward reference bug.

--
June 06, 2019
https://issues.dlang.org/show_bug.cgi?id=19941

--- Comment #2 from Iain Buclaw <ibuclaw@gdcproject.org> ---
Interestingly, it doesn't happen with const, enum or __gshared, only if the declaration is marked immutable or shared does it trigger the bug.

--
June 06, 2019
https://issues.dlang.org/show_bug.cgi?id=19941

Dlang Bot <dlang-bot@dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull

--- Comment #3 from Dlang Bot <dlang-bot@dlang.rocks> ---
@ibuclaw created dlang/dmd pull request #9991 "fix Issue 19941 - [ICE]
Segmentation fault in ImplicitConvTo::visit(AddrExp*) at dmd/dcast.d(980)"
fixing this issue:

- fix Issue 19941 - [ICE] Segmentation fault in ImplicitConvTo::visit(AddrExp*)
at dmd/dcast.d(980)

https://github.com/dlang/dmd/pull/9991

--
June 07, 2019
https://issues.dlang.org/show_bug.cgi?id=19941

Dlang Bot <dlang-bot@dlang.rocks> changed:

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

--- Comment #4 from Dlang Bot <dlang-bot@dlang.rocks> ---
dlang/dmd pull request #9991 "fix Issue 19941 - [ICE] Segmentation fault in
ImplicitConvTo::visit(AddrExp*) at dmd/dcast.d(980)" was merged into stable:

- f11de557b9b007de2b22ce65452aa101a0db1604 by Iain Buclaw:
  fix Issue 19941 - [ICE] Segmentation fault in ImplicitConvTo::visit(AddrExp*)
at dmd/dcast.d(980)

https://github.com/dlang/dmd/pull/9991

--
June 09, 2019
https://issues.dlang.org/show_bug.cgi?id=19941

--- Comment #5 from Dlang Bot <dlang-bot@dlang.rocks> ---
dlang/dmd pull request #10005 "[dmd-cxx] fix Issue 19941 - [ICE] Segmentation
fault in ImplicitConvTo::visit(AddrExp*) at dmd/dcast.d(980)" was merged into
dmd-cxx:

- d4e591119a38662b9fe6a87e8016924148175ffa by Iain Buclaw:
  fix Issue 19941 - [ICE] Segmentation fault in ImplicitConvTo::visit(AddrExp*)
at dmd/dcast.d(980)

https://github.com/dlang/dmd/pull/10005

--
June 15, 2019
https://issues.dlang.org/show_bug.cgi?id=19941

steven kladitis <steven_kladitis@yahoo.com> changed:

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

--- Comment #6 from steven kladitis <steven_kladitis@yahoo.com> ---
I see in the latest pull
  if (v->inuse || v->_scope == NULL || v->_init == NULL ||
I think it should be
   if (v->inuse || v->_scope is NULL || v->_init is NULL ||

--