PR target/83368
[official-gcc.git] / gcc / testsuite / gcc.target / sh / pr52483-1.c
blob7a1c202ad054aec437129ff06369f0cc8ebae5c1
1 /* Check that loads/stores from/to volatile mems don't result in redundant
2 sign/zero extensions. */
3 /* { dg-do compile } */
4 /* { dg-options "-O2" } */
5 /* { dg-final { scan-assembler-not "exts|extu" } } */
7 int
8 test_00 (volatile char* x)
10 return *x;
13 void
14 test_100 (volatile char* x, char y)
16 *x = y;
19 int
20 test_01 (volatile short* x)
22 return *x;
25 void
26 test_101 (volatile unsigned char* x, unsigned char y)
28 *x = y;
31 int
32 test_02 (volatile unsigned char* x)
34 return *x == 0x80;
37 void
38 test_102 (volatile short* x, short y)
40 *x = y;
43 int
44 test_03 (volatile unsigned short* x)
46 return *x == 0xFF80;
49 void
50 test_103 (volatile unsigned short* x, unsigned short y)
52 *x = y;