[Bug 1909838] Re: gcc -O3 produces invalid code
Douglas Miller
1909838 at bugs.launchpad.net
Sat Jan 2 20:43:06 UTC 2021
Turns out, this is due to the programmer's assumption that fcb->name[8]
and fcb->ext[3] can be accessed contiguously by fcb->name[0..10]. So,
the code is actually "lazy", if not bad. Obviously, this has worked in C
for a long time but no longer can be depended on.
** Changed in: gcc-9 (Ubuntu)
Status: New => Invalid
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to gcc-9 in Ubuntu.
https://bugs.launchpad.net/bugs/1909838
Title:
gcc -O3 produces invalid code
Status in gcc-9 package in Ubuntu:
Invalid
Bug description:
If I compile the attached file with -O3, gcc produces an empty
function (simply returns 0). If I compile without -O3, gcc produces
viable code that functions as expected.
Linux outhouse 5.4.0-58-generic #64-Ubuntu SMP Wed Dec 9 08:16:25 UTC
2020 x86_64 x86_64 x86_64 GNU/Linux
gcc 4:9.3.0-1ubuntu2
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gcc-9/+bug/1909838/+subscriptions
More information about the foundations-bugs
mailing list