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

Johel Ernesto Guerrero Peña <johelegp at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[modules] ICE on function   |[modules] ICE on function
                   |result of imported type     |result of imported type
                   |with user-declared          |with user-declared
                   |constexpr destructor        |constexpr SMF

--- Comment #1 from Johel Ernesto Guerrero Peña <johelegp at gmail dot com> ---
See https://godbolt.org/z/T8591z1nT with copy constructor:

`mod.cpp`:
```C++
export module mod;

export struct X {
  bool b = true;
  X() = default;
  constexpr X(const X&) { }
};

export constexpr X id(X x) { return x; }
```

`test.cpp`:
```C++
import mod;
static_assert(id(X{}).b);
int main() { }
```

Output:
```
test.cpp:2:25:   in 'constexpr' expansion of 'id@mod(X@mod)()'
test.cpp:2:25: internal compiler error: in cxx_eval_call_expression, at
cp/constexpr.cc:2850
    2 | static_assert(id(X{}).b);
      |                         ^
0x230869e internal_error(char const*, ...)
        ???:0
0xa90716 fancy_abort(char const*, int, char const*)
        ???:0
0xaf60ac maybe_constant_value(tree_node*, tree_node*, bool)
        ???:0
0xce6baf finish_static_assert(tree_node*, tree_node*, unsigned int, bool, bool)
        ???:0
0xc66a77 c_parse_file()
        ???:0
0xda0269 c_common_parse_file()
        ???:0
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
```

Reply via email to