diff options
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/compile/pr40321.c')
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/pr40321.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr40321.c b/gcc/testsuite/gcc.c-torture/compile/pr40321.c new file mode 100644 index 000000000..a2f83ed8d --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr40321.c @@ -0,0 +1,12 @@ +struct X { int flag; int pos; }; +int foo(struct X *a, struct X *b) +{ + while (1) + { + if (a->flag) + break; + ({ struct X *tmp = a; a = b; b = tmp; }); + } + + return a->pos + b->pos; +} |