public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/63300] New: 'const volatile' sometimes stripped in debug info
@ 2014-09-18 16:07 arnez at linux dot vnet.ibm.com
2014-09-19 17:46 ` [Bug debug/63300] " mark at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: arnez at linux dot vnet.ibm.com @ 2014-09-18 16:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63300
Bug ID: 63300
Summary: 'const volatile' sometimes stripped in debug info
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: debug
Assignee: unassigned at gcc dot gnu.org
Reporter: arnez at linux dot vnet.ibm.com
With current upstream gcc, the following commands do not yield the expected
output:
echo 'void f (const volatile int x) { }' | gcc -xc -c -g -o foo.o -
readelf -wi foo.o | grep 'volatile\|const'
With an older gcc we get something like this:
<1><54>: Abbrev Number: 4 (DW_TAG_const_type)
<1><59>: Abbrev Number: 5 (DW_TAG_volatile_type)
With the current gcc we get nothing. Indeed, the resulting debug info declares
the parameter 'x' merely as an 'int' instead of 'const volatile int'.
The same happens with some other combinations as well, e.g.:
char *const volatile x
const volatile float x
const volatile int *x
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug debug/63300] 'const volatile' sometimes stripped in debug info
2014-09-18 16:07 [Bug debug/63300] New: 'const volatile' sometimes stripped in debug info arnez at linux dot vnet.ibm.com
@ 2014-09-19 17:46 ` mark at gcc dot gnu.org
2014-09-22 7:18 ` mark at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: mark at gcc dot gnu.org @ 2014-09-19 17:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63300
--- Comment #2 from Mark Wielaard <mark at gcc dot gnu.org> ---
Sorry about that. I added an explicit testcases
(gcc/testsuite/gcc.dg/guality/const-volatile.c and
gcc/testsuite/gcc.dg/guality/restrict.c) explicitly to catch such issue. But
apparently they didn't trigger this particular case.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug debug/63300] 'const volatile' sometimes stripped in debug info
2014-09-18 16:07 [Bug debug/63300] New: 'const volatile' sometimes stripped in debug info arnez at linux dot vnet.ibm.com
2014-09-19 17:46 ` [Bug debug/63300] " mark at gcc dot gnu.org
@ 2014-09-22 7:18 ` mark at gcc dot gnu.org
2014-09-25 7:38 ` krebbel at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: mark at gcc dot gnu.org @ 2014-09-22 7:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63300
Mark Wielaard <mark at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |mark at gcc dot gnu.org
--- Comment #3 from Mark Wielaard <mark at gcc dot gnu.org> ---
Proposed fix: https://gcc.gnu.org/ml/gcc-patches/2014-09/msg01723.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug debug/63300] 'const volatile' sometimes stripped in debug info
2014-09-18 16:07 [Bug debug/63300] New: 'const volatile' sometimes stripped in debug info arnez at linux dot vnet.ibm.com
2014-09-19 17:46 ` [Bug debug/63300] " mark at gcc dot gnu.org
2014-09-22 7:18 ` mark at gcc dot gnu.org
@ 2014-09-25 7:38 ` krebbel at gcc dot gnu.org
2014-09-26 7:40 ` arnez at linux dot vnet.ibm.com
2014-09-26 7:42 ` arnez at linux dot vnet.ibm.com
4 siblings, 0 replies; 6+ messages in thread
From: krebbel at gcc dot gnu.org @ 2014-09-25 7:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63300
--- Comment #4 from Andreas Krebbel <krebbel at gcc dot gnu.org> ---
Author: krebbel
Date: Thu Sep 25 07:37:36 2014
New Revision: 215582
URL: https://gcc.gnu.org/viewcvs?rev=215582&root=gcc&view=rev
Log:
2014-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
PR 63300/debug
* tree.c (check_base_type): New.
(check_qualified_type): Exploit new helper function above.
* tree.h (check_base_type): New prototype.
* dwarf2out.c (get_nearest_type_subqualifiers): New.
(modified_type_die): Fix handling for qualifiers. Qualifiers to
"peel off" are now determined using get_nearest_type_subqualifiers.
2014-09-25 Mark Wielaard <mjw@redhat.com>
PR 63300/debug
* gcc.dg/debug/dwarf2/stacked-qualified-types-1.c: New testcase.
* gcc.dg/debug/dwarf2/stacked-qualified-types-2.c: Likewise.
* gcc.dg/guality/pr63300-const-volatile.c: New testcase.
Added:
trunk/gcc/testsuite/gcc.dg/debug/dwarf2/stacked-qualified-types-1.c
trunk/gcc/testsuite/gcc.dg/debug/dwarf2/stacked-qualified-types-2.c
trunk/gcc/testsuite/gcc.dg/guality/pr63300-const-volatile.c
Modified:
trunk/gcc/dwarf2out.c
trunk/gcc/tree.c
trunk/gcc/tree.h
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug debug/63300] 'const volatile' sometimes stripped in debug info
2014-09-18 16:07 [Bug debug/63300] New: 'const volatile' sometimes stripped in debug info arnez at linux dot vnet.ibm.com
` (2 preceding siblings ...)
2014-09-25 7:38 ` krebbel at gcc dot gnu.org
@ 2014-09-26 7:40 ` arnez at linux dot vnet.ibm.com
2014-09-26 7:42 ` arnez at linux dot vnet.ibm.com
4 siblings, 0 replies; 6+ messages in thread
From: arnez at linux dot vnet.ibm.com @ 2014-09-26 7:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63300
Andreas Arnez <arnez at linux dot vnet.ibm.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #5 from Andreas Arnez <arnez at linux dot vnet.ibm.com> ---
The fix works and I didn't find any regressions.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug debug/63300] 'const volatile' sometimes stripped in debug info
2014-09-18 16:07 [Bug debug/63300] New: 'const volatile' sometimes stripped in debug info arnez at linux dot vnet.ibm.com
` (3 preceding siblings ...)
2014-09-26 7:40 ` arnez at linux dot vnet.ibm.com
@ 2014-09-26 7:42 ` arnez at linux dot vnet.ibm.com
4 siblings, 0 replies; 6+ messages in thread
From: arnez at linux dot vnet.ibm.com @ 2014-09-26 7:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63300
Andreas Arnez <arnez at linux dot vnet.ibm.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |CLOSED
--- Comment #6 from Andreas Arnez <arnez at linux dot vnet.ibm.com> ---
Closing per comment #5.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-09-26 7:42 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-18 16:07 [Bug debug/63300] New: 'const volatile' sometimes stripped in debug info arnez at linux dot vnet.ibm.com
2014-09-19 17:46 ` [Bug debug/63300] " mark at gcc dot gnu.org
2014-09-22 7:18 ` mark at gcc dot gnu.org
2014-09-25 7:38 ` krebbel at gcc dot gnu.org
2014-09-26 7:40 ` arnez at linux dot vnet.ibm.com
2014-09-26 7:42 ` arnez at linux dot vnet.ibm.com
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).