[Bug debug/63300] 'const volatile' sometimes stripped in debug info

2014-09-26 Thread arnez at linux dot vnet.ibm.com
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.


[Bug debug/63300] 'const volatile' sometimes stripped in debug info

2014-09-26 Thread arnez at linux dot vnet.ibm.com
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.


[Bug debug/63300] 'const volatile' sometimes stripped in debug info

2014-09-25 Thread krebbel at gcc dot gnu.org
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=215582root=gccview=rev
Log:
2014-09-25  Andreas Arnez  ar...@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  m...@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


[Bug debug/63300] 'const volatile' sometimes stripped in debug info

2014-09-22 Thread mark at gcc dot gnu.org
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


[Bug debug/63300] 'const volatile' sometimes stripped in debug info

2014-09-19 Thread krebbel at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63300

Andreas Krebbel krebbel at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2014-09-19
 CC||mark at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Andreas Krebbel krebbel at gcc dot gnu.org ---
Reghunt indicates that this is caused by r214143.

For a const volatile type none of the following IFs is triggered:

  if ((cv_quals  TYPE_QUAL_CONST)
  /* If there are multiple type modifiers, prefer a path which
 leads to a qualified type.  */
   (((cv_quals  ~TYPE_QUAL_CONST) == TYPE_UNQUALIFIED)
  || get_qualified_type (type, cv_quals) == NULL_TREE
  || (get_qualified_type (type, cv_quals  ~TYPE_QUAL_CONST)
  != NULL_TREE)))
{
  mod_type_die = new_die (DW_TAG_const_type, mod_scope, type);
  sub_die = modified_type_die (type, cv_quals  ~TYPE_QUAL_CONST,
   context_die);
}
  else if ((cv_quals  TYPE_QUAL_VOLATILE)
(((cv_quals  ~TYPE_QUAL_VOLATILE) == TYPE_UNQUALIFIED)
   || get_qualified_type (type, cv_quals) == NULL_TREE
   || (get_qualified_type (type, cv_quals  ~TYPE_QUAL_VOLATILE)
   != NULL_TREE)))
{
  mod_type_die = new_die (DW_TAG_volatile_type, mod_scope, type);
  sub_die = modified_type_die (type, cv_quals  ~TYPE_QUAL_VOLATILE,
   context_die);
}
  else if (cv_quals  TYPE_QUAL_RESTRICT)
{
  mod_type_die = new_die (DW_TAG_restrict_type, mod_scope, type);
  sub_die = modified_type_die (type, cv_quals  ~TYPE_QUAL_RESTRICT,
   context_die);
}

So the DIE ends up with an unqualified type.


[Bug debug/63300] 'const volatile' sometimes stripped in debug info

2014-09-19 Thread mark at gcc dot gnu.org
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.