https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112290

            Bug ID: 112290
           Summary: self-referencing `in` parameter with `-fpreview=in`
                    causes ICE
           Product: gcc
           Version: 13.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: d
          Assignee: ibuclaw at gdcproject dot org
          Reporter: gcc.gnu.org at webfreak dot org
  Target Milestone: ---

minial reproduction:

```
// file.d
struct Dependency {
        PathEntry* m_value;

        bool opEquals(in Dependency ) {
                return m_value == m_value;
        }
}

struct PathEntry {
        string m_name;
}
```

```
gdc -fpreview=in -freport-bug -fdebug -g -Werror -Wall file.d
```

results in errors

```
file.d:9:1: internal compiler error: in get_symbol_decl, at d/decl.cc:1210
    9 | struct PathEntry {
      | ^
0x1bceda4 internal_error(char const*, ...)
        ???:0
0x7bbfc5 fancy_abort(char const*, int, char const*)
        ???:0
0xa185b3 build_expr(Expression*, bool, bool)
        ???:0
0xa159da build_decl_tree(Dsymbol*)
        ???:0
0xa40ba0 build_module_tree(Module*)
        ???:0
0xa159da build_decl_tree(Dsymbol*)
        ???:0
Please submit a full bug report, with preprocessed source.
Please include the complete backtrace with any bug report.
See <https://bugs.archlinux.org/> for instructions.
```

possibly related to 112285

Reply via email to