swar-c99-6.5.2.2-fcn_call.c
1.06 KB
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
54
55
/* -----------------------------------------------------------------------------
* Copyright (C) 2018-2020 daiteq s.r.o. http://www.daiteq.com
*
* This program is distributed WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE.
*
* -----------------------------------------------------------------------------
* Filename : swar-c99-6.5.2.2-fcn_call.c
* Authors : Roman Bartosinski
* Description : simple test of clang/LLVM compiler with SWAR extension
* Release :
* Version :
* Date :
* -----------------------------------------------------------------------------
*/
//A: --has-swar
//C: -daiteq-swar-enable
#define SWAR_USE_UNSIGNED_TYPES
#define SWAR_USE_SIGNED_TYPES
#include "swar-c99.h"
volatile su10x3b va;
#if 0
int foo(su10x3b dir)
{
va = dir;
return 0;
}
#endif
int foo2(su10x3b *ps)
{
va = *ps;
return 0;
}
int main(void)
{
volatile su10x3b b;
su10x3b c;
#if 0
foo(b);
#endif
#if 0
foo2(&b);
#endif
foo2(&c);
return 0;
}