This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/16115] [3.5 regression] double-destruction problem with argument passing via temporary (breaks auto_ptr)


------- Additional Comments From rth at gcc dot gnu dot org  2004-06-22 08:00 -------
This isn't my bug.  The best I can figure has to do with aliasing changes, but
I'm not even 100% certain that there's bugs there either.  Jason needs to answer
the question of how the ABI works for passing TREE_ADDRESSABLE type arguments.

What has happened is that the aliasing code saw that the address of PARM_DECL a
was taken (this = &a, where this came from inlining of release into destroy).
The optimizers do not, however, consider the PARM_DECL to overlap global memory,
so we are able to delete the store to a.p as dead.

If passing a TREE_ADDRESSABLE type argument is supposed to pass by invisible
reference, and magically overlap with the original temporary, then the tree
level representation of this is wrong.  We should be using a reference type.

My best guess, however, is that the reduced test case is broken.

-- 


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]