[Bug d/90651] ICE in FuncDeclaration::semantic3, at d/dmd/func.c:1524

2021-06-10 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90651

--- Comment #6 from CVS Commits  ---
The releases/gcc-9 branch has been updated by Iain Buclaw
:

https://gcc.gnu.org/g:dcde4afec2a25a5fa69d1e5eec022768340fa1ab

commit r9-9578-gdcde4afec2a25a5fa69d1e5eec022768340fa1ab
Author: Iain Buclaw 
Date:   Thu Jun 10 19:48:49 2021 +0200

PR d/90651 (ICE in FuncDeclaration::semantic3, at d/dmd/func.c:1524)

Fixes segmentation fault in FuncDeclaration::semantic3.

gcc/d/ChangeLog:

PR d/90651
* dmd/expressionsem.c (ExpressionSemanticVisitor::visit
(TypeidExp)):
Error when TypeInfo doesn't exist.
* dmd/func.c (FuncDeclaration::semantic3): Likewise.
* dmd/mtype.c (TypeClass::dotExp): Likewise.
* typeinfo.cc (object_module): New variable.
(make_frontend_typeinfo): Update signature.  Set temporary on
generated TypeInfo classes.
(create_tinfo_types): Set object_module.  Move generation of
front-end
typeinfo into ...
(create_frontend_tinfo_types): ... New function.
(layout_typeinfo): Call create_frontend_tinfo_types.
(layout_classinfo): Likewise.
(layout_cpp_typeinfo): Likewise.
(create_typeinfo): Likewise.

gcc/testsuite/ChangeLog:

PR d/90651
* gdc.test/fail_compilation/extra-files/minimal/object.d: New file.
* gdc.test/fail_compilation/fail19911a.d: New test.
* gdc.test/fail_compilation/fail19911b.d: New test.
* gdc.test/fail_compilation/fail19911c.d: New test.
* gdc.test/fail_compilation/fail19922.d: New test.
* gdc.test/fail_compilation/fail19923.d: New test.

(cherry picked from commit 88ad43b1f91f7cd2ba9c342c6c1a6da82e6088bf)

[Bug d/90651] ICE in FuncDeclaration::semantic3, at d/dmd/func.c:1524

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

Iain Buclaw  changed:

   What|Removed |Added

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

--- Comment #5 from Iain Buclaw  ---
Fixed in r272340 and r272345

[Bug d/90651] ICE in FuncDeclaration::semantic3, at d/dmd/func.c:1524

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

--- Comment #4 from ibuclaw at gcc dot gnu.org ---
Author: ibuclaw
Date: Sun Jun 16 07:49:06 2019
New Revision: 272345

URL: https://gcc.gnu.org/viewcvs?rev=272345=gcc=rev
Log:
PR d/90651
d/dmd: Merge upstream dmd 0f6cbbcad

Fixes segmentation fault in FuncDeclaration::semantic3.

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

gcc/d/ChangeLog:

2019-06-16  Iain Buclaw  

* typeinfo.cc (object_module): New variable.
(make_frontend_typeinfo): Update signature.  Set temporary on
generated TypeInfo classes.
(create_tinfo_types): Set object_module.  Move generation of front-end
typeinfo into ...
(create_frontend_tinfo_types): ... New function.
(layout_typeinfo): Call create_frontend_tinfo_types.
(layout_classinfo): Likewise.
(layout_cpp_typeinfo): Likewise.
(create_typeinfo): Likewise.

Added:
trunk/gcc/testsuite/gdc.test/fail_compilation/extra-files/minimal/
trunk/gcc/testsuite/gdc.test/fail_compilation/extra-files/minimal/object.d
trunk/gcc/testsuite/gdc.test/fail_compilation/fail19911a.d
trunk/gcc/testsuite/gdc.test/fail_compilation/fail19911b.d
trunk/gcc/testsuite/gdc.test/fail_compilation/fail19911c.d
trunk/gcc/testsuite/gdc.test/fail_compilation/fail19922.d
trunk/gcc/testsuite/gdc.test/fail_compilation/fail19923.d
Modified:
trunk/gcc/d/ChangeLog
trunk/gcc/d/dmd/MERGE
trunk/gcc/d/dmd/expressionsem.c
trunk/gcc/d/dmd/func.c
trunk/gcc/d/dmd/mtype.c
trunk/gcc/d/typeinfo.cc

[Bug d/90651] ICE in FuncDeclaration::semantic3, at d/dmd/func.c:1524

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

--- Comment #3 from ibuclaw at gcc dot gnu.org ---
Author: ibuclaw
Date: Sun Jun 16 07:47:46 2019
New Revision: 272340

URL: https://gcc.gnu.org/viewcvs?rev=272340=gcc=rev
Log:
PR d/90651
d/dmd: Merge upstream dmd 78dc31152

Fixes bug where the object module was not always implicitly imported.

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

Added:
trunk/gcc/testsuite/gdc.test/compilable/test19912.d
trunk/gcc/testsuite/gdc.test/fail_compilation/fail19912a.d
trunk/gcc/testsuite/gdc.test/fail_compilation/fail19912b.d
trunk/gcc/testsuite/gdc.test/fail_compilation/fail19912c.d
trunk/gcc/testsuite/gdc.test/fail_compilation/fail19912d.d
trunk/gcc/testsuite/gdc.test/fail_compilation/fail19912e.d
Modified:
trunk/gcc/d/dmd/MERGE
trunk/gcc/d/dmd/dmodule.c

[Bug d/90651] ICE in FuncDeclaration::semantic3, at d/dmd/func.c:1524

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

--- Comment #2 from Iain Buclaw  ---
The second function is not necessary.


struct object {}
void f (...) {}

[Bug d/90651] ICE in FuncDeclaration::semantic3, at d/dmd/func.c:1524

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

--- Comment #1 from Iain Buclaw  ---
Confirmed that segfault happens in upstream as well.

By the way, it would be interesting to see if any more problems can be found
just by prefixing all these generated tests with 'module object;' as the first
line - this makes it so there are no implicit runtime dependencies being
imported into the compilation.