[Bug debug/94167] [8/9/10 Regression] pr71109.c -fcompare-debug failures on x86_64 and powerpc64le
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Mar 16 08:05:53 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94167
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:6d44c881286762628afce5169d921a388ae6a1ff
commit r10-7186-g6d44c881286762628afce5169d921a388ae6a1ff
Author: Jakub Jelinek <jakub@redhat.com>
Date: Mon Mar 16 09:03:59 2020 +0100
tree-inline: Fix a -fcompare-debug issue in the inliner [PR94167]
The following testcase fails with -fcompare-debug. The problem is that
bar is marked as address_taken only with -g and not without.
I've tracked it down to insert_init_stmt calling gimple_regimplify_operands
even on DEBUG_STMTs. That function will just insert normal stmts before
the DEBUG_STMT if the DEBUG_STMT operand isn't gimple val or invariant.
While DCE will turn those statements into debug temporaries, it can cause
differences in SSA_NAMEs and more importantly, the ipa references are
generated from those before the DCE happens.
On the testcase, the DEBUG_STMT value is (int)bar.
We could generate DEBUG_STMTs with debug temporaries instead, but I fail to
see the reason to do that, DEBUG_STMTs allow other expressions and all we
want to ensure is that the expressions aren't too large (arbitrarily
complex), but during inlining/function versioning I don't see why something
would queue a DEBUG_STMT with arbitrarily complex expressions in there.
2020-03-16 Jakub Jelinek <jakub@redhat.com>
PR debug/94167
* tree-inline.c (insert_init_stmt): Don't
gimple_regimplify_operands
DEBUG_STMTs.
* gcc.dg/pr94167.c: New test.
More information about the Gcc-bugs
mailing list