Timers not working

I was trying to set the timers to non-standard values, without any luck.
With the dataseet in hand I made this sketch to test:

int main() {
  bitSet(DDRD, 4);      // output LED Timer0
  bitSet(DDRD, 5);      // output LED Timer1
  bitSet(DDRD, 6);      // output LED Timer2

  TCCR0A = 0;           // normal mode
  TCCR0B = 0b00000111;  // DIV1024, 8bit -> period 0.16 sec
  TIMSK0 = 1;           // enable

  TCCR1A = 0;           // normal mode
  TCCR1B = 0b00000110;  // DIV256, 16bit -> period 1 sec
  TIMSK1 = 1;           // enable

  TCCR2A = 0;           // normal mode
  TCCR2B = 0b00000111;  // DIV1024, 8bit -> period 0.16 sec
  TIMSK2 = 1;           // enable

  sei();
  for (;;) {}  // endless loop
  return 0;
}

ISR(TIMER0_OVF_vect) {
  bitSet(PIND, 4);  // toggle LED
}

ISR(TIMER1_OVF_vect) {
  bitSet(PIND, 5);  // toggle LED
}

ISR(TIMER2_OVF_vect) {
  bitSet(PIND, 6);  // toggle LED
}

I see one LED blinking very fast (as expected, Timer0), the two others stay dark.
What am I missing?

By using your own main() function you bypass the normal calls to the Arduino initialisation functions. Could that be a factor ?

If you put your code in setup() instead of main() you get this error

wiring.c.o (symbol from plugin): In function `__vector_16':
(.text+0x0): multiple definition of `__vector_16'
C:\Users\micro\AppData\Local\arduino\sketches\D3B0D7D7238C1380270C11B10B346A24\sketch\sketch_jul25a.ino.cpp.o (symbol from plugin):(.text+0x0): first defined here
collect2.exe: error: ld returned 1 exit status
exit status 1

Compilation error: exit status 1

Is that a clue to the problem ?

I bypaased setup() and loop() to get rid of all standard clutter. I'm familiar with that, and it contains nothing that I didn't initialize myself, as far as I can see.
In the disassembled hex file I see the interrupt vectors and the handlers. It looks like the interrupts of timer1 and timer2 are never triggerd. So maybe I'm missing something.

This might be a good case for asking AI what is going on

Tu quoque, Brute.

It should be 101 ~ CS02:0 for clkI/O/1024 (From prescaler). 100 ~ /256....

Go on. You know you want to !

And yet, timer0 is the one that did what I expected.
I repaired the clock for timer0, and now timer2 does what I expected. Miraculous!

Checked and repaired the clock for timer1, now also does what I expected.
I guess I took the settings from look-alike listings.

Please post the working code

Working:

int main() {
  bitSet(DDRD, 4);      // output LED Timer0
  bitSet(DDRD, 5);      // output LED Timer1
  bitSet(DDRD, 6);      // output LED Timer2

  TCCR0A = 0;           // normal mode
  TCCR0B = 0b00000101;  // DIV1024, 8bit -> period 0.016 sec
  TIMSK0 = 1;           // enable

  TCCR1A = 0;           // normal mode
  TCCR1B = 0b00000100;  // DIV256, 16bit -> period 1 sec
  TIMSK1 = 1;           // enable

  TCCR2A = 0;           // normal mode
  TCCR2B = 0b00000111;  // DIV1024, 8bit -> period 0.016 sec
  TIMSK2 = 1;           // enable

  sei();
  for (;;) {}  // endless loop
  return 0;
}

ISR(TIMER0_OVF_vect) {
  bitSet(PIND, 4);  // toggle LED
}

ISR(TIMER1_OVF_vect) {
  bitSet(PIND, 5);  // toggle LED
}

ISR(TIMER2_OVF_vect) {
  bitSet(PIND, 6);  // toggle LED
}

Thanks