Debian Codegraph @

gcc/testsuite/gcc.target/avr/torture/pr122187.c

raw
1 /* { dg-do compile } */
2 /* { dg-additional-options { -std=c99 } } */
3
4 typedef __UINT32_TYPE__ uint32_t;
5 typedef __UINT16_TYPE__ uint16_t;
6 typedef __UINT8_TYPE__ uint8_t;
7
8 #define PINB (*(volatile uint8_t*) (13 + __AVR_SFR_OFFSET__))
9 #define PB1 1
10
11 uint16_t fun (void)
12 {
13 uint16_t h = 0;
14 for (uint32_t s = 0; s < 0x10000; ++s)
15 h += (PINB >> PB1) & 1;
16 return h;
17 }