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
PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.c-torture
/
execute
/
mayalias-1.c
blob
ba461cae1969fd63e7d0d43c6083a69f9dcb2470
1
/* Tests that the may_alias attribute works as expected.
2
Author: Osku Salerma <osku@iki.fi> Apr 2002. */
3
4
extern
void
abort
(
void
);
5
extern
void
exit
(
int
);
6
7
typedef
short
__attribute__
((
__may_alias__
))
short_a
;
8
9
int
10
main
(
void
)
11
{
12
int
a
=
0x12345678
;
13
short_a
*
b
= (
short_a
*) &
a
;
14
15
b
[
1
] =
0
;
16
17
if
(
a
==
0x12345678
)
18
abort
();
19
20
exit
(
0
);
21
}