]>
git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.dg/tree-ssa/pr77445-2.c
eecfc4b195a9b9698e60a24aa66983d360da6f7a
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-thread-details-blocks-stats" } */
15 typedef unsigned char u8
;
16 typedef unsigned int u32
;
18 static u8
is_digit(u8 c
) {
19 return (u8
)((c
>='0') & (c
<='9')) ? 1 : 0;
22 enum STATES
FMS( u8
**in
, u32
*transitions
) {
25 enum STATES state
=START
;
26 for( ; *str
&& state
!= INVALID
; str
++ ) {
28 if (NEXT_SYMBOL
==',') /* end of this input */ {
35 if(is_digit(NEXT_SYMBOL
)) {
38 else if( NEXT_SYMBOL
== '+' || NEXT_SYMBOL
== '-' ) {
41 else if( NEXT_SYMBOL
== '.' ) {
50 if(is_digit(NEXT_SYMBOL
)) {
54 else if( NEXT_SYMBOL
== '.' ) {
64 if( NEXT_SYMBOL
== '.' ) {
68 else if(!is_digit(NEXT_SYMBOL
)) {
74 if( NEXT_SYMBOL
== 'E' || NEXT_SYMBOL
== 'e' ) {
76 transitions
[FLOAT
]++;
78 else if(!is_digit(NEXT_SYMBOL
)) {
80 transitions
[FLOAT
]++;
84 if( NEXT_SYMBOL
== '+' || NEXT_SYMBOL
== '-' ) {
94 if(is_digit(NEXT_SYMBOL
)) {
96 transitions
[EXPONENT
]++;
100 transitions
[EXPONENT
]++;
104 if(!is_digit(NEXT_SYMBOL
)) {
113 transitions
[INVALID
]++;
119 /* The profile is not updated perfectly because it is inconsitent from
120 profile estimation stage. But the number of inconsistencies should not
122 /* { dg-final { scan-tree-dump "Jumps threaded: 1\[1-9\]" "thread1" } } */
123 /* { dg-final { scan-tree-dump-times "Invalid sum" 3 "thread1" } } */
124 /* { dg-final { scan-tree-dump-not "not considered" "thread1" } } */
125 /* { dg-final { scan-tree-dump-not "not considered" "thread2" } } */
126 /* { dg-final { scan-tree-dump-not "not considered" "thread3" } } */
127 /* { dg-final { scan-tree-dump-not "not considered" "thread4" } } */