This is UB and it's caught by both GCC and Clang:
$ gcc -Wall test.c
test.c: In function ‘main’:
test.c:12:13: warning: operation on ‘a’ may be undefined [-Wsequence-point]
test(a++, a++);
~^~
$ clang test.c
test.c:12:8: warning: multiple unsequenced modifications to 'a' [-Wunsequenced]
test(a++, a++);
^ ~~
1 warning generated.