This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/66432] libgomp.c/appendix-a/a.29.1.c -O2 -g: type mismatch between an SSA_NAME and its symbol
- From: "vries at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 15 Jun 2015 09:55:21 +0000
- Subject: [Bug middle-end/66432] libgomp.c/appendix-a/a.29.1.c -O2 -g: type mismatch between an SSA_NAME and its symbol
- Auto-submitted: auto-generated
- References: <bug-66432-4 at http dot gcc dot gnu dot org/bugzilla/>
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.