[Bug d/90650] ICE in fold_convert_loc, at fold-const.c:2552

2019-06-16 Thread ibuclaw at gdcproject dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90650

Iain Buclaw  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED

--- Comment #4 from Iain Buclaw  ---
Fixed in r272344

[Bug d/90650] ICE in fold_convert_loc, at fold-const.c:2552

2019-06-16 Thread ibuclaw at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90650

--- Comment #3 from ibuclaw at gcc dot gnu.org ---
Author: ibuclaw
Date: Sun Jun 16 07:48:53 2019
New Revision: 272344

URL: https://gcc.gnu.org/viewcvs?rev=272344&root=gcc&view=rev
Log:
PR d/90650
d/dmd: Merge upstream dmd ab03e2918

Fixes internal compiler error in fold_convert_loc.

Reviewed-on: https://github.com/dlang/dmd/pull/9996

gcc/testsuite/ChangeLog:

2019-06-16  Iain Buclaw  

PR d/90650
* gdc.dg/pr90650a.d: New test.
* gdc.dg/pr90650b.d: New test.

Added:
trunk/gcc/testsuite/gdc.dg/pr90650a.d
trunk/gcc/testsuite/gdc.dg/pr90650b.d
Modified:
trunk/gcc/d/dmd/MERGE
trunk/gcc/d/dmd/expressionsem.c
trunk/gcc/d/dmd/mtype.c
trunk/gcc/d/dmd/statementsem.c
trunk/gcc/testsuite/ChangeLog

[Bug d/90650] ICE in fold_convert_loc, at fold-const.c:2552

2019-05-28 Thread ibuclaw at gdcproject dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90650

--- Comment #2 from Iain Buclaw  ---
Related upstream bug, with fix (makes code an error).

https://issues.dlang.org/show_bug.cgi?id=15407

[Bug d/90650] ICE in fold_convert_loc, at fold-const.c:2552

2019-05-27 Thread gs...@t-online.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90650

G. Steinmetz  changed:

   What|Removed |Added

   Keywords||ice-on-invalid-code
 Target||x86_64-pc-linux-gnu

--- Comment #1 from G. Steinmetz  ---

And nearby testcase ...


$ cat z2.d
class c
{
  static f ()
  {
return 0;
  }
}
void g ()
{
  if ([0] & c.f()) {}
}


$ gdc-10-20190526 -c z2.d
z2.d: In function 'g':
z2.d:10:7: internal compiler error: tree check: expected none of record_type or
union_type or qual_union_type or array_type, have record_type in
fold_binary_loc, at fold-const.c:9782
   10 |   if ([0] & c.f()) {}
  |   ^
0x608666 tree_not_check_failed(tree_node const*, char const*, int, char const*,
...)
../../gcc/tree.c:9939
0x9a4f4e tree_not_check4(tree_node*, char const*, int, char const*, tree_code,
tree_code, tree_code, tree_code)
../../gcc/tree.h:3262
0x982c4e fold_binary_loc(unsigned int, tree_code, tree_node*, tree_node*,
tree_node*)
../../gcc/fold-const.c:9782
0x98bbaa fold_build2_loc(unsigned int, tree_code, tree_node*, tree_node*,
tree_node*)
../../gcc/fold-const.c:12327
0x79c7f7 ExprVisitor::binary_op(tree_code, tree_node*, tree_node*, tree_node*)
../../gcc/d/expr.cc:165
0x79c7f7 ExprVisitor::visit(BinExp*)
../../gcc/d/expr.cc:674
0x79bc7f build_expr(Expression*, bool)
../../gcc/d/expr.cc:3076
0x79bd59 build_expr_dtor(Expression*)
../../gcc/d/expr.cc:3099
0x7acacf IRVisitor::visit(IfStatement*)
../../gcc/d/toir.cc:554
0x7abe92 IRVisitor::build_stmt(Statement*)
../../gcc/d/toir.cc:258
0x7abe92 IRVisitor::visit(CompoundStatement*)
../../gcc/d/toir.cc:1042
0x7ab821 IRVisitor::build_stmt(Statement*)
../../gcc/d/toir.cc:258
0x7ab821 build_function_body(FuncDeclaration*)
../../gcc/d/toir.cc:1447
0x79a844 DeclVisitor::visit(FuncDeclaration*)
../../gcc/d/decl.cc:1006
0x794a16 build_decl_tree(Dsymbol*)
../../gcc/d/decl.cc:1047
0x7a9640 build_module_tree(Module*)
../../gcc/d/modules.cc:726
0x799a3b DeclVisitor::visit(Module*)
../../gcc/d/decl.cc:147
0x794a16 build_decl_tree(Dsymbol*)
../../gcc/d/decl.cc:1047
0x792c57 d_parse_file()
../../gcc/d/d-lang.cc:1310