Issue
#include <stdio.h>
__attribute__ ((target ("arch=icelake-client"))) void foo() {printf("This is icelake-client\n"); }
__attribute__ ((target ("arch=rocketlake"))) void foo() {printf("This is rocketlake\n"); }
__attribute__ ((target ("arch=icelake-server"))) void foo() {printf("This is icelake-server\n"); }
__attribute__ ((target ("arch=sapphirerapids"))) void foo() {printf("This is sapphirerapids\n"); }
__attribute__ ((target ("arch=graniterapids"))) void foo() {printf("This is graniterapids\n"); }
__attribute__ ((target ("arch=graniterapids-d"))) void foo() {printf("This is graniterapids-d\n"); }
__attribute__ ((target ("arch=emeraldrapids"))) void foo() {printf("This is emeraldrapids\n"); }
__attribute__ ((target ("arch=alderlake"))) void foo() {printf("This is alderlake\n"); }
__attribute__ ((target ("arch=raptorlake"))) void foo() {printf("This is raptorlake\n"); }
__attribute__ ((target ("arch=meteorlake"))) void foo() {printf("This is meteorlake\n"); }
__attribute__ ((target ("arch=gracemont"))) void foo() {printf("This is gracemont\n"); }
__attribute__ ((target ("arch=arrowlake"))) void foo() {printf("This is arrowlake\n"); }
__attribute__ ((target ("arch=arrowlake-s"))) void foo() {printf("This is arrowlake-s\n"); }
__attribute__ ((target ("arch=lunarlake"))) void foo() {printf("This is lunarlake\n"); }
__attribute__ ((target ("arch=pantherlake"))) void foo() {printf("This is pantherlake\n"); }
__attribute__ ((target ("arch=sierraforest"))) void foo() {printf("This is sierraforest\n"); }
__attribute__ ((target ("arch=grandridge"))) void foo() {printf("This is grandridge\n"); }
__attribute__ ((target ("arch=clearwaterforest"))) void foo() {printf("This is clearwaterforest\n"); }
__attribute__ ((target ("default")))
void foo () { printf("default\n");
}
int main (){ foo(); return 0;}
When running on SRF, it should get the following result:
This is sierraforest
But currently with GCC13.2, it is:
default
GCC just fixed the bug with the commit: https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=6b5248d15c6d10325c6cbb92a0e0a9eb04e3f122 on trunk and backported to GCC13.3.
So we need a backport for GCC13.2.