https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80152
--- Comment #5 from Sebastian Dröge ---
Because the value of uninitialized variables is implementation-defined, and as
such gcc can freely set it to anything that it wants? That would explain it
then, yes. Thanks
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80152
--- Comment #3 from Sebastian Dröge ---
But even after optimization, there would be the argc!=1 code path left, which
uses the uninitialized foo.
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: slomo at coaxion dot net
Target Milestone: ---
See below simple testcase
#include
int main(int argc, char ** argv)
{
int foo;
if (argc == 1) {
foo = 1;
}
foo += 1
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65325
--- Comment #9 from Sebastian Dröge ---
The assembly code looks exactly the same to me, except for the source
locations. But I also don't see the multiplication in either, only conversion
between integers and floating point values, and then stori
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65325
--- Comment #6 from Sebastian Dröge ---
Can you provide the assembly code with and without the added casts?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65325
--- Comment #2 from Sebastian Dröge ---
http://comments.gmane.org/gmane.linux.embedded.yocto.meta-freescale/13018 also
has other mentions of this bug.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65325
Sebastian Dröge changed:
What|Removed |Added
CC||slomo at coaxion dot net
--- Comment