Thread overview
ICEs on package.d module names
May 10
Solomon E
May 10
I've got errors, and I wasn't sure about reporting them, because there are
so many, and they're probably all my fault, but some are ICEs.


file program.d:

import subdir.first_module;
import subdir: second_module;

void main() {
    assert(first_ok());
    assert(second_module.second_ok());
}


file subdir/package.d:

module subdira;

public import second_module;


file subdir/first_module.d:

bool first_ok()
{
    return true;
}


file subdir/second_module.d:

bool second_ok()
{
    return true;
}


$ gdc program.d -Isubdir subdir/first_module.d subdir/second_module.d
cc1d: ../../src/gcc/d/dfrontend/import.c:144: void Import::load(Scope*): Assertion `mod->isPackageFile == (p->isPkgMod == PKGmodule)' failed.
cc1d: internal compiler error: Aborted
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-6/README.Bugs> for instructions.

Then change the line in subdir/package.d "module subdira;" to "module subdir;"
That should fix it!

$ gdc program.d -Isubdir subdir/first_module.d subdir/second_module.d
program.d:1:8: internal compiler error: in visit, at d/imports.cc:47
 import subdir.first_module;
        ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-6/README.Bugs> for instructions.


I tried signing in at Bugzilla, which I've used before, but it didn't accept my password, and when I asked to reset my password, it said it sent an email, but I didn't receive an email. Maybe you're not using the same Bugzilla as some other project.
May 10
On 10 May 2017 at 05:11, Solomon E via D.gnu <d.gnu@puremagic.com> wrote:
> I've got errors, and I wasn't sure about reporting them, because there are so many, and they're probably all my fault, but some are ICEs.
>
>
> file program.d:
>
> import subdir.first_module;
> import subdir: second_module;
>

Importing an import.  That seems to be one case I forgot to cover.

>
> I tried signing in at Bugzilla, which I've used before, but it didn't accept my password, and when I asked to reset my password, it said it sent an email, but I didn't receive an email. Maybe you're not using the same Bugzilla as some other project.

Send me a private message, and I could sort that out for you.
May 10
On 10 May 2017 at 05:11, Solomon E via D.gnu <d.gnu@puremagic.com> wrote:
>
> $ gdc program.d -Isubdir subdir/first_module.d subdir/second_module.d
> cc1d: ../../src/gcc/d/dfrontend/import.c:144: void Import::load(Scope*):
> Assertion `mod->isPackageFile == (p->isPkgMod == PKGmodule)' failed.
> cc1d: internal compiler error: Aborted
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <file:///usr/share/doc/gcc-6/README.Bugs> for instructions.
>

I can't reproduce this, but is a front-end bug anyway, so should be reproducible in DMD too (if you compile it without -release).