http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60861
--- Comment #7 from Jakub Jelinek ---
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 user's choice whether he wa
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60861
Kostya Serebryany changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60861
--- Comment #5 from Yury Gribov ---
(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() to 'return 1;' very earl
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60861
--- Comment #4 from Andrew Pinski ---
(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 debug further.
Most lik
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60861
Yury Gribov changed:
What|Removed |Added
CC||y.gribov at samsung dot com
--- Comment #3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60861
--- Comment #2 from Jan Smets ---
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 as C) or when compiled as C+
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60861
--- Comment #1 from Kostya Serebryany ---
Will adding "-fno-common" help?
Or building the test as C++?
See https://code.google.com/p/address-sanitizer/wiki/Flags