1/* https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=223576 */ 2 3/* SRA failed to canonicalize bit-field types, introducing type 4 mismatches. */ 5 6/* { dg-do compile } */ 7/* { dg-options "-O2" } */ 8 9struct A 10{ 11 int a:16; 12 /* These dummy bit-fields are here to prevent GCC 4.2+ from merging 13 the bit-field compares into a single word compare, which disables 14 SRA. */ 15 int a2:16; 16 int a3:16; 17 int a4:16; 18 int b:8; 19 bool operator==(A const x) const 20 { 21 return (this->a == x.a && this->b == x.b); 22 } 23}; 24 25bool 26foo (A const x, A const y) 27{ 28 return x == y; 29} 30