[Bug d/119817] d: internal compiler error: in dwarf2out_imported_module_or_decl, at dwarf2out.cc:27676

2025-04-20 Thread ibuclaw at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119817

Iain Buclaw  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|ASSIGNED|RESOLVED

--- Comment #6 from Iain Buclaw  ---
Fixed and backported.

[Bug d/119817] d: internal compiler error: in dwarf2out_imported_module_or_decl, at dwarf2out.cc:27676

2025-04-20 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119817

--- Comment #5 from GCC Commits  ---
The releases/gcc-12 branch has been updated by Iain Buclaw
:

https://gcc.gnu.org/g:0701c8d32507d9014c5b425157a034632d01e45f

commit r12-11061-g0701c8d32507d9014c5b425157a034632d01e45f
Author: Iain Buclaw 
Date:   Tue Apr 15 14:49:34 2025 +0200

d: Fix ICE in dwarf2out_imported_module_or_decl, at dwarf2out.cc:27676
[PR119817]

The ImportVisitor method for handling the importing of overload sets was
pushing NULL_TREE to the array of import decls, which in turn got passed
to `debug_hooks->imported_module_or_decl', triggering the observed
internal compiler error.

NULL_TREE is returned from `build_import_decl' when the symbol was
ignored for being non-trivial to represent in debug, for example,
template or tuple declarations.  So similarly "skip" adding the symbol
when this is the case for overload sets too.

PR d/119817

gcc/d/ChangeLog:

* imports.cc (ImportVisitor::visit (OverloadSet *)): Don't push
NULL_TREE to vector of import symbols.

gcc/testsuite/ChangeLog:

* gdc.dg/debug/imports/m119817/a.d: New test.
* gdc.dg/debug/imports/m119817/b.d: New test.
* gdc.dg/debug/imports/m119817/package.d: New test.
* gdc.dg/debug/pr119817.d: New test.

(cherry picked from commit f5ed7d19c965de9ccb158d77e929b17459bf65b5)

[Bug d/119817] d: internal compiler error: in dwarf2out_imported_module_or_decl, at dwarf2out.cc:27676

2025-04-19 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119817

--- Comment #4 from GCC Commits  ---
The releases/gcc-13 branch has been updated by Iain Buclaw
:

https://gcc.gnu.org/g:3c91f94bbb09c5380c3cc07c4c8fabab332eb962

commit r13-9553-g3c91f94bbb09c5380c3cc07c4c8fabab332eb962
Author: Iain Buclaw 
Date:   Tue Apr 15 14:49:34 2025 +0200

d: Fix ICE in dwarf2out_imported_module_or_decl, at dwarf2out.cc:27676
[PR119817]

The ImportVisitor method for handling the importing of overload sets was
pushing NULL_TREE to the array of import decls, which in turn got passed
to `debug_hooks->imported_module_or_decl', triggering the observed
internal compiler error.

NULL_TREE is returned from `build_import_decl' when the symbol was
ignored for being non-trivial to represent in debug, for example,
template or tuple declarations.  So similarly "skip" adding the symbol
when this is the case for overload sets too.

PR d/119817

gcc/d/ChangeLog:

* imports.cc (ImportVisitor::visit (OverloadSet *)): Don't push
NULL_TREE to vector of import symbols.

gcc/testsuite/ChangeLog:

* gdc.dg/debug/imports/m119817/a.d: New test.
* gdc.dg/debug/imports/m119817/b.d: New test.
* gdc.dg/debug/imports/m119817/package.d: New test.
* gdc.dg/debug/pr119817.d: New test.

(cherry picked from commit f5ed7d19c965de9ccb158d77e929b17459bf65b5)

[Bug d/119817] d: internal compiler error: in dwarf2out_imported_module_or_decl, at dwarf2out.cc:27676

2025-04-19 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119817

--- Comment #3 from GCC Commits  ---
The releases/gcc-14 branch has been updated by Iain Buclaw
:

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

commit r14-11666-gd1b7ee4879aca90c9828b6b9f4937ed15513adfa
Author: Iain Buclaw 
Date:   Tue Apr 15 14:49:34 2025 +0200

d: Fix ICE in dwarf2out_imported_module_or_decl, at dwarf2out.cc:27676
[PR119817]

The ImportVisitor method for handling the importing of overload sets was
pushing NULL_TREE to the array of import decls, which in turn got passed
to `debug_hooks->imported_module_or_decl', triggering the observed
internal compiler error.

NULL_TREE is returned from `build_import_decl' when the symbol was
ignored for being non-trivial to represent in debug, for example,
template or tuple declarations.  So similarly "skip" adding the symbol
when this is the case for overload sets too.

PR d/119817

gcc/d/ChangeLog:

* imports.cc (ImportVisitor::visit (OverloadSet *)): Don't push
NULL_TREE to vector of import symbols.

gcc/testsuite/ChangeLog:

* gdc.dg/debug/imports/m119817/a.d: New test.
* gdc.dg/debug/imports/m119817/b.d: New test.
* gdc.dg/debug/imports/m119817/package.d: New test.
* gdc.dg/debug/pr119817.d: New test.

(cherry picked from commit f5ed7d19c965de9ccb158d77e929b17459bf65b5)

[Bug d/119817] d: internal compiler error: in dwarf2out_imported_module_or_decl, at dwarf2out.cc:27676

2025-04-15 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119817

--- Comment #2 from GCC Commits  ---
The master branch has been updated by Iain Buclaw :

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

commit r15-9483-gf5ed7d19c965de9ccb158d77e929b17459bf65b5
Author: Iain Buclaw 
Date:   Tue Apr 15 14:49:34 2025 +0200

d: Fix ICE in dwarf2out_imported_module_or_decl, at dwarf2out.cc:27676
[PR119817]

The ImportVisitor method for handling the importing of overload sets was
pushing NULL_TREE to the array of import decls, which in turn got passed
to `debug_hooks->imported_module_or_decl', triggering the observed
internal compiler error.

NULL_TREE is returned from `build_import_decl' when the symbol was
ignored for being non-trivial to represent in debug, for example,
template or tuple declarations.  So similarly "skip" adding the symbol
when this is the case for overload sets too.

PR d/119817

gcc/d/ChangeLog:

* imports.cc (ImportVisitor::visit (OverloadSet *)): Don't push
NULL_TREE to vector of import symbols.

gcc/testsuite/ChangeLog:

* gdc.dg/debug/imports/m119817/a.d: New test.
* gdc.dg/debug/imports/m119817/b.d: New test.
* gdc.dg/debug/imports/m119817/package.d: New test.
* gdc.dg/debug/pr119817.d: New test.

[Bug d/119817] d: internal compiler error: in dwarf2out_imported_module_or_decl, at dwarf2out.cc:27676

2025-04-15 Thread ibuclaw at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119817

Iain Buclaw  changed:

   What|Removed |Added

   Last reconfirmed||2025-04-15
 Status|UNCONFIRMED |ASSIGNED
 Ever confirmed|0   |1
  Known to fail||12.4.0, 13.3.0, 14.2.0

--- Comment #1 from Iain Buclaw  ---
Affects all versions, requires that two versions of the symbol exist in
different modules, and at least one is a template.

```pr119817.d
import imports : f119817;
```

```imports/package.d
public import
imports.m119817a,
imports.m119817b;
```

```imports/m119817a.d
void f119817()() { }
```

```imports/m119817b.d
void f119817()() { }
```