This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/70594] [6 Regression] -fcompare-debug failure
- From: "ppalka at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 08 Apr 2016 15:11:43 +0000
- Subject: [Bug c++/70594] [6 Regression] -fcompare-debug failure
- Auto-submitted: auto-generated
- References: <bug-70594-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70594
--- Comment #5 from Patrick Palka <ppalka at gcc dot gnu.org> ---
(In reply to Tobias Burnus from comment #4)
> Created attachment 38225 [details]
> test.ii test case (g++ -O1 -fcompare-debug)
>
> (In reply to Jakub Jelinek from comment #1)
> > Without the testcase it is hard to guess.
>
> I now tried to compile LLVM with -fcompare-debug - and I guessed correctly,
> one of the files also fails there (lib/Support/CommandLine.cpp).
>
> I am not sure whether it is the same issue, but it is a debug miscompare.
> Contrary to my original file, it also fails when a .ii is generated with
> "-E"; additionally, it also fails already with -O1 and it reduced more
> readily (for my original example, it seemed to depend much more on the
> memory layout such that comment lines were kept).
>
> The somewhat reduced example is attached; it fails here (and hopefully
> elsewhere) using "g++ -O1 -fcompare-debug" with: "g++: error: test.ii:
> -fcompare-debug failure".
Same here. Some observations:
Reverting the portion of the patch that added the "deletable" GTY tag to
constexpr_call_table fixes the failure.
Making get_fundef_copy() to always allocate a new function (thus making it as
if the fundef_copies_table didn't exist) doesn't fix the failure.
So it seems that adding the "deletable" GTY tag to constexpr_call_table is
responsible for this regression, and not the new fundef_copies_table. Still
have no idea why or how though.