gcc/testsuite/gcc.dg/tm/pr47520.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-fgnu-tm -O" } */ |
| 3 | |
| 4 | struct ReadSeqVars |
| 5 | { |
| 6 | int format; |
| 7 | char *ss; |
| 8 | }; |
| 9 | |
| 10 | void rms_feof(struct ReadSeqVars *); |
| 11 | |
| 12 | __attribute__((transaction_callable)) int ReadSeq(struct ReadSeqVars *V) |
| 13 | { |
| 14 | if (V->format > 1) |
| 15 | { |
| 16 | if ((V->format != 2) && (V->ss != (void*)0) ) |
| 17 | { |
| 18 | V->format = 3; |
| 19 | } |
| 20 | } |
| 21 | else |
| 22 | { |
| 23 | int i = 0; |
| 24 | for (i = 0; i < 1; i++) |
| 25 | { |
| 26 | } |
| 27 | rms_feof(V); |
| 28 | } |
| 29 | } |