https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105753
rainer-gcc at wwad dot de changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rainer-gcc at wwad dot de
--- Comment #7 from rainer-gcc at wwad dot de ---
Have the same problem (avr-gcc 12.1.0).
It happens, as soon as I change this code:
```
const uint8_t NumOutputs; // initialized in class constructor
uint32_t delayMs; // initialized dynamically in code before
uint32_t threshold = (0xffffffff) / NumOutputs;
if(delayMs > threshold)
{
delayMs = threshold;
}
```
to this:
```
const uint8_t NumOutputs; // initialized in class constructor via arg
uint32_t delayMs; // initialized dynamically in code before
uint32_t initialDelayMs; // initalized dynamically in code before
uint32_t threshold = (0xffffffff-initialDelayMs) / NumOutputs;
if(delayMs > threshold)
{
delayMs = threshold;
}
```