* [Bug middle-end/64937] [5 Regression] compare debug failure with -fsanitize=address
2015-02-04 17:15 [Bug middle-end/64937] New: [5 Regression] compare debug failure with -fsanitize=address burnus at gcc dot gnu.org
@ 2015-02-04 17:56 ` burnus at gcc dot gnu.org
2015-02-04 21:11 ` jakub at gcc dot gnu.org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: burnus at gcc dot gnu.org @ 2015-02-04 17:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64937
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |5.0
--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> ---
That's with x86-64-gnu-linux. It already failed with r218247; I currently don't
plan to bisect it further.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/64937] [5 Regression] compare debug failure with -fsanitize=address
2015-02-04 17:15 [Bug middle-end/64937] New: [5 Regression] compare debug failure with -fsanitize=address burnus at gcc dot gnu.org
2015-02-04 17:56 ` [Bug middle-end/64937] " burnus at gcc dot gnu.org
@ 2015-02-04 21:11 ` jakub at gcc dot gnu.org
2015-02-05 11:16 ` jakub at gcc dot gnu.org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-02-04 21:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64937
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I'll have a look tomorrow.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/64937] [5 Regression] compare debug failure with -fsanitize=address
2015-02-04 17:15 [Bug middle-end/64937] New: [5 Regression] compare debug failure with -fsanitize=address burnus at gcc dot gnu.org
2015-02-04 17:56 ` [Bug middle-end/64937] " burnus at gcc dot gnu.org
2015-02-04 21:11 ` jakub at gcc dot gnu.org
@ 2015-02-05 11:16 ` jakub at gcc dot gnu.org
2015-02-05 12:00 ` jakub at gcc dot gnu.org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-02-05 11:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64937
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2015-02-05
Ever confirmed|0 |1
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Started with r212564.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/64937] [5 Regression] compare debug failure with -fsanitize=address
2015-02-04 17:15 [Bug middle-end/64937] New: [5 Regression] compare debug failure with -fsanitize=address burnus at gcc dot gnu.org
` (2 preceding siblings ...)
2015-02-05 11:16 ` jakub at gcc dot gnu.org
@ 2015-02-05 12:00 ` jakub at gcc dot gnu.org
2015-02-06 8:59 ` jakub at gcc dot gnu.org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-02-05 12:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64937
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |hubicka at gcc dot gnu.org
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I think the problem is that cgraph etc. uses the DECL_ABSTRACT_P flag, which is
set in two different places:
1) in the C++ FE
2) in dwarf2out
In the latter, it does:
was_abstract = DECL_ABSTRACT_P (decl);
set_decl_abstract_flags (decl, 1);
dwarf2out_decl (decl);
if (! was_abstract)
set_decl_abstract_flags (decl, 0);
So, if the decl was already abstract, it doesn't reset anything. But,
unfortunately, the set_decl_abstract_flags call is recursive, and not all the
vars in there necessary have DECL_ABSTRACT_P flag already set.
Thus, I think either we should make sure that when the C++ FE sets
DECL_ABSTRACT_P flag on something, it is always set on all the contained decls
too (but how to ensure this if we e.g. further decls are added in various
passes to those functions?), or we should change dwarf2out.c to reset it always
to the previous state, rather than sometimes clearing it (despite it might be
set already before) and sometimes setting it and not clearing it afterwards.
For the latter, guess we could just add a vec<tree> into which we'd push the
decls on which we set the flag, and reversion would be performed by walking the
vector and clearing DECL_ABSTRACT_P flags. I guess I'll try to implement the
dwarf2out.c change.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/64937] [5 Regression] compare debug failure with -fsanitize=address
2015-02-04 17:15 [Bug middle-end/64937] New: [5 Regression] compare debug failure with -fsanitize=address burnus at gcc dot gnu.org
` (3 preceding siblings ...)
2015-02-05 12:00 ` jakub at gcc dot gnu.org
@ 2015-02-06 8:59 ` jakub at gcc dot gnu.org
2015-02-06 18:27 ` jakub at gcc dot gnu.org
2015-02-06 18:32 ` jakub at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-02-06 8:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64937
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/64937] [5 Regression] compare debug failure with -fsanitize=address
2015-02-04 17:15 [Bug middle-end/64937] New: [5 Regression] compare debug failure with -fsanitize=address burnus at gcc dot gnu.org
` (4 preceding siblings ...)
2015-02-06 8:59 ` jakub at gcc dot gnu.org
@ 2015-02-06 18:27 ` jakub at gcc dot gnu.org
2015-02-06 18:32 ` jakub at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-02-06 18:27 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64937
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Fri Feb 6 18:26:59 2015
New Revision: 220483
URL: https://gcc.gnu.org/viewcvs?rev=220483&root=gcc&view=rev
Log:
PR middle-end/64937
* dwarf2out.c (set_block_abstract_flags, set_decl_abstract_flags):
Replace setting argument with abstract_vec, always set BLOCK_ABSTRACT
or DECL_ABSTRACT_P flags to 1 rather than to setting, and if it wasn't
1 before, push it to abstract_vec.
(dwarf2out_abstract_function): Adjust caller. Don't call
set_decl_abstract_flags second time, instead clear BLOCK_ABSTRACT or
DECL_ABSTRACT_P flags for all abstract_vec elts.
* g++.dg/asan/pr64937.C: New test.
Added:
trunk/gcc/testsuite/g++.dg/asan/pr64937.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/dwarf2out.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/64937] [5 Regression] compare debug failure with -fsanitize=address
2015-02-04 17:15 [Bug middle-end/64937] New: [5 Regression] compare debug failure with -fsanitize=address burnus at gcc dot gnu.org
` (5 preceding siblings ...)
2015-02-06 18:27 ` jakub at gcc dot gnu.org
@ 2015-02-06 18:32 ` jakub at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-02-06 18:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64937
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 8+ messages in thread