This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/28865] Structures with a flexible arrray member have wrong .size
- From: "amodra at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 10 Jan 2014 22:51:52 +0000
- Subject: [Bug middle-end/28865] Structures with a flexible arrray member have wrong .size
- Auto-submitted: auto-generated
- References: <bug-28865-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28865
--- Comment #16 from Alan Modra <amodra at gmail dot com> ---
Hi Nick, that patch looks exactly like my first attempt to fix this bug. I
forget the details now but I'm fairly certain it wasn't a complete fix, which
is why I didn't submit my patch..
Note that the underlying bug here doesn't just cause a wrong .size to be
emitted, but wrongly sized initialization data. On -fsection-anchors targets
that results in seriously wrong code. Variables following a too-large
initializer are located at the wrong address..
See http://gcc.gnu.org/ml/gcc-patches/2013-05/msg00246.html for a patch that
makes the assembler complain loudly if gcc emits wrong code.