[Bug middle-end/98366] New: [11 Regression] wrong-code with memcmp and -m32
mpolacek at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Dec 18 02:52:51 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98366
Bug ID: 98366
Summary: [11 Regression] wrong-code with memcmp and -m32
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: mpolacek at gcc dot gnu.org
Target Milestone: ---
struct S {
int b;
int alignment;
int c : 7;
int d : 8;
} const e[] = {{.0, 3, '(', 2.0}};
typedef struct S S;
int memcmp (const void *, const void *, __SIZE_TYPE__);
int
main ()
{
_Bool b = (!memcmp(e, (S[]){{.alignment = 3, '(', 2.0}}, sizeof (S)));
if (!b)
__builtin_abort ();
}
with -m32 -O2 generates a binary that aborts. Started with r11-2709.
More information about the Gcc-bugs
mailing list