You can only downgrade to the version already offered by CentOS 8 and GCC 6.3.1 doesn't fit the bill.
Unfortunately the only way to install this version of GCC without wreaking havoc to your system is to download the source, compile and install it into e.g. /opt/gcc6
As for compile flags check Fedora or CentOS src.rpms - you'll only need to add --prefix=/opt/gcc6
Update: here's how I compiled GCC 4-7:
Unpack it.
(under root/sudo) yum install gcc make glibc-devel gmp-devel mpfr-devel gmp-devel
export CFLAGS="-O2 -march=native -pipe"
export CXXFLAGS=$CFLAGS
cd gcc-6.3.1
mkdir BUILD
cd BUILD
../configure --enable-shared --enable-threads=posix --disable-stage1-checking \
--with-system-zlib --enable-__cxa_atexit --enable-multilib --with-gnu-as \
--with-gnu-ld --enable-languages="c,c++" --without-x --prefix=/opt/gcc \
--disable-libunwind-exceptions --with-gmp=/usr