FortranCInterface: Fix failure with gfortran 12 and Clang

The C flags added by commit 6a0ce19c (FortranCInterface: Fix
compatibility with GCC gfortran 12 LTO, 2022-01-19, v3.22.2~5^2)
should only be added for the GNU C compiler.

Fixes: #23500
Issue: #23123
32 jobs for !7266 with FortranCInterface-gcc12 in 21 minutes and 21 seconds (queued for 3 seconds)
latest merge request