repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
graphite
/
uns-interchange-9.c
blob
a8957803207184bf1226a3be802c3c7fa95c87e1
1
/* { dg-require-effective-target size32plus } */
2
3
#define DEBUG 0
4
#if DEBUG
5
#include <stdio.h>
6
#endif
7
8
#define N 111
9
#define M 111
10
11
static unsigned int
__attribute__
((
noinline
))
12
foo
(
unsigned int
*
x
)
13
{
14
int
i
,
j
;
15
unsigned int
sum
=
0
;
16
17
for
(
j
=
0
;
j
<
M
; ++
j
)
18
for
(
i
=
0
;
i
<
N
; ++
i
)
19
sum
+=
x
[
M
*
i
+
j
];
20
21
return
sum
;
22
}
23
24
extern
void
abort
();
25
26
int
27
main
(
void
)
28
{
29
unsigned int
A
[
N
*
M
];
30
int
i
;
31
unsigned int
res
;
32
33
for
(
i
=
0
;
i
<
N
*
M
;
i
++)
34
A
[
i
] =
2
;
35
36
res
=
foo
(
A
);
37
38
#if DEBUG
39
fprintf
(
stderr
,
"res = %d
\n
"
,
res
);
40
#endif
41
42
if
(
res
!=
24642
)
43
abort
();
44
45
return
0
;
46
}