This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/40141] [4.3 Regression] accessing aliased __m128 miscompiles
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 May 2009 11:04:20 -0000
- Subject: [Bug middle-end/40141] [4.3 Regression] accessing aliased __m128 miscompiles
- References: <bug-40141-17603@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from rguenth at gcc dot gnu dot org 2009-05-14 11:04 -------
Confirmed. That's the SMTs do not include ref-all stuff bug so DCE removes
the initialization.
extern void abort (void);
typedef int __m128 __attribute__((vector_size(16), may_alias));
typedef float floatA __attribute__((may_alias));
int main()
{
__m128 x = { 0, 0, 0, 0 };
int i;
for (i = 0; i < 4; ++i) {
const float xx = ((floatA*)&x)[i];
if (xx != 0.f)
abort ();
}
return 0;
}
works without may_alias on __m128 for a strange reason.
I'll find the patch that fixed this.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |rguenth at gcc dot gnu dot
|dot org |org
Status|UNCONFIRMED |ASSIGNED
Component|c |middle-end
Ever Confirmed|0 |1
Keywords| |alias, wrong-code
Last reconfirmed|0000-00-00 00:00:00 |2009-05-14 11:04:20
date| |
Summary|accessing aliased __m128 |[4.3 Regression] accessing
|miscompiles |aliased __m128 miscompiles
Target Milestone|--- |4.3.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40141