aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/lto/c-compatible-types-1_0.c
blob: 376da00599d04a738b8b5d6c6d3625d915cae83b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* { dg-lto-do run } */
/* { dg-lto-options "-O3" } */

/* By C standard Each enumerated type shall be compatible with char, a  signed
   integer, type, or an unsigned integer type. The choice of type is
   implementation-defined.  Check that enum and unsigned int match.  */
unsigned int a;
unsigned int *b;
void t();

void reset ()
{
  asm("":"=r"(a):"0"(0));
}
int
main()
{
  asm("":"=r"(a):"0"(1));
  asm("":"=r"(b):"0"(&a));
  t();
  return 0;
}