public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/45973] New: NRVO gives incorrect location
@ 2010-10-11 22:00 tromey at gcc dot gnu.org
  2010-10-11 22:05 ` [Bug debug/45973] " pinskia at gcc dot gnu.org
  2010-10-11 22:16 ` tromey at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: tromey at gcc dot gnu.org @ 2010-10-11 22:00 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: NRVO gives incorrect location
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: tromey@gcc.gnu.org


This test case comes from gdb bugzilla.

class foo
{
public:
    int bar;
    ~foo(){};
};

foo f()
{
    foo x;
    x.bar = 1;
    x.bar = x.bar;
    return x;
};

int main()
{
    f();
};


Compile with -g.  Then, look at 'x' in the DWARF.  I see:

 <3><cf>: Abbrev Number: 15 (DW_TAG_variable)
    <d0>   DW_AT_name        : x    
    <d2>   DW_AT_decl_file   : 1    
    <d3>   DW_AT_decl_line   : 10    
    <d4>   DW_AT_type        : <0x29>    
    <d8>   DW_AT_location    : 1 byte block: 52     (DW_OP_reg2)

I think this is missing a DW_OP_deref.
That is, I think reg2 points to the object, it doesn't hold the object.


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

* [Bug debug/45973] NRVO gives incorrect location
  2010-10-11 22:00 [Bug debug/45973] New: NRVO gives incorrect location tromey at gcc dot gnu.org
@ 2010-10-11 22:05 ` pinskia at gcc dot gnu.org
  2010-10-11 22:16 ` tromey at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2010-10-11 22:05 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2010-10-11 22:05:17 UTC ---
I think this is the same as PR 44731.


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

* [Bug debug/45973] NRVO gives incorrect location
  2010-10-11 22:00 [Bug debug/45973] New: NRVO gives incorrect location tromey at gcc dot gnu.org
  2010-10-11 22:05 ` [Bug debug/45973] " pinskia at gcc dot gnu.org
@ 2010-10-11 22:16 ` tromey at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: tromey at gcc dot gnu.org @ 2010-10-11 22:16 UTC (permalink / raw)
  To: gcc-bugs

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

Tom Tromey <tromey at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE

--- Comment #2 from Tom Tromey <tromey at gcc dot gnu.org> 2010-10-11 22:16:06 UTC ---
Thanks.  I thought there was another bug for this, but I didn't find it.

*** This bug has been marked as a duplicate of bug 44731 ***


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

end of thread, other threads:[~2010-10-11 22:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-11 22:00 [Bug debug/45973] New: NRVO gives incorrect location tromey at gcc dot gnu.org
2010-10-11 22:05 ` [Bug debug/45973] " pinskia at gcc dot gnu.org
2010-10-11 22:16 ` tromey 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).