This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/57748] [4.8/4.9 Regression] ICE on ARM with -mfloat-abi=softfp -mfpu=neon
- From: "jamborm at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 31 Jul 2013 16:39:23 +0000
- Subject: [Bug middle-end/57748] [4.8/4.9 Regression] ICE on ARM with -mfloat-abi=softfp -mfpu=neon
- Auto-submitted: auto-generated
- References: <bug-57748-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57748
--- Comment #10 from Martin Jambor <jamborm at gcc dot gnu.org> ---
The problem is that the type of the record that contains the scalar
data we are accessing has non-BLK mode despite that we are not
accessing a part of it. This is because it has a zero sized trailing
array:
typedef struct S { V a; V b[0]; } P __attribute__((aligned (1)));
in the x86_64-linux example from comment #9, and
struct resolved_chain {
u64 nr;
struct resolved_ip ips[0];
};
in the original testcase.
Because it has non-BLK mode, it passes the condition in
expand-assignment that is there to handle accesses to small,
scalar-sized structures (or even arrays) which should be written to
memory through movmisalign_optab. E.g. to access an element of a
vector.
However, in these testcases, the structure we are writing to is bigger
than a scalar. I wonder why structures with trailing zero-sized
arrays have non-BLK mode. I think that is the root of the problem,
actually.