public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug c++/99187] New: C++ ICE compiling modules with third party library @ 2021-02-21 22:35 vision05.dev at gmail dot com 2021-02-21 22:43 ` [Bug c++/99187] " vision05.dev at gmail dot com ` (5 more replies) 0 siblings, 6 replies; 7+ messages in thread From: vision05.dev at gmail dot com @ 2021-02-21 22:35 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99187 Bug ID: 99187 Summary: C++ ICE compiling modules with third party library Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: vision05.dev at gmail dot com Target Milestone: --- (compiler spew) gcc -v: Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-pc-linux-gnu/11.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../gcc/configure Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 11.0.0 20210220 (experimental) (GCC) When exporting a function in a module, where the function has an immer::vector<T> (from the immer immutable data structures library) declared or instantiated inside the function body the ICE is produced. The file compiles correctly when the vector is not declared. Command passed to cause the ICE: g++ -fmodules-ts bug.cpp -I/usr/include/c++/10.2.0/immer-0.6.2/ bug.cpp:5:9: internal compiler error: in tree_node, at cp/module.cc:9153 5 | export module bug; | ^~~~~~ 0x69ccde trees_out::tree_node(tree_node*) ../../gcc/gcc/cp/module.cc:9153 0xa16ed9 trees_out::core_vals(tree_node*) ../../gcc/gcc/cp/module.cc:6023 0xa1a2e4 trees_out::tree_node_vals(tree_node*) ../../gcc/gcc/cp/module.cc:7164 0xa1a2e4 trees_out::tree_value(tree_node*) ../../gcc/gcc/cp/module.cc:8984 0xa16374 trees_out::tree_node(tree_node*) ../../gcc/gcc/cp/module.cc:9182 0xa16ed9 trees_out::core_vals(tree_node*) ../../gcc/gcc/cp/module.cc:6023 0xa1a2e4 trees_out::tree_node_vals(tree_node*) ../../gcc/gcc/cp/module.cc:7164 0xa1a2e4 trees_out::tree_value(tree_node*) ../../gcc/gcc/cp/module.cc:8984 0xa16374 trees_out::tree_node(tree_node*) ../../gcc/gcc/cp/module.cc:9182 0xa16ed9 trees_out::core_vals(tree_node*) ../../gcc/gcc/cp/module.cc:6023 0xa1a2e4 trees_out::tree_node_vals(tree_node*) ../../gcc/gcc/cp/module.cc:7164 0xa1a2e4 trees_out::tree_value(tree_node*) ../../gcc/gcc/cp/module.cc:8984 0xa16374 trees_out::tree_node(tree_node*) ../../gcc/gcc/cp/module.cc:9182 0xa16ed9 trees_out::core_vals(tree_node*) ../../gcc/gcc/cp/module.cc:6023 0xa1a2e4 trees_out::tree_node_vals(tree_node*) ../../gcc/gcc/cp/module.cc:7164 0xa1a2e4 trees_out::tree_value(tree_node*) ../../gcc/gcc/cp/module.cc:8984 0xa16374 trees_out::tree_node(tree_node*) ../../gcc/gcc/cp/module.cc:9182 0xa16ed9 trees_out::core_vals(tree_node*) ../../gcc/gcc/cp/module.cc:6023 0xa1a2e4 trees_out::tree_node_vals(tree_node*) ../../gcc/gcc/cp/module.cc:7164 0xa1a2e4 trees_out::tree_value(tree_node*) ../../gcc/gcc/cp/module.cc:8984 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] 7+ messages in thread
* [Bug c++/99187] C++ ICE compiling modules with third party library 2021-02-21 22:35 [Bug c++/99187] New: C++ ICE compiling modules with third party library vision05.dev at gmail dot com @ 2021-02-21 22:43 ` vision05.dev at gmail dot com 2022-10-20 19:14 ` [Bug c++/99187] [modules] ICE exporting thread_local static local variable ppalka at gcc dot gnu.org ` (4 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: vision05.dev at gmail dot com @ 2021-02-21 22:43 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99187 --- Comment #1 from Tim F <vision05.dev at gmail dot com> --- https://gist.github.com/vision-05/b3970c94b11c45fe68207902e4b464fa Link to file as it was too large to upload (1.8mb) ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/99187] [modules] ICE exporting thread_local static local variable 2021-02-21 22:35 [Bug c++/99187] New: C++ ICE compiling modules with third party library vision05.dev at gmail dot com 2021-02-21 22:43 ` [Bug c++/99187] " vision05.dev at gmail dot com @ 2022-10-20 19:14 ` ppalka at gcc dot gnu.org 2023-04-26 6:55 ` rguenth at gcc dot gnu.org ` (3 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: ppalka at gcc dot gnu.org @ 2022-10-20 19:14 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99187 Patrick Palka <ppalka at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|unassigned at gcc dot gnu.org |ppalka at gcc dot gnu.org CC| |ppalka at gcc dot gnu.org Last reconfirmed| |2022-10-20 Status|UNCONFIRMED |ASSIGNED Summary|C++ ICE compiling modules |[modules] ICE exporting |with third party library |thread_local static local | |variable Target Milestone|--- |13.0 Ever confirmed|0 |1 --- Comment #2 from Patrick Palka <ppalka at gcc dot gnu.org> --- Reduced: export module foo; struct A { ~A() { } }; export inline void f() { static thread_local A a; } ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/99187] [modules] ICE exporting thread_local static local variable 2021-02-21 22:35 [Bug c++/99187] New: C++ ICE compiling modules with third party library vision05.dev at gmail dot com 2021-02-21 22:43 ` [Bug c++/99187] " vision05.dev at gmail dot com 2022-10-20 19:14 ` [Bug c++/99187] [modules] ICE exporting thread_local static local variable ppalka at gcc dot gnu.org @ 2023-04-26 6:55 ` rguenth at gcc dot gnu.org 2023-07-27 9:22 ` rguenth at gcc dot gnu.org ` (2 subsequent siblings) 5 siblings, 0 replies; 7+ messages in thread From: rguenth at gcc dot gnu.org @ 2023-04-26 6:55 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99187 Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|13.0 |13.2 --- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> --- GCC 13.1 is being released, retargeting bugs to GCC 13.2. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/99187] [modules] ICE exporting thread_local static local variable 2021-02-21 22:35 [Bug c++/99187] New: C++ ICE compiling modules with third party library vision05.dev at gmail dot com ` (2 preceding siblings ...) 2023-04-26 6:55 ` rguenth at gcc dot gnu.org @ 2023-07-27 9:22 ` rguenth at gcc dot gnu.org 2023-11-19 21:44 ` cvs-commit at gcc dot gnu.org 2024-01-09 16:27 ` ppalka at gcc dot gnu.org 5 siblings, 0 replies; 7+ messages in thread From: rguenth at gcc dot gnu.org @ 2023-07-27 9:22 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99187 Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|13.2 |13.3 --- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> --- GCC 13.2 is being released, retargeting bugs to GCC 13.3. ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/99187] [modules] ICE exporting thread_local static local variable 2021-02-21 22:35 [Bug c++/99187] New: C++ ICE compiling modules with third party library vision05.dev at gmail dot com ` (3 preceding siblings ...) 2023-07-27 9:22 ` rguenth at gcc dot gnu.org @ 2023-11-19 21:44 ` cvs-commit at gcc dot gnu.org 2024-01-09 16:27 ` ppalka at gcc dot gnu.org 5 siblings, 0 replies; 7+ messages in thread From: cvs-commit at gcc dot gnu.org @ 2023-11-19 21:44 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99187 --- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Nathan Sidwell <nathan@gcc.gnu.org>: https://gcc.gnu.org/g:eaeaad3fcac4d7a30b5a256410cb59fa1a3fa9dd commit r14-5598-geaeaad3fcac4d7a30b5a256410cb59fa1a3fa9dd Author: Nathaniel Shead <nathanieloshead@gmail.com> Date: Fri Nov 17 08:39:53 2023 +1100 c++: Set DECL_CONTEXT for __cxa_thread_atexit [PR99187] Modules streaming requires DECL_CONTEXT to be set on declarations that are streamed. This ensures that __cxa_thread_atexit is given translation unit context much like is already done with many other support functions. PR c++/99187 gcc/cp/ChangeLog: * cp-tree.h (enum cp_tree_index): Add CPTI_THREAD_ATEXIT. (thread_atexit_node): New. * decl.cc (get_thread_atexit_node): Cache in thread_atexit_node. gcc/testsuite/ChangeLog: * g++.dg/modules/pr99187.C: New test. Signed-off-by: Nathaniel Shead <nathanieloshead@gmail.com> Signed-off-by: Nathan Sidwell <nathan@acm.org> ^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/99187] [modules] ICE exporting thread_local static local variable 2021-02-21 22:35 [Bug c++/99187] New: C++ ICE compiling modules with third party library vision05.dev at gmail dot com ` (4 preceding siblings ...) 2023-11-19 21:44 ` cvs-commit at gcc dot gnu.org @ 2024-01-09 16:27 ` ppalka at gcc dot gnu.org 5 siblings, 0 replies; 7+ messages in thread From: ppalka at gcc dot gnu.org @ 2024-01-09 16:27 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99187 Patrick Palka <ppalka at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|ppalka at gcc dot gnu.org |nathanieloshead at gmail dot com Target Milestone|13.3 |14.0 Resolution|--- |FIXED Status|ASSIGNED |RESOLVED --- Comment #6 from Patrick Palka <ppalka at gcc dot gnu.org> --- Thus fixed for GCC 14, thanks! ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-01-09 16:27 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-02-21 22:35 [Bug c++/99187] New: C++ ICE compiling modules with third party library vision05.dev at gmail dot com 2021-02-21 22:43 ` [Bug c++/99187] " vision05.dev at gmail dot com 2022-10-20 19:14 ` [Bug c++/99187] [modules] ICE exporting thread_local static local variable ppalka at gcc dot gnu.org 2023-04-26 6:55 ` rguenth at gcc dot gnu.org 2023-07-27 9:22 ` rguenth at gcc dot gnu.org 2023-11-19 21:44 ` cvs-commit at gcc dot gnu.org 2024-01-09 16:27 ` 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).