For openSUSE Leap 15.4 run the following as root:
zypper addrepo https://download.opensuse.org/repositories/home:wicked:qubes-build:gcc/openSUSE_Leap_15.4/home:wicked:qubes-build:gcc.repo
zypper refresh
zypper install gcc7
For openSUSE Leap 15.3 run the following as root:
zypper addrepo https://download.opensuse.org/repositories/home:wicked:qubes-build:gcc/openSUSE_Leap_15.3/home:wicked:qubes-build:gcc.repo
zypper refresh
zypper install gcc7
For SLE 15 SP4 run the following as root:
zypper addrepo https://download.opensuse.org/repositories/home:wicked:qubes-build:gcc/SLE_15_SP4/home:wicked:qubes-build:gcc.repo
zypper refresh
zypper install gcc7