ICE when calling templated function from extern (C++) templated function?

2016-12-27 Thread Elronnd via D.gnu

Here's a minimal example:

  void r(T...)(T args) {}

  extern (C++) {
  void s(T...)(T args) { r(args); }
  }

  void main() {
  s(0);
  }

Traceback from GDC:

  cc1d: ../../gcc-6.3.0/gcc/d/dfrontend/cppmangle.c:185: void 
CppMangleVisitor::source_name(Dsymbol*, bool): Assertion `t' 
failed.

  minim.d: In function ‘D main’:
  minim.d:9:2: internal compiler error: Aborted
s(0);
^
  0xb91c3f crash_signal
../../gcc-6.3.0/gcc/toplev.c:333
  0x5f4f26 CppMangleVisitor::source_name(Dsymbol*, bool)
../../gcc-6.3.0/gcc/d/dfrontend/cppmangle.c:185
  0x5f0b82 CppMangleVisitor::mangle_function(FuncDeclaration*)
../../gcc-6.3.0/gcc/d/dfrontend/cppmangle.c:462
  0x5f0b82 CppMangleVisitor::mangleOf(Dsymbol*)
../../gcc-6.3.0/gcc/d/dfrontend/cppmangle.c:575
  0x5f0b82 toCppMangle(Dsymbol*)
../../gcc-6.3.0/gcc/d/dfrontend/cppmangle.c:910
  0x67ba17 Mangler::visit(Declaration*)
../../gcc-6.3.0/gcc/d/dfrontend/mangle.c:421
  0x67a2f8 mangleExact(FuncDeclaration*)
../../gcc-6.3.0/gcc/d/dfrontend/mangle.c:877
  0x6ed183 get_symbol_decl(Declaration*)
../../gcc-6.3.0/gcc/d/d-decls.cc:164
  0x72ab78 ExprVisitor::visit(VarExp*)
../../gcc-6.3.0/gcc/d/expr.cc:2062
  0x7298ef build_expr(Expression*, bool)
../../gcc-6.3.0/gcc/d/expr.cc:2851
  0x72b759 ExprVisitor::visit(CallExp*)
../../gcc-6.3.0/gcc/d/expr.cc:1633
  0x7298ef build_expr(Expression*, bool)
../../gcc-6.3.0/gcc/d/expr.cc:2851
  0x729a5f build_expr_dtor(Expression*)
../../gcc-6.3.0/gcc/d/expr.cc:2895
  0x731d7c IRVisitor::visit(ExpStatement*)
../../gcc-6.3.0/gcc/d/toir.cc:649
  0x731bf8 IRVisitor::visit(CompoundStatement*)
../../gcc-6.3.0/gcc/d/toir.cc:665
  0x731b95 build_ir(FuncDeclaration*)
../../gcc-6.3.0/gcc/d/toir.cc:1037
  0x706d84 FuncDeclaration::toObjFile()
../../gcc-6.3.0/gcc/d/d-objfile.cc:1359
  0x7083a4 Module::genobjfile(bool)
../../gcc-6.3.0/gcc/d/d-objfile.cc:1465
  0x6e7f22 d_parse_file()
../../gcc-6.3.0/gcc/d/d-lang.cc:1215
  Please submit a full bug report,
  with preprocessed source if appropriate.
  Please include the complete backtrace with any bug report.
  See  for instructions.


Re: ICE when calling templated function from extern (C++) templated function?

2017-01-08 Thread Elronnd via D.gnu

On Saturday, 31 December 2016 at 15:10:36 UTC, Iain Buclaw wrote:
On 28 December 2016 at 07:51, Elronnd via D.gnu 
 wrote:

*snip*
It seems the bug is also in dmd too?  Unless it is fixed in 
master/latest release, in which case will need to find out when 
this happened.


It works fine for me on dmd.


ICE with custom map template.

2017-09-17 Thread Elronnd via D.gnu

I get an ICE with the following code:


void main() {
import std.stdio;

template mmap(alias fun) {
void mmap(T...)(T list) {
foreach (item; list) {
fun(item);
}
}
}


void printstuffs(T...)(T args) {
void printer(G)(G arg) {
writeln(arg);
}

mmap!printer(args);
}


printstuffs("bla", 7, 9.0);
}


The message printed is:

test.d: In function ‘mmap’:
test.d:7:8: internal compiler error: in get_frame_for_symbol, at 
d/d-codegen.cc:2208

 fun(item);
^



Re: ICE with custom map template.

2017-09-17 Thread Elronnd via D.gnu
See also the bugzilla 
(https://issues.dlang.org/show_bug.cgi?id=17836).


ICE with static immutable RedBlackTree

2017-11-23 Thread Elronnd via D.gnu

There is this ICE:

void main() {
import std.container;
static immutable s = new RedBlackTree!int('h');
}


Re: ICE with static immutable RedBlackTree

2017-11-27 Thread Elronnd via D.gnu

On Friday, 24 November 2017 at 09:30:02 UTC, Iain Buclaw wrote:

care to raise a bug?


Hrmm.  I tried to create an account on the bugzilla, but got 
assaulted by this message:




 There was an error sending mail from 
'gdc-bugzi...@gdcproject.org' to elro...@slashem.me: error when 
closing pipe to sendmail: Temp failure (EX_TEMPFAIL)


Traceback:

 at Bugzilla/Mailer.pm line 179.
	Bugzilla::Mailer::MessageToMTA(...) called at Bugzilla/Token.pm 
line 89
	Bugzilla::Token::issue_new_user_account_token(...) called at 
Bugzilla/User.pm line 2423

Bugzilla::User::check_and_send_account_creation_confirmation(...) 
called at /srv/bugzilla/createaccount.cgi line 39


Re: ICE with static immutable RedBlackTree

2017-11-28 Thread Elronnd via D.gnu

Ok done, https://bugzilla.gdcproject.org/show_bug.cgi?id=280


Re: static foreach in gdc

2020-02-08 Thread Elronnd via D.gnu
On Friday, 7 February 2020 at 11:51:36 UTC, Jean-Louis Leroy 
wrote:
What's the situation with `static foreach` on gdc? When I 
install it using install.sh from 
https://dlang.org/install.html, I get 4.8.5, which does not 
support `static foreach`. That is also the version that is 
installed on travis-ci.org.


You can try compiling this version from source: 
https://github.com/moon-chilled/gdc-d2089


It is a WIP targeting gcc 10.  Didn't make it; I found it, and 
then it disappeared.  Once GCC 10 proper comes out, use that.