This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug debug/54971] SRA pessimizes debug info by not creating debug stmts for fields without replacements
- From: "jamborm at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 22 Oct 2012 14:55:35 +0000
- Subject: [Bug debug/54971] SRA pessimizes debug info by not creating debug stmts for fields without replacements
- Auto-submitted: auto-generated
- References: <bug-54971-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54971
--- Comment #4 from Martin Jambor <jamborm at gcc dot gnu.org> 2012-10-22 14:55:35 UTC ---
Unfortunately, the patch causes -fcompare-debug issues. The problem
is that with it we create some declarations only when producing debug
info which can affect UIDs which then changes other stuff.
I tried producing DEBUG_EXPR_DECLs instead of regular decls but
SET_DECL_DEBUG_EXPR does not accept DEBUG_EXPR_DECLs as an argument,
it insists on VAR_DECLs. I tried removing the checking restriction
but it turned out that using DEBUG_EXPR_DECLs does not fix the
testcase. Jakub, do you think that can be fixed or are
DEBUG_EXPR_DECLs a completely different thing that principally canno
be used for this purpose?
Another alternative is to build full-fledged replacement decls even
when not producing debug info, even though we'd never use it. That
seems slightly wasteful but can be done. (Some reworking of
replacement building would be probably required so that we get rid of
lazy replacement building which is no longer necessary).