This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/11091] Wrong code in variable initialization
- From: "dej at inode dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Jun 2003 13:58:16 -0000
- Subject: [Bug c++/11091] Wrong code in variable initialization
- References: <20030604194320.11091.dej@inode.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11091
------- Additional Comments From dej@inode.org 2003-06-05 13:58 -------
Upon further experimentation, I agree with Christian's statements. I have attached a simple demo case illustrating the different codes. I no longer have the original code that led me to discover this optimization, but I will keep my eyes peeled for future occurrences. However, this reveals a bug either in GCC or GDB: GDB was not aware that my object instance was silently optimized into a reference. (I take it this happens only if GCC can determine that obj is the only object that will EVER be returned from the method.) Is this a case of GCC not emitting debug info that describes obj as a reference, or is this a case of GDB not picking up on something that was there? I am using GDB 5.3.
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.