Hi Nicolas, Updating gfortran with your patch fails with
../../work/gcc/fortran/frontend-passes.c: In function 'bool traverse_io_block(gfc_code*, bool*, gfc_code*)': ../../work/gcc/fortran/frontend-passes.c:1067:20: error: expected unqualified-id before '(' token #define swap(x, y) (x) ^= (y), (y) ^= (x), (x) ^= (y); ^ ../../work/gcc/fortran/frontend-passes.c:1180:15: note: in expansion of macro 'swap' std::swap(start->value.op.op1, start->value.op.op2); ^~~~ ../../work/gcc/fortran/frontend-passes.c:1067:36: error: invalid operands of types 'gfc_expr*' and 'gfc_expr*' to binary 'operator^' #define swap(x, y) (x) ^= (y), (y) ^= (x), (x) ^= (y); ~~~~^~~~~~ ../../work/gcc/fortran/frontend-passes.c:1180:15: note: in expansion of macro 'swap' std::swap(start->value.op.op1, start->value.op.op2); ^~~~ ../../work/gcc/fortran/frontend-passes.c:1067:41: error: in evaluation of 'operator^=(struct gfc_expr*, struct gfc_expr*)' #define swap(x, y) (x) ^= (y), (y) ^= (x), (x) ^= (y); ^ ../../work/gcc/fortran/frontend-passes.c:1180:15: note: in expansion of macro 'swap' std::swap(start->value.op.op1, start->value.op.op2); ^~~~ ../../work/gcc/fortran/frontend-passes.c:1067:48: error: invalid operands of types 'gfc_expr*' and 'gfc_expr*' to binary 'operator^' #define swap(x, y) (x) ^= (y), (y) ^= (x), (x) ^= (y); ~~~~^~~~~~ ../../work/gcc/fortran/frontend-passes.c:1180:15: note: in expansion of macro 'swap' std::swap(start->value.op.op1, start->value.op.op2); ^~~~ ../../work/gcc/fortran/frontend-passes.c:1067:53: error: in evaluation of 'operator^=(struct gfc_expr*, struct gfc_expr*)' #define swap(x, y) (x) ^= (y), (y) ^= (x), (x) ^= (y); ^ ../../work/gcc/fortran/frontend-passes.c:1180:15: note: in expansion of macro 'swap' std::swap(start->value.op.op1, start->value.op.op2); ^~~~ TIA Dominique