public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/54970] New: Missing DW_OP_GNU_implicit_pointer in debuginfo
@ 2012-10-18  8:45 jakub at gcc dot gnu.org
  2012-10-18  8:46 ` [Bug debug/54970] " jakub at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-10-18  8:45 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54970

             Bug #: 54970
           Summary: Missing DW_OP_GNU_implicit_pointer in debuginfo
    Classification: Unclassified
           Product: gcc
           Version: 4.7.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
        AssignedTo: jakub@gcc.gnu.org
        ReportedBy: jakub@gcc.gnu.org
                CC: aoliva@gcc.gnu.org


/* { dg-do run } */
/* { dg-options "-g" } */

#include "../nop.h"

int
main ()
{
  int a[] = { 1, 2, 3 };        /* { dg-final { gdb-test 12 "a\[1\]" "2" } } */
  int *p = a + 2;               /* { dg-final { gdb-test 12 "a\[2\]" "3" } } */
  int *q = a + 1;               /* { dg-final { gdb-test 12 "*p" "3" } } */
  asm volatile ("NOP");         /* { dg-final { gdb-test 12 "*q" "2" } } */
  *p += 10;                     /* { dg-final { gdb-test 16 "a\[1\]" "2" } } */
                                /* { dg-final { gdb-test 16 "a\[2\]" "13" } }
*/
                                /* { dg-final { gdb-test 16 "*p" "13" } } */
  asm volatile ("NOP");         /* { dg-final { gdb-test 16 "*q" "2" } } */
  *q += 10;                     /* { dg-final { gdb-test 20 "a\[1\]" "12" } }
*/
                                /* { dg-final { gdb-test 20 "a\[2\]" "13" } }
*/
                                /* { dg-final { gdb-test 20 "*p" "13" } } */
  asm volatile ("NOP");         /* { dg-final { gdb-test 20 "*q" "12" } } */
  return 0;
}

fails, apparently because we have # DEBUG p => &MEM[(void *)&a + 8B]
and we fail to expand that as (plus (debug_implicit_ptr a) (const_int 8)).
The reason for that is that we don't want (mem (debug_implicit_ptr x)) to
appear
in debug insns, that confuses aliasing.  When expanding &a, we expand it as
DEBUG_IMPLICIT_PTR, but when returning to MEM, we return NULL, as that is not
appropriate thing to construct.


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2013-03-12 18:55 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-18  8:45 [Bug debug/54970] New: Missing DW_OP_GNU_implicit_pointer in debuginfo jakub at gcc dot gnu.org
2012-10-18  8:46 ` [Bug debug/54970] " jakub at gcc dot gnu.org
2012-10-18  8:55 ` jakub at gcc dot gnu.org
2012-10-18  9:27 ` jakub at gcc dot gnu.org
2012-10-26 19:20 ` jakub at gcc dot gnu.org
2012-11-05 14:37 ` jakub at gcc dot gnu.org
2012-12-04 13:17 ` jakub at gcc dot gnu.org
2013-03-12 17:09 ` steven at gcc dot gnu.org
2013-03-12 17:51 ` jakub at gcc dot gnu.org
2013-03-12 18:55 ` steven 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).