Closed issue by riddicc on void-packages repository https://github.com/void-linux/void-packages/issues/46899 Description: ### Is this a new report? Yes ### System Info Void 6.5.5_2 x86_64 GenuineIntel uptodate hold rrrmFFF ### Package(s) Affected cross-arm-none-eabi-gcc-9.3.0_1 ### Does a report exist for this bug with the project's home (upstream) and/or another distro? https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111582 somehow my related issue #46239 gets no attention... dunno why... am i doing something wrong? ### Expected behaviour the code should be easier/faster to execute... there are possibly much more issues, that could be fixed in the current version 13.2.0 of gcc... ### Actual behaviour it adds instructions like this: ``` sub sp, sp, #16 mov r2, sp add sp, sp, #16 ``` without ever using something on the stack... ### Steps to reproduce 1. install cross-arm-none-eabi-gcc 2. compile source code containing bitfield operations [[1]] 3. u will get [2] [[1]]: source: ``` # 1 "a.c" # 1 "/tmp//" # 1 "" # 1 "" # 1 "a.c" typedef unsigned char u8; typedef unsigned int u32; extern int fatal(); __attribute__((always_inline)) inline u32 lsb(const u8 l) { return (1U<> (i*8); if (R.rs || msk==~R.msk) return (((volatile u8*)R.a)[i] = v) << (i*8); else if (R.v==~R.msk) return (((volatile u8*)R.a)[i] |= v) << (i*8); return (((volatile u8*)R.a)[i] = (((volatile u8*)R.a)[i] & (R.msk>>(i*8))) | v) << (i*8); } return 0; } __attribute__((always_inline)) inline Reg GU(Reg R, u32 A, u32 N, u8 o, u8 w, u32 v) { const u32 msk=~(lsb(w)<