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 rtl-optimization/14863] [3.4 regression] unit-at-a-time causes miscompilation


------- Additional Comments From giovannibajo at libero dot it  2004-06-02 11:14 -------
Subject: Re:  [3.4 regression] unit-at-a-time causes miscompilation

rguenth at tat dot physik dot uni-tuebingen dot de wrote:

> Hmm, if all is inlined, it should be detectable.

Not really. If *all* is correctly inline and optimized, Serge's testcase would
be reduced to "main() { return 0; }". Actually, tree-ssa is pretty close to do
that, we need to fix the C++ frontend lowering things Pinski is working on.

> Maybe worth a few false positives.  I.e. warn for returned
> references to results of methods of local objects.

I think the complete solution must happen at the tree level (not in the
frontend as it is now). Of course, such a situation is detectable only if the
definition of all involved functions are available, etc. After all, it is
undefined behaviour so it is only a QoI issue, we can try harder to help the
user.

Giovanni Bajo




-- 


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


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