http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60861
--- Comment #5 from Yury Gribov y.gribov at samsung dot com ---
(In reply to Andrew Pinski from comment #4)
(In reply to Yury Gribov from comment #3)
I can reproduce this in trunk. Looks like Asan pass works correctly but gcc
reduces test()
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60861
Kostya Serebryany kcc at gcc dot gnu.org changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60861
--- Comment #7 from Jakub Jelinek jakub at gcc dot gnu.org ---
I'd say it is fine for test to be optimized to 1 at -O2, but am not sure we
want to do that even for -O0 (and if we disable it for -O0, whether we want it
for -Og). Then it will be
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60861
--- Comment #1 from Kostya Serebryany kcc at gcc dot gnu.org ---
Will adding -fno-common help?
Or building the test as C++?
See https://code.google.com/p/address-sanitizer/wiki/Flags
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60861
--- Comment #2 from Jan Smets jan.sm...@alcatel-lucent.com ---
Using -fno-common (while compiling as C), or compiling as C++ works for the
unitialized bss example:
int testGlobalOutOfBoundsRODATAVar[5]; /* bss : works with -fno-common
(compiled
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60861
Yury Gribov y.gribov at samsung dot com changed:
What|Removed |Added
CC||y.gribov at
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60861
--- Comment #4 from Andrew Pinski pinskia at gcc dot gnu.org ---
(In reply to Yury Gribov from comment #3)
I can reproduce this in trunk. Looks like Asan pass works correctly but gcc
reduces test() to 'return 1;' very early for some reason. I'll