public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/104564] New: '-fcompare-debug' failure w/ -std=c++20 -O1 -fharden-conditional-branches -fopenacc -gno-statement-frontiers
@ 2022-02-16 11:15 asolokha at gmx dot com
2022-02-16 11:17 ` [Bug debug/104564] " asolokha at gmx dot com
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: asolokha at gmx dot com @ 2022-02-16 11:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104564
Bug ID: 104564
Summary: '-fcompare-debug' failure w/ -std=c++20 -O1
-fharden-conditional-branches -fopenacc
-gno-statement-frontiers
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Keywords: compare-debug-failure
Severity: normal
Priority: P3
Component: debug
Assignee: unassigned at gcc dot gnu.org
Reporter: asolokha at gmx dot com
Target Milestone: ---
Target: aarch64-linux-gnu
gcc 12.0.1 20220213 snapshot (g:58aeb75d4097010ad9bb72b964265b18ab284f93) fails
-fcompare-debug check when compiling the following testcase, partially reduced
from libstdc++-v3/testsuite/25_algorithms/inplace_merge/1.cc, w/ -std=c++20 -O1
-fharden-conditional-branches -fopenacc -gno-statement-frontiers:
#include <algorithm>
#include <testsuite_iterators.h>
typedef
__gnu_test::test_container<int, __gnu_test::bidirectional_iterator_wrapper>
container;
void test1() {
int array[] = {};
container con2(array, array);
std::inplace_merge(con2.begin(), con2.begin(), con2.end());
}
% aarch64-linux-gnu-g++-12.0.1 -std=c++20 -O1 -fcompare-debug
-fharden-conditional-branches -fopenacc -gno-statement-frontiers -c bdxhor92.cc
aarch64-linux-gnu-g++-12.0.1: error: bdxhor92.cc: '-fcompare-debug' failure
It is very fragile, even adding -save-temps makes the failure disappear, so I
could not reduce it any further. If I get the dumps right, the difference
starts in einline.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug debug/104564] '-fcompare-debug' failure w/ -std=c++20 -O1 -fharden-conditional-branches -fopenacc -gno-statement-frontiers
2022-02-16 11:15 [Bug debug/104564] New: '-fcompare-debug' failure w/ -std=c++20 -O1 -fharden-conditional-branches -fopenacc -gno-statement-frontiers asolokha at gmx dot com
@ 2022-02-16 11:17 ` asolokha at gmx dot com
2022-03-24 2:46 ` aoliva at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: asolokha at gmx dot com @ 2022-02-16 11:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104564
--- Comment #1 from Arseny Solokha <asolokha at gmx dot com> ---
#include <testsuite_iterators.h>
is from -Ilibstdc++-v3/testsuite/util, if invoking g++ from the top of the
source tree.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug debug/104564] '-fcompare-debug' failure w/ -std=c++20 -O1 -fharden-conditional-branches -fopenacc -gno-statement-frontiers
2022-02-16 11:15 [Bug debug/104564] New: '-fcompare-debug' failure w/ -std=c++20 -O1 -fharden-conditional-branches -fopenacc -gno-statement-frontiers asolokha at gmx dot com
2022-02-16 11:17 ` [Bug debug/104564] " asolokha at gmx dot com
@ 2022-03-24 2:46 ` aoliva at gcc dot gnu.org
2022-03-24 13:10 ` cvs-commit at gcc dot gnu.org
2022-03-24 13:19 ` aoliva at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: aoliva at gcc dot gnu.org @ 2022-03-24 2:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104564
Alexandre Oliva <aoliva at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2022-03-24
Status|UNCONFIRMED |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |aoliva at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #2 from Alexandre Oliva <aoliva at gcc dot gnu.org> ---
Created attachment 52677
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52677&action=edit
Candidate patch
Mine. Looks like it's the copied identifiers that get -fcompare-debug to fail.
We don't need them, and without them, the failure is gone.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug debug/104564] '-fcompare-debug' failure w/ -std=c++20 -O1 -fharden-conditional-branches -fopenacc -gno-statement-frontiers
2022-02-16 11:15 [Bug debug/104564] New: '-fcompare-debug' failure w/ -std=c++20 -O1 -fharden-conditional-branches -fopenacc -gno-statement-frontiers asolokha at gmx dot com
2022-02-16 11:17 ` [Bug debug/104564] " asolokha at gmx dot com
2022-03-24 2:46 ` aoliva at gcc dot gnu.org
@ 2022-03-24 13:10 ` cvs-commit at gcc dot gnu.org
2022-03-24 13:19 ` aoliva at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-03-24 13:10 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104564
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Alexandre Oliva <aoliva@gcc.gnu.org>:
https://gcc.gnu.org/g:fb488cba571539b6644e8f99f1dd997cdb4c82c1
commit r12-7801-gfb488cba571539b6644e8f99f1dd997cdb4c82c1
Author: Alexandre Oliva <oliva@adacore.com>
Date: Thu Mar 24 10:02:29 2022 -0300
hardened conditionals: drop copied identifiers
The copies of identifiers, indended to associate hardening SSA
temporaries to the original variables they refer to, end up causing
-fcompare-debug to fail, because DECL_UIDs are not identical, and the
nouid flag used in compare-debug dumps doesn't affect the uids in
naked identifiers, so the divergence becomes apparent.
This patch drops the naked identifiers. Though somewhat desirable,
they're not necessary.
for gcc/ChangeLog
PR debug/104564
* gimple-harden-conditionals.cc (detach_value): Keep temps
anonymous.
for gcc/testsuite/ChangeLog
PR debug/104564
* c-c++-common/torture/harden-comp.c: Adjust.
* c-c++-common/torture/harden-cond.c: Adjust.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug debug/104564] '-fcompare-debug' failure w/ -std=c++20 -O1 -fharden-conditional-branches -fopenacc -gno-statement-frontiers
2022-02-16 11:15 [Bug debug/104564] New: '-fcompare-debug' failure w/ -std=c++20 -O1 -fharden-conditional-branches -fopenacc -gno-statement-frontiers asolokha at gmx dot com
` (2 preceding siblings ...)
2022-03-24 13:10 ` cvs-commit at gcc dot gnu.org
@ 2022-03-24 13:19 ` aoliva at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: aoliva at gcc dot gnu.org @ 2022-03-24 13:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104564
Alexandre Oliva <aoliva at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #4 from Alexandre Oliva <aoliva at gcc dot gnu.org> ---
Fixed
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-03-24 13:19 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-16 11:15 [Bug debug/104564] New: '-fcompare-debug' failure w/ -std=c++20 -O1 -fharden-conditional-branches -fopenacc -gno-statement-frontiers asolokha at gmx dot com
2022-02-16 11:17 ` [Bug debug/104564] " asolokha at gmx dot com
2022-03-24 2:46 ` aoliva at gcc dot gnu.org
2022-03-24 13:10 ` cvs-commit at gcc dot gnu.org
2022-03-24 13:19 ` aoliva at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).