public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/100583] New: [modules] ICE when importing <span>
@ 2021-05-13 11:12 andreemalcher at gmail dot com
2021-09-27 2:28 ` [Bug c++/100583] " johelegp at gmail dot com
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: andreemalcher at gmail dot com @ 2021-05-13 11:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100583
Bug ID: 100583
Summary: [modules] ICE when importing <span>
Product: gcc
Version: 11.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: andreemalcher at gmail dot com
Target Milestone: ---
$ g++ --version
g++ (Ubuntu 11.1.0-1ubuntu1~18.04.1) 11.1.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ cat span.cpp
import <span>;
void foo() { std::span<int> s; }
$ g++ -fmodules-ts -std=c++20 -c -x c++-system-header span
$ g++ -fmodules-ts -std=c++20 -c span.cpp
In module /usr/include/c++/11/span, imported at span.cpp:1:
/usr/include/c++/11/span: In instantiation of ‘class std::span<int>’:
span.cpp:4:29: required from here
/usr/include/c++/11/span:155:9: internal compiler error: Segmentation fault
155 | span(_It __first, size_type __count)
| ^~~~
0x1702697 internal_error(char const*, ...)
???:0
0x7bfc52 instantiate_class_template(tree_node*)
???:0
0x7f17ab complete_type(tree_node*)
???:0
0x6af20b start_decl_1(tree_node*, bool)
???:0
0x6c1e0f start_decl(cp_declarator const*, cp_decl_specifier_seq*, int,
tree_node*, tree_node*, tree_node**)
???:0
0x7888ee c_parse_file()
???:0
0x85988d c_common_parse_file()
???:0
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <file:///usr/share/doc/gcc-11/README.Bugs> for instructions.
Even if import <span> is replaced with #include <span>, the sheer presence of
span.gcm leads to an ICE when compiled with -fmodules-ts. The solution is to
use the include and remove the gcm file altogether.But this means that there is
no way of importing <span> as a module.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/100583] [modules] ICE when importing <span>
2021-05-13 11:12 [Bug libstdc++/100583] New: [modules] ICE when importing <span> andreemalcher at gmail dot com
@ 2021-09-27 2:28 ` johelegp at gmail dot com
2021-09-28 15:54 ` redi at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: johelegp at gmail dot com @ 2021-09-27 2:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100583
--- Comment #1 from Johel Ernesto Guerrero Peña <johelegp at gmail dot com> ---
Please, add Bug 99227 to **Blocks:** for visibility.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/100583] [modules] ICE when importing <span>
2021-05-13 11:12 [Bug libstdc++/100583] New: [modules] ICE when importing <span> andreemalcher at gmail dot com
2021-09-27 2:28 ` [Bug c++/100583] " johelegp at gmail dot com
@ 2021-09-28 15:54 ` redi at gcc dot gnu.org
2021-10-03 15:11 ` johelegp at gmail dot com
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2021-09-28 15:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100583
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2021-09-28
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Johel Ernesto Guerrero Peña from comment #1)
> Please, add Bug 99227 to **Blocks:** for visibility.
Done
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/100583] [modules] ICE when importing <span>
2021-05-13 11:12 [Bug libstdc++/100583] New: [modules] ICE when importing <span> andreemalcher at gmail dot com
2021-09-27 2:28 ` [Bug c++/100583] " johelegp at gmail dot com
2021-09-28 15:54 ` redi at gcc dot gnu.org
@ 2021-10-03 15:11 ` johelegp at gmail dot com
2021-11-12 18:58 ` johelegp at gmail dot com
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: johelegp at gmail dot com @ 2021-10-03 15:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100583
--- Comment #3 from Johel Ernesto Guerrero Peña <johelegp at gmail dot com> ---
Thank you.
> The solution is to use the include and remove the gcm file altogether.
Is this still the case? I still get an ICE.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/100583] [modules] ICE when importing <span>
2021-05-13 11:12 [Bug libstdc++/100583] New: [modules] ICE when importing <span> andreemalcher at gmail dot com
` (2 preceding siblings ...)
2021-10-03 15:11 ` johelegp at gmail dot com
@ 2021-11-12 18:58 ` johelegp at gmail dot com
2022-02-13 14:16 ` johelegp at gmail dot com
2022-10-12 11:31 ` redi at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: johelegp at gmail dot com @ 2021-11-12 18:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100583
--- Comment #4 from Johel Ernesto Guerrero Peña <johelegp at gmail dot com> ---
As pointed out in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103118#c3:
> What works is including them in a non-module unit translation unit.
>
> ```C++
> #if defined(__GNUC__) and not defined(__clang__)
> # include <chrono> // Workaround GCC bug 103118.
> # include <span> // Workaround GCC bug 100583.
> #endif
> import waarudo.geometries;
> import waarudo.numbers;
> import waarudo.quantities;
> #include <cassert>
> ```
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/100583] [modules] ICE when importing <span>
2021-05-13 11:12 [Bug libstdc++/100583] New: [modules] ICE when importing <span> andreemalcher at gmail dot com
` (3 preceding siblings ...)
2021-11-12 18:58 ` johelegp at gmail dot com
@ 2022-02-13 14:16 ` johelegp at gmail dot com
2022-10-12 11:31 ` redi at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: johelegp at gmail dot com @ 2022-02-13 14:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100583
--- Comment #5 from Johel Ernesto Guerrero Peña <johelegp at gmail dot com> ---
This was fixed somewhere along the way.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/100583] [modules] ICE when importing <span>
2021-05-13 11:12 [Bug libstdc++/100583] New: [modules] ICE when importing <span> andreemalcher at gmail dot com
` (4 preceding siblings ...)
2022-02-13 14:16 ` johelegp at gmail dot com
@ 2022-10-12 11:31 ` redi at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2022-10-12 11:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100583
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |12.0
Status|NEW |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Fixed by commit r12-7133-g1ce5395977f37e
Date: Wed Feb 9 00:31:12 2022 -0500
c++: modules and explicit(bool) [PR103752]
We weren't streaming a C++20 dependent explicit-specifier.
PR c++/103752
gcc/cp/ChangeLog:
* module.cc (trees_out::core_vals): Stream explicit specifier.
(trees_in::core_vals): Likewise.
* pt.cc (store_explicit_specifier): No longer static.
(tsubst_function_decl): Clear DECL_HAS_DEPENDENT_EXPLICIT_SPEC_P.
* cp-tree.h (lookup_explicit_specifier): Declare.
*** This bug has been marked as a duplicate of bug 103752 ***
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-10-12 11:32 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-13 11:12 [Bug libstdc++/100583] New: [modules] ICE when importing <span> andreemalcher at gmail dot com
2021-09-27 2:28 ` [Bug c++/100583] " johelegp at gmail dot com
2021-09-28 15:54 ` redi at gcc dot gnu.org
2021-10-03 15:11 ` johelegp at gmail dot com
2021-11-12 18:58 ` johelegp at gmail dot com
2022-02-13 14:16 ` johelegp at gmail dot com
2022-10-12 11:31 ` redi 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).