public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/98363] New: C++ 20 module ICE for fast_io library
@ 2020-12-17 23:06 unlvsur at live dot com
  2020-12-17 23:07 ` [Bug c++/98363] " unlvsur at live dot com
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: unlvsur at live dot com @ 2020-12-17 23:06 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 98363
           Summary: C++ 20 module ICE for fast_io library
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: unlvsur at live dot com
  Target Milestone: ---

g++ -c hello.cc -Ofast -std=c++20 -s -fmodules-ts -flto

hello.cc
module;
#include<fast_io.h>
export module hello;
export inline void greeter (std::string_view name) noexcept
{
        print(name);
}


cqwrteur@Home-Server:~/myhome/test_module$ g++ -c hello.cc -Ofast -std=c++20 -s
-fmodules-ts -flto
hello.cc:3:8: internal compiler error: Segmentation fault
    3 | export module hello;
      |        ^~~~~~
0x10b2b4f crash_signal
        ../../gcc/gcc/toplev.c:327
0x9fe347 has_definition
        ../../gcc/gcc/cp/module.cc:11361
0xa104a7 depset::hash::make_dependency(tree_node*, depset::entity_kind)
        ../../gcc/gcc/cp/module.cc:12531
0xa10b84 depset::hash::add_dependency(tree_node*, depset::entity_kind)
        ../../gcc/gcc/cp/module.cc:12669
0xa17bda trees_out::decl_node(tree_node*, walk_kind)
        ../../gcc/gcc/cp/module.cc:8569
0xa18342 trees_out::tree_node(tree_node*)
        ../../gcc/gcc/cp/module.cc:9132
0xa1ac96 trees_out::tpl_parms_fini(tree_node*, unsigned int)
        ../../gcc/gcc/cp/module.cc:9888
0xa16603 trees_out::decl_value(tree_node*, depset*)
        ../../gcc/gcc/cp/module.cc:7742
0xa1e16b depset::hash::find_dependencies()
        ../../gcc/gcc/cp/module.cc:13181
0xa1e7c4 module_state::write(elf_out*, cpp_reader*)
        ../../gcc/gcc/cp/module.cc:17550
0xa1fa55 finish_module_processing(cpp_reader*)
        ../../gcc/gcc/cp/module.cc:19728
0x9b41eb c_parse_final_cleanups()
        ../../gcc/gcc/cp/decl2.c:5170
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c++/98363] C++ 20 module ICE for fast_io library
  2020-12-17 23:06 [Bug c++/98363] New: C++ 20 module ICE for fast_io library unlvsur at live dot com
@ 2020-12-17 23:07 ` unlvsur at live dot com
  2020-12-18  9:01 ` marxin at gcc dot gnu.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: unlvsur at live dot com @ 2020-12-17 23:07 UTC (permalink / raw)
  To: gcc-bugs

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

cqwrteur <unlvsur at live dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |unlvsur at live dot com

--- Comment #1 from cqwrteur <unlvsur at live dot com> ---
Created attachment 49790
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49790&action=edit
Preprocessor file

This is the preprocessor file. (fast_io is a header-only library)

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c++/98363] C++ 20 module ICE for fast_io library
  2020-12-17 23:06 [Bug c++/98363] New: C++ 20 module ICE for fast_io library unlvsur at live dot com
  2020-12-17 23:07 ` [Bug c++/98363] " unlvsur at live dot com
@ 2020-12-18  9:01 ` marxin at gcc dot gnu.org
  2020-12-18  9:52 ` marxin at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-12-18  9:01 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marxin at gcc dot gnu.org
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2020-12-18
           Keywords|                            |needs-bisection,
                   |                            |needs-reduction
             Status|UNCONFIRMED                 |NEW

--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
I'm reducing that right now..

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c++/98363] C++ 20 module ICE for fast_io library
  2020-12-17 23:06 [Bug c++/98363] New: C++ 20 module ICE for fast_io library unlvsur at live dot com
  2020-12-17 23:07 ` [Bug c++/98363] " unlvsur at live dot com
  2020-12-18  9:01 ` marxin at gcc dot gnu.org
@ 2020-12-18  9:52 ` marxin at gcc dot gnu.org
  2020-12-18 12:45 ` nathan at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-12-18  9:52 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|needs-bisection,            |
                   |needs-reduction             |

--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
Reduced test-case:

cat pr98363.C
module;
# 1 "" 1
template <typename _Derived, typename _Base>
concept derived_from = __is_base_of(_Base, _Derived);
namespace ranges {
int swap;
}
template <typename> concept swappable = requires { ranges::swap; };
template <typename _Tp> concept movable = swappable<_Tp>;
namespace __detail {
template <typename _Tp, typename>
concept __weakly_eq_cmp_with = requires(_Tp __t) {
  __t;
};
} // namespace __detail
template <typename> struct iterator_traits;
struct input_iterator_tag;
namespace __detail {
template <typename _Iter> using __iter_concept = _Iter;
}
template <typename _Iter> concept weakly_incrementable = movable<_Iter>;
template <typename _Iter>
concept input_or_output_iterator = weakly_incrementable<_Iter>;
template <typename _Sent, typename _Iter>
concept sentinel_for = __detail::__weakly_eq_cmp_with<_Sent, _Iter>;
template <typename _Iter>
concept input_iterator =
    derived_from<__detail::__iter_concept<_Iter>, input_iterator_tag>;
