https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64822
Bug ID: 64822 Summary: tree-ssa-sccvn miscompile union containing bitfield for big-endian targets Product: gcc Version: 5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: jiwang at gcc dot gnu.org given the following simple testcase, union { unsigned f0; unsigned f1 : 24; } const g_3983 = {1}; int main() { printf("checksum = %08x\n", g_3983.f1); } on aarch64, or other target support big-endian, then ./cc1 -O2 -mbig-endian test.c during tree-ssa-sccvn pass g_3983.f1 is evaluated into constant 1 while I think it should be zero for big-endian.