[Bug c++/107033] [13 Regression] [modules] ICE using span as a range

2022-09-25 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107033

--- Comment #4 from Johel Ernesto Guerrero Peña  ---
This is actually Bug 106826.

Simplest: https://godbolt.org/z/oKT4x9r4G.

```C++
template constexpr bool is = false;
template constexpr bool is = true;
```

```C++
export module mod;
import "std.hpp";
static_assert(is);
```

```
mod.cpp:1:8: internal compiler error: Segmentation fault
1 | export module mod;
  |^~
0x234bd6e internal_error(char const*, ...)
???:0
0xc84cfe walk_specializations(bool, void (*)(bool, spec_entry*, void*), void*)
???:0
0xbead4c depset::hash::add_specializations(bool)
???:0
0xbfb5a8 module_state::write_begin(elf_out*, cpp_reader*, module_state_config&,
unsigned int&)
???:0
0xbfcd45 finish_module_processing(cpp_reader*)
???:0
0xb89d2e c_parse_final_cleanups()
???:0
0xdb0cc8 c_common_parse_file()
???:0
```

[Bug c++/107033] [13 Regression] [modules] ICE using span as a range

2022-09-25 Thread johelegp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107033

--- Comment #3 from Johel Ernesto Guerrero Peña  ---
Simplified: https://godbolt.org/z/3Ys316aeE.

```C++
export module mod;
import "std.hpp";
int x[2];
export auto _ = std::ranges::begin(x);
```