blob: 7a1c202ad054aec437129ff06369f0cc8ebae5c1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
/* Check that loads/stores from/to volatile mems don't result in redundant
sign/zero extensions. */
/* { dg-do compile } */
/* { dg-options "-O2" } */
/* { dg-final { scan-assembler-not "exts|extu" } } */
int
test_00 (volatile char* x)
{
return *x;
}
void
test_100 (volatile char* x, char y)
{
*x = y;
}
int
test_01 (volatile short* x)
{
return *x;
}
void
test_101 (volatile unsigned char* x, unsigned char y)
{
*x = y;
}
int
test_02 (volatile unsigned char* x)
{
return *x == 0x80;
}
void
test_102 (volatile short* x, short y)
{
*x = y;
}
int
test_03 (volatile unsigned short* x)
{
return *x == 0xFF80;
}
void
test_103 (volatile unsigned short* x, unsigned short y)
{
*x = y;
}
|