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

            Bug ID: 93173
           Summary: "error: incorrect sharing of tree nodes" and "internal
                    compiler error: verify_gimple failed"
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sbergman at redhat dot com
  Target Milestone: ---

I think this only started recently on GCC trunk, I observe it at least with a
build based on today's 62a72308e1c5479bb3a9e8cacd45d49db219aaec "New bitfield
testcases":

> $ cat test.cc
> template<typename> struct S1 {
>   S1(S1 &);
>   ~S1();
> };
> struct S2 {
>   S1<void> x;
>   int y;
>   int z;
> };
> void f(S1<void> x, int y, int z) { new S2{x, y, z}; }

> $ g++ -c test.cc
> test.cc: In function ‘void f(S1<void>, int, int)’:
> test.cc:10:6: error: incorrect sharing of tree nodes
>    10 | void f(S1<void> x, int y, int z) { new S2{x, y, z}; }
>       |      ^
> MEM[(struct S2 *)D.2374]
> MEM[(struct S2 *)D.2374].z = z;
> during GIMPLE pass: cfg
> test.cc:10:6: internal compiler error: verify_gimple failed
> 0xfda96a verify_gimple_in_cfg(function*, bool)
>       ../../src/gcc/tree-cfg.c:5445
> 0xec1caf execute_function_todo
>       ../../src/gcc/passes.c:1983
> 0xec2aec do_per_function
>       ../../src/gcc/passes.c:1638
> 0xec2aec execute_todo
>       ../../src/gcc/passes.c:2037
> 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.

(I assume this is a different issue than open issue 93033, given my build
includes b5cabe5e4b2778223d7a910ac3a5bbd61bff007c "PR c++/93033 - incorrect
tree node sharing with array init.")

Reply via email to