This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/66432] libgomp.c/appendix-a/a.29.1.c -O2 -g: type mismatch between an SSA_NAME and its symbol


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

--- Comment #2 from vries at gcc dot gnu.org ---
At fnsplit, we split off f.part.0 from f.

That introduces a debug_insn and ssa-name that references param B in f:
...
  # DEBUG D#4ptD.0 => B_3(D)
..

And a debug_insn that references param B in f.part.0:
...
  # DEBUG D#7ptD.0 s=> BD.1846
...

At this point, the type of the ssa name and the param are the same.

Then at inline, we decide to inline f.part.0 back into the f.

For inlining, we rewrite the body of inlined function f.part.0. While rewriting
the debug insn mentioned above, we hit this code for param B:
...
      if (TREE_CODE (*tp) != OMP_CLAUSE)
        TREE_TYPE (*tp) = remap_type (TREE_TYPE (*tp), id);
...

And since it's a variable-sized type, the type of param is changed.

Now the type of the ssa name and the param are no longer the same, and a bit
later we hit the ICE.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]