[Bug c++/97773] gcc crash after some noexcept magic

2020-11-10 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97773 --- Comment #15 from Jonathan Wakely --- (In reply to Martin Liška from comment #12) > Started to ICE with -std=c++17 since r6-3372-g378b307d0d7e789c. That's the commit that added C++17 fold expressions, but the ICE doesn't depend on fold expres

[Bug c++/97773] gcc crash after some noexcept magic

2020-11-10 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97773 Jonathan Wakely changed: What|Removed |Added Resolution|--- |DUPLICATE Status|NEW

[Bug c++/97773] gcc crash after some noexcept magic

2020-11-10 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97773 --- Comment #13 from Jonathan Wakely --- I think it's just a dup of PR 82099. Reduced further to only use C++14 template struct hash { int operator()(T) const noexcept { return 0; } }; template int hash_combine(T v) noexcept(noexcept(hash(

[Bug c++/97773] gcc crash after some noexcept magic

2020-11-10 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97773 --- Comment #12 from Martin Liška --- Started to ICE with -std=c++17 since r6-3372-g378b307d0d7e789c. Before that it was rejected: pr97773-2.C:30:40: error: expected primary-expression before ‘...’ token ((hash>()(v)), ...)))

[Bug c++/97773] gcc crash after some noexcept magic

2020-11-10 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97773 Jonathan Wakely changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill

[Bug c++/97773] gcc crash after some noexcept magic

2020-11-10 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97773 --- Comment #10 from Jonathan Wakely --- Reduced: using size_t = decltype(sizeof(0)); template struct remove_reference { using type = T; }; template struct remove_reference { using type = T; }; template struct remove_reference { using type = T;

[Bug c++/97773] gcc crash after some noexcept magic

2020-11-10 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97773 --- Comment #9 from Jonathan Wakely --- (In reply to Jonathan Wakely from comment #7) > N.B. your program has undefined behaviour. Specializing std::hash for > standard library types is forbidden. GCC shouldn't crash though. Oh, you didn't! I mi

[Bug c++/97773] gcc crash after some noexcept magic

2020-11-10 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97773 --- Comment #7 from Jonathan Wakely --- N.B. your program has undefined behaviour. Specializing std::hash for standard library types is forbidden. GCC shouldn't crash though.

[Bug c++/97773] gcc crash after some noexcept magic

2020-11-10 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97773 --- Comment #8 from Jonathan Wakely --- (In reply to Janez Zemva from comment #6) > try -std=c++20 ? Which is why the instructions at https://gcc.gnu.org/bugs clearly say you need to provide the options used.

[Bug c++/97773] gcc crash after some noexcept magic

2020-11-10 Thread janezz55 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97773 --- Comment #6 from Janez Zemva --- try -std=c++20 ?

[Bug c++/97773] gcc crash after some noexcept magic

2020-11-10 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97773 Martin Liška changed: What|Removed |Added CC||marxin at gcc dot gnu.org --- Comment #5

[Bug c++/97773] gcc crash after some noexcept magic

2020-11-10 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97773 Jonathan Wakely changed: What|Removed |Added Keywords||ice-on-valid-code Status|W

[Bug c++/97773] gcc crash after some noexcept magic

2020-11-10 Thread janezz55 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97773 --- Comment #3 from Janez Zemva --- Created attachment 49535 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49535&action=edit bug

[Bug c++/97773] gcc crash after some noexcept magic

2020-11-10 Thread janezz55 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97773 --- Comment #2 from Janez Zemva --- #include #include #include #include #include #include template struct hash : std::hash { }; template <> struct hash { auto operator()(std::chrono::seconds const cp) const noexcept { return

[Bug c++/97773] gcc crash after some noexcept magic

2020-11-10 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97773 Jonathan Wakely changed: What|Removed |Added Last reconfirmed||2020-11-10 Ever confirmed|0