https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123010
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Severity|normal |enhancement
Last reconfirmed| |2025-12-04
Status|UNCONFIRMED |NEW
--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Even more this is fine:
```
#include <stdint.h>
#define N 2
uint32_t mulu(uint32_t *a) {
return *a * N;
}
int32_t muls(int32_t *a) {
return *a * N;
}
```
and:
```
#include <stdint.h>
#define N 2
uint32_t b;
int32_t c;
void mulu(uint32_t a) {
b= a * N;
}
void muls(int32_t a) {
c= a * N;
}
```
are ok.
So this is just an interaction between argument passing and returns together
with the shift.