This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/41751] bad code with arrays as local vars and no optimization
- From: "sezeroz at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Oct 2009 11:11:33 -0000
- Subject: [Bug target/41751] bad code with arrays as local vars and no optimization
- References: <bug-41751-17247@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #6 from sezeroz at gmail dot com 2009-10-19 11:11 -------
(In reply to comment #5)
> function is left, so chances are you are refering to a variable later on even
> after it went out of scope.
By a closer look, the function is called twice, first by its argument set to
true in which case it assigns the pointer, then with the argument set as false
where the code seems to assume that the pointer is still valid. So, you are
right, the code is buggy and I apologize for the noise. I am amazed, however,
how the x86 compilations and/or optimized compilations worked flawlessly since
ten years of time... Any hints?
--
sezeroz at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41751