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

Nathaniel Shead <nshead at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
                 CC|                            |nshead at gcc dot gnu.org
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2025-04-21

--- Comment #4 from Nathaniel Shead <nshead at gcc dot gnu.org> ---
I've submitted https://gcc.gnu.org/pipermail/gcc-patches/2025-April/681520.html
for the 15 regression with assembling OpenMP with modules.

When I try to build p1.cpp I get the following checking-only assertion:

p1.cpp:1:8: internal compiler error: in decl_node, at cp/module.cc:8994
    1 | export module p1;
      |        ^~~~~~
0x3ce0239 internal_error(char const*, ...)
        ../../gcc/gcc/diagnostic-global-context.cc:517
0x3caae44 fancy_abort(char const*, int, char const*)
        ../../gcc/gcc/diagnostic.cc:1749
0x1121112 decl_node
        ../../gcc/gcc/cp/module.cc:8994
0x1125e48 tree_node
        ../../gcc/gcc/cp/module.cc:9980
0x1115bcf core_vals
        ../../gcc/gcc/cp/module.cc:6410
0x111ab1a tree_node_vals
        ../../gcc/gcc/cp/module.cc:7683
0x1124ba1 tree_value
        ../../gcc/gcc/cp/module.cc:9673
0x1125e73 tree_node
        ../../gcc/gcc/cp/module.cc:9985
0x1116b20 core_vals
        ../../gcc/gcc/cp/module.cc:6628
0x111ab1a tree_node_vals
        ../../gcc/gcc/cp/module.cc:7683
0x1124ba1 tree_value
        ../../gcc/gcc/cp/module.cc:9673
0x1125e73 tree_node
        ../../gcc/gcc/cp/module.cc:9985
0x1115bcf core_vals
        ../../gcc/gcc/cp/module.cc:6410
0x111ab1a tree_node_vals
        ../../gcc/gcc/cp/module.cc:7683
0x1124ba1 tree_value
        ../../gcc/gcc/cp/module.cc:9673
0x1125e73 tree_node
        ../../gcc/gcc/cp/module.cc:9985
0x1134682 write_function_def
        ../../gcc/gcc/cp/module.cc:12619
0x113a67b write_definition
        ../../gcc/gcc/cp/module.cc:13499
0x1140945 depset::hash::find_dependencies(module_state*)
        ../../gcc/gcc/cp/module.cc:14821
0x1150cb5 module_state::write_begin(elf_out*, cpp_reader*,
module_state_config&, unsigned int&)
        ../../gcc/gcc/cp/module.cc:19716
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

The assertion is thrown when streaming the generated function "omp declare
reduction Op" because this is a DECL_LOCAL_DECL_P function but isn't on the
BLOCK of sum, so we didn't stream it by value when we were supposed to. 
Building with this checking assertion disabled I get the error described in #c0
(which makes sense because we failed to properly stream the definition of this
function), so confirmed.

Reply via email to