Thread overview
[Bug 251] ICE: in dwarf2out_imported_module_or_decl_1, at dwarf2out.c:23802
January 24
http://bugzilla.gdcproject.org/show_bug.cgi?id=251

--- Comment #1 from Iain Buclaw <ibuclaw@gdcproject.org> ---
My guess is that it would be this addition:

---
import asgen.config : Config;
---

As nothing else would touch dwarf2out_imported_module_or_decl.

Which leads to the question, what is Config?

-- 
You are receiving this mail because:
You are watching all bug changes.
January 24
http://bugzilla.gdcproject.org/show_bug.cgi?id=251

--- Comment #2 from Matthias Klumpp <matthias@tenstral.net> ---
Config is a class (and a global singleton ). https://github.com/ximion/appstream-generator/blob/master/src/asgen/config.d#L88

-- 
You are receiving this mail because:
You are watching all bug changes.
January 24
http://bugzilla.gdcproject.org/show_bug.cgi?id=251

--- Comment #3 from Iain Buclaw <ibuclaw@gdcproject.org> ---
By the way, incase you've never encountered this project.

https://github.com/CyberShadow/DustMite

-- 
You are receiving this mail because:
You are watching all bug changes.
January 24
http://bugzilla.gdcproject.org/show_bug.cgi?id=251

--- Comment #4 from Iain Buclaw <ibuclaw@gdcproject.org> ---
Backtrace:
---
#0  internal_error (gmsgid=gmsgid@entry=0x20d46a4 "in %s, at %s:%d") at
../../dev/gcc/diagnostic.c:1377
#1  0x0000000001b3bd66 in fancy_abort (file=<optimised out>, line=25370,
function=0x1c977c0 <dwarf2out_imported_module_or_decl_1(tree_node*, tree_node*,
tree_node*, die_struct*)::__FUNCTION__> "dwarf2out_imported
_module_or_decl_1") at ../../dev/gcc/diagnostic.c:1447
#2  0x0000000000ad946e in dwarf2out_imported_module_or_decl_1 (decl=0x0,
name=0x0, lexical_block=0x7ffff679b098, lexical_block_die=0x7ffff6715050) at
../../dev/gcc/dwarf2out.c:25370
#3  0x0000000000ad9a54 in dwarf2out_imported_module_or_decl
(decl=0x7ffff67a6000, name=0x0, context=0x7ffff679b098, child=false) at
../../dev/gcc/dwarf2out.c:25485
#4  0x0000000000933ee8 in Dsymbol::toObjFile (this=0x7ffff7ed8370) at
../../dev/gcc/d/d-objfile.cc:131
#5  0x000000000093789a in Module::genobjfile (this=0x7ffff7ed7380) at
../../dev/gcc/d/d-objfile.cc:1125
#6  0x000000000090c132 in d_parse_file () at ../../dev/gcc/d/d-lang.cc:1226
#7  0x0000000000fb4e04 in compile_file () at ../../dev/gcc/toplev.c:463
#8  0x0000000000fb7da8 in do_compile () at ../../dev/gcc/toplev.c:1983
#9  0x0000000000fb8107 in toplev::main (this=0x7fffffffd840, argc=53,
argv=0x7fffffffd948) at ../../dev/gcc/toplev.c:2117
#10 0x0000000001b23edd in main (argc=53, argv=0x7fffffffd948) at
../../dev/gcc/main.c:39
---

Pretty debug:
---
decl = <<< Unknown tree: imported_decl >>>
name = 0x0
context = asgen.result
---

Verbose debug:
---
decl =  <imported_decl 0x7ffff67a6000 D.5904
    type <void_type 0x7ffff6948000 void asm_written VOID
        align 8 symtab 0 alias set -1 canonical type 0x7ffff6948000
        pointer_to_this <pointer_type 0x7ffff6948150>>
    VOID file ../src/asgen/result.d line 32 col 8
    align 1>

context =  <namespace_decl 0x7ffff679b098 asgen.result
    type <void_type 0x7ffff6948000 void asm_written VOID
        align 8 symtab 0 alias set -1 canonical type 0x7ffff6948000
        pointer_to_this <pointer_type 0x7ffff6948150>>
    public VOID file ../src/asgen/result.d line 20 col 1
    align 1>
---

AST debug:
---
print() = "__anonymous"
kind() = "import"
---


An anonymous import? The frontend used to throw some wacky stuff at gdc in the past, but I think that is a new first for me.

Dustmiting this down...

-- 
You are receiving this mail because:
You are watching all bug changes.
January 24
http://bugzilla.gdcproject.org/show_bug.cgi?id=251

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Hardware|x86_64                      |All
                 OS|Linux                       |All
            Version|6.x                         |development

--- Comment #5 from Iain Buclaw <ibuclaw@gdcproject.org> ---
Reproducible in master.

-- 
You are receiving this mail because:
You are watching all bug changes.
January 24
http://bugzilla.gdcproject.org/show_bug.cgi?id=251

--- Comment #6 from Iain Buclaw <ibuclaw@gdcproject.org> ---
Note to self: IMPORTED_DECL_ASSOCIATED_DECL is not set.

-- 
You are receiving this mail because:
You are watching all bug changes.
January 24
http://bugzilla.gdcproject.org/show_bug.cgi?id=251

--- Comment #7 from Iain Buclaw <ibuclaw@gdcproject.org> ---
And the reason why it is not set, is because Config is a class.  And the debug type information is set on the underlying aggregate type, not the reference, duh.

-- 
You are receiving this mail because:
You are watching all bug changes.
January 24
http://bugzilla.gdcproject.org/show_bug.cgi?id=251

--- Comment #8 from Iain Buclaw <ibuclaw@gdcproject.org> ---
Got a fix ready, just waiting for the reduced test-case.

-- 
You are receiving this mail because:
You are watching all bug changes.
January 24
http://bugzilla.gdcproject.org/show_bug.cgi?id=251

--- Comment #9 from Matthias Klumpp <matthias@tenstral.net> ---
That was an insanely quick debug, thanks!
I know about Dustmite, I used it far too often already (so much so that I
packaged it for Debian, but it has been stuck in NEW for more than a month now)

-- 
You are receiving this mail because:
You are watching all bug changes.
January 25
http://bugzilla.gdcproject.org/show_bug.cgi?id=251

--- Comment #10 from Iain Buclaw <ibuclaw@gdcproject.org> ---
> That was an insanely quick debug, thanks!

Not being the one who is too modest or knocks themselves down - but to be fair the file that generates debug info for symbol imports is around 60 lines of code, and only has a handful of states that affect it's output. ;-)

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