Thread overview
[Bug 146] ICE (segmentation fault)
Jul 23, 2014
Ketmar Dark
Jul 23, 2014
Iain Buclaw
Jul 23, 2014
Ketmar Dark
Jul 23, 2014
Iain Buclaw
July 23, 2014
http://bugzilla.gdcproject.org/show_bug.cgi?id=146

Ketmar Dark <ketmar@ketmar.no-ip.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ketmar@ketmar.no-ip.org

--- Comment #1 from Ketmar Dark <ketmar@ketmar.no-ip.org> ---
current dmd (latest git) fails to compile sample with this error message:

main.d(24): Error: AA key type TypedIdentifier should have 'size_t toHash()
const nothrow @safe' if opEquals defined

-- 
You are receiving this mail because:
You are watching all bug changes.


July 23, 2014
http://bugzilla.gdcproject.org/show_bug.cgi?id=146

--- Comment #2 from Iain Buclaw <ibuclaw@gdcproject.org> ---
(In reply to Ketmar Dark from comment #1)
> current dmd (latest git) fails to compile sample with this error message:
> 
> main.d(24): Error: AA key type TypedIdentifier should have 'size_t toHash()
> const nothrow @safe' if opEquals defined

Adding a toHash function still causes an ICE in GDC.

-- 
You are receiving this mail because:
You are watching all bug changes.


July 23, 2014
http://bugzilla.gdcproject.org/show_bug.cgi?id=146

--- Comment #3 from Ketmar Dark <ketmar@ketmar.no-ip.org> ---
the source of the bug is in d-ctype.cc, in TypeFunction::toCtype().

there is this code: 'Type *tn = next->baseElemOf();', but 'next' can be NULL
here due to code 'if (isref) ret_type = build_reference_type (ret_type);'.

there is the check for null before 'if' (and ret_type becomes void_type_node),
but then build_reference_type changes ret_type to something another, and 'if
(ret_type != void_type_node)' check fails.

it's easy to add some checks, but i don't understand gdc internals enough to decide where this check should go.


the problem is definitely in gdc backend, it's not frontend-related. let's wait for Iain then.

-- 
You are receiving this mail because:
You are watching all bug changes.


July 23, 2014
http://bugzilla.gdcproject.org/show_bug.cgi?id=146

Iain Buclaw <ibuclaw@gdcproject.org> changed:

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

--- Comment #4 from Iain Buclaw <ibuclaw@gdcproject.org> ---
https://github.com/D-Programming-GDC/GDC/commit/5434139180a410f9fc79cabe0871b3601cee167f

-- 
You are receiving this mail because:
You are watching all bug changes.