template <typename> struct iterator;
template <typename _Iterator>
class reverse_iterator
    : iterator<typename iterator_traits<_Iterator>::value_type> {};
template <input_or_output_iterator _It, sentinel_for<_It>>
class common_iterator;
template <input_iterator _It, typename _Sent>
struct iterator_traits<common_iterator<_It, _Sent>>;
class basic_string_view {
  using value_type = int;
  using const_iterator = value_type;
  using const_reverse_iterator = reverse_iterator<const_iterator>;
};
# 3 "" 2
export module hello;
void greeter(basic_string_view);

Started with r11-6084-g4efde6781bba8d64.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c++/98363] C++ 20 module ICE for fast_io library
  2020-12-17 23:06 [Bug c++/98363] New: C++ 20 module ICE for fast_io library unlvsur at live dot com
                   ` (2 preceding siblings ...)
  2020-12-18  9:52 ` marxin at gcc dot gnu.org
@ 2020-12-18 12:45 ` nathan at gcc dot gnu.org
  2020-12-18 15:04 ` unlvsur at live dot com
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: nathan at gcc dot gnu.org @ 2020-12-18 12:45 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Nathan Sidwell <nathan at gcc dot gnu.org> ---
FWIW I think it premature to start agressively filing these kinds of defects. 
We haven't added the module testsuite yet.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c++/98363] C++ 20 module ICE for fast_io library
  2020-12-17 23:06 [Bug c++/98363] New: C++ 20 module ICE for fast_io library unlvsur at live dot com
                   ` (3 preceding siblings ...)
  2020-12-18 12:45 ` nathan at gcc dot gnu.org
@ 2020-12-18 15:04 ` unlvsur at live dot com
  2020-12-19  2:59 ` unlvsur at live dot com
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: unlvsur at live dot com @ 2020-12-18 15:04 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from cqwrteur <unlvsur at live dot com> ---
(In reply to Nathan Sidwell from comment #4)
> FWIW I think it premature to start agressively filing these kinds of
> defects.  We haven't added the module testsuite yet.

No problem. I will keep helping you. I use GCC heavily on both windows and
linux and my library is built with full of C++20 features, including concepts,
coroutines, ranges, etc. I think I can help a lot on supporting modules on
Windows.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c++/98363] C++ 20 module ICE for fast_io library
  2020-12-17 23:06 [Bug c++/98363] New: C++ 20 module ICE for fast_io library unlvsur at live dot com
                   ` (4 preceding siblings ...)
  2020-12-18 15:04 ` unlvsur at live dot com
@ 2020-12-19  2:59 ` unlvsur at live dot com
  2024-01-08 17:39 ` ppalka at gcc dot gnu.org
  2024-01-08 17:40 ` ppalka at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: unlvsur at live dot com @ 2020-12-19  2:59 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from cqwrteur <unlvsur at live dot com> ---
(In reply to Nathan Sidwell from comment #4)
> FWIW I think it premature to start agressively filing these kinds of
> defects.  We haven't added the module testsuite yet.

Same issue on Windows. Looks like modules have not yet worked very well with
concepts.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c++/98363] C++ 20 module ICE for fast_io library
  2020-12-17 23:06 [Bug c++/98363] New: C++ 20 module ICE for fast_io library unlvsur at live dot com
                   ` (5 preceding siblings ...)
  2020-12-19  2:59 ` unlvsur at live dot com
@ 2024-01-08 17:39 ` ppalka at gcc dot gnu.org
  2024-01-08 17:40 ` ppalka at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: ppalka at gcc dot gnu.org @ 2024-01-08 17:39 UTC (permalink / raw)
  To: gcc-bugs

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

Patrick Palka <ppalka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|---                         |11.0
                 CC|                            |ppalka at gcc dot gnu.org

--- Comment #7 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Seems this has long been fixed by r11-6308

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c++/98363] C++ 20 module ICE for fast_io library
  2020-12-17 23:06 [Bug c++/98363] New: C++ 20 module ICE for fast_io library unlvsur at live dot com
                   ` (6 preceding siblings ...)
  2024-01-08 17:39 ` ppalka at gcc dot gnu.org
@ 2024-01-08 17:40 ` ppalka at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: ppalka at gcc dot gnu.org @ 2024-01-08 17:40 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Patrick Palka <ppalka at gcc dot gnu.org> ---
(In reply to Patrick Palka from comment #7)
> Seems this has long been fixed by r11-6308
oops, r11-6309 rather

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-01-08 17:40 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-17 23:06 [Bug c++/98363] New: C++ 20 module ICE for fast_io library unlvsur at live dot com
2020-12-17 23:07 ` [Bug c++/98363] " unlvsur at live dot com
2020-12-18  9:01 ` marxin at gcc dot gnu.org
2020-12-18  9:52 ` marxin at gcc dot gnu.org
2020-12-18 12:45 ` nathan at gcc dot gnu.org
2020-12-18 15:04 ` unlvsur at live dot com
2020-12-19  2:59 ` unlvsur at live dot com
2024-01-08 17:39 ` ppalka at gcc dot gnu.org
2024-01-08 17:40 ` ppalka at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).