https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105084
Richard Biener changed:
What|Removed |Added
Resolution|--- |INVALID
Status|UNCONFIRMED
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105084
--- Comment #3 from Li Shaohua ---
Thanks a lot for your explanation. That makes sense to me :).
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105084
--- Comment #2 from Jakub Jelinek ---
Neither is false positive, both are real bugs in your test programs.
The fact that on the second testcase a violation isn't reported at -O0 and is
at -O2 depends on the ordering of the global variables (we e
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105084
--- Comment #1 from Li Shaohua ---
Sorry, the triggering program should be the following:
$cat a.c
int a[] = {3};
int b = 7;
main() {
unsigned int *c = &b;
*c = a[-1];
}