https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113179
Bug ID: 113179 Summary: MIPS Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: syq at gcc dot gnu.org Target Milestone: --- ``` struct xx { int a:4; int b:24; int c:3; int d:1; }; void xx (struct xx *a, long long b) { a->d = b; } ``` When this code is built on -mabi=64, it generates asm like this: ``` lw $2,0($4) ins $2,$5,31,1 jr $31 sw $2,0($4) ``` Since the argument B is `long long`, we cannot be sure that it is well sign-extended, while INS asks for it: ``` If either GPR rs or GPR rt does not contain sign-extended 32-bit values (bits 63..31 equal), then the result of the operation is UNPREDICTABLE. ```