Turn on verbose compilation in the IDE to get the command line. This will allow you to run that command to get the version # if it’s not reported directly, which the GNU folk will want.
IIRC, on Unix systems the IDE will use the system version of avr-gcc if there’s one installed. You can check that as well, and possibly delete or update that version if so.