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
Require target lra in gcc.dg/pr108095.c
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
torture
/
pr78731.c
blob
5a4d43be1f9b928ea7ba686879c0fca1be273be8
1
/* { dg-do run } */
2
3
#include <stdio.h>
4
#include <stdlib.h>
5
6
#define GENERAL 1
7
#define BRACKETS 2
8
#define QUOTES 3
9
10
void
__attribute__
((
noinline
,
noclone
))
11
foo
(
char
*
qb
,
char
*
into
)
12
{
13
int
state
=
QUOTES
;
14
int
save_state
=
BRACKETS
;
15
16
while
(
qb
)
17
{
18
switch
(
state
)
19
{
20
case
BRACKETS
:
21
exit
(
0
);
22
case
GENERAL
:
23
abort
();
24
case
QUOTES
:
25
state
=
save_state
;
26
save_state
=
GENERAL
;
27
break
;
28
default
: ;
29
}
30
printf
(
"State %d btw GENERAL %d
\n
"
,
state
,
GENERAL
);
31
}
32
abort
();
33
}
34
35
int
main
()
36
{
37
char
*
b
=
"123"
;
38
char
out
[
4
];
39
foo
(
b
,
out
);
40
return
0
;
41
}