[Bug c++/55081] [4.8 regression?] Non-optimized static array elements initialization
amonakov at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Oct 26 15:17:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55081
Alexander Monakov <amonakov at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |amonakov at gcc dot gnu.org
--- Comment #2 from Alexander Monakov <amonakov at gcc dot gnu.org> 2012-10-26 15:17:20 UTC ---
Not sure if that's relevant, but the original testcase uses 0x4000 in place of
non-compile-time-constant (&r) like this:
struct R {
int field;
};
long* foo() {
static long array[] = {
sizeof(char),
(reinterpret_cast<long>(&(reinterpret_cast<struct
R*>(0x4000)->field)) - 0x4000),
};
return array;
}
More information about the Gcc-bugs
mailing list