repo.or.cz
/
sdcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
struct / union in initializer, RFE #901.
[sdcc.git]
/
sdcc
/
support
/
regression
/
tests
/
gcc-torture-execute-20030828-1.c
blob
87e2cdc53dc72fbf097cc6709c34bcf2ec03800e
1
/*
2
20030828-1.c from the execute part of the gcc torture tests.
3
*/
4
5
#include <testfwk.h>
6
7
#ifdef __SDCC
8
#pragma std_c99
9
#endif
10
11
const int
*
p
;
12
13
int
bar
(
void
)
14
{
15
return
*
p
+
1
;
16
}
17
18
void
19
testTortureExecute
(
void
)
20
{
21
/* Variable 'i' is never used but it's aliased to a global pointer. The
22
alias analyzer was not considering that 'i' may be used in the call to
23
bar(). */
24
const int
i
=
5
;
25
p
= &
i
;
26
if
(
bar
() !=
6
)
27
ASSERT
(
0
);
28
return
;
29
}
30