repo.or.cz
/
netbsd-mini2440.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
No empty .Rs/.Re
[netbsd-mini2440.git]
/
gnu
/
dist
/
gcc4
/
gcc
/
testsuite
/
gcc.dg
/
iftrap-1.c
blob
69d754df35ca2e43bb2864ba7794762ae2b72f98
1
/* Verify that we optimize to conditional traps. */
2
/* { dg-options "-O" } */
3
/* { dg-do compile { target rs6000-*-* powerpc-*-* sparc*-*-* ia64-*-* } } */
4
/* { dg-final { scan-assembler-not "^\t(trap|ta|break)\[ \t\]" } } */
5
6
void
f1
(
int
p
)
7
{
8
if
(
p
)
9
__builtin_trap
();
10
}
11
12
void
f2
(
int
p
)
13
{
14
if
(
p
)
15
__builtin_trap
();
16
else
17
bar
();
18
}
19
20
void
f3
(
int
p
)
21
{
22
if
(
p
)
23
bar
();
24
else
25
__builtin_trap
();
26
}
27
28
void
f4
(
int
p
,
int
q
)
29
{
30
if
(
p
)
31
{
32
bar
();
33
if
(
q
)
34
bar
();
35
}
36
else
37
__builtin_trap
();
38
}