1 // RUN: %clang_cc1 -triple riscv64-linux-gnu -target-feature +i -fsyntax-only -verify -std=c2x %s
3 //expected-note@+1 {{previous definition is here}}
4 int __attribute__((target("arch=rv64g"))) foo(void) { return 0; }
5 //expected-error@+1 {{redefinition of 'foo'}}
6 int __attribute__((target("arch=rv64gc"))) foo(void) { return 0; }
8 //expected-warning@+1 {{unsupported 'notafeature' in the 'target' attribute string; 'target' attribute ignored}}
9 int __attribute__((target("arch=+notafeature"))) UnsupportFeature(void) { return 0; }
11 //expected-warning@+1 {{unsupported 'notafeature' in the 'target' attribute string; 'target' attribute ignored}}
12 int __attribute__((target("arch=-notafeature"))) UnsupportNegativeFeature(void) { return 0; }
14 //expected-warning@+1 {{unsupported 'arch=+zba,zbb' in the 'target' attribute string; 'target' attribute ignored}}
15 int __attribute__((target("arch=+zba,zbb"))) WithoutPlus(void) { return 0; }
17 //expected-warning@+1 {{unsupported 'arch=zba' in the 'target' attribute string; 'target' attribute ignored}}
18 int __attribute__((target("arch=zba"))) WithoutPlus2(void) { return 0; }