]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[PATCH] RISC-V: Deduplicate #error messages in testsuite
authorTsukasa OI <research_trasio@irq.a4lg.com>
Thu, 17 Aug 2023 13:52:14 +0000 (07:52 -0600)
committerJeff Law <jlaw@ventanamicro.com>
Thu, 17 Aug 2023 13:52:55 +0000 (07:52 -0600)
"#error Feature macro not defined" is required to test the existence of an
extension through the preprocessor.  However, multiple occurrence of the
exact same error message will confuse the developer once an error is
encountered.

This commit replaces such error messages to
"#error Feature macro for `EXT' not defined" to make which
macro is missing.

gcc/testsuite/ChangeLog:

* gcc.target/riscv/zvkn.c: Deduplicate #error messages.
* gcc.target/riscv/zvkn-1.c: Ditto.
* gcc.target/riscv/zvknc.c: Ditto.
* gcc.target/riscv/zvknc-1.c: Ditto.
* gcc.target/riscv/zvknc-2.c: Ditto.
* gcc.target/riscv/zvkng.c: Ditto.
* gcc.target/riscv/zvkng-1.c: Ditto.
* gcc.target/riscv/zvkng-2.c: Ditto.
* gcc.target/riscv/zvks.c: Ditto.
* gcc.target/riscv/zvks-1.c: Ditto.
* gcc.target/riscv/zvksc.c: Ditto.
* gcc.target/riscv/zvksc-1.c: Ditto.
* gcc.target/riscv/zvksc-2.c: Ditto.
* gcc.target/riscv/zvksg.c: Ditto.
* gcc.target/riscv/zvksg-1.c: Ditto.
* gcc.target/riscv/zvksg-2.c: Ditto.

16 files changed:
gcc/testsuite/gcc.target/riscv/zvkn-1.c
gcc/testsuite/gcc.target/riscv/zvkn.c
gcc/testsuite/gcc.target/riscv/zvknc-1.c
gcc/testsuite/gcc.target/riscv/zvknc-2.c
gcc/testsuite/gcc.target/riscv/zvknc.c
gcc/testsuite/gcc.target/riscv/zvkng-1.c
gcc/testsuite/gcc.target/riscv/zvkng-2.c
gcc/testsuite/gcc.target/riscv/zvkng.c
gcc/testsuite/gcc.target/riscv/zvks-1.c
gcc/testsuite/gcc.target/riscv/zvks.c
gcc/testsuite/gcc.target/riscv/zvksc-1.c
gcc/testsuite/gcc.target/riscv/zvksc-2.c
gcc/testsuite/gcc.target/riscv/zvksc.c
gcc/testsuite/gcc.target/riscv/zvksg-1.c
gcc/testsuite/gcc.target/riscv/zvksg-2.c
gcc/testsuite/gcc.target/riscv/zvksg.c

index 83935b068320e17e35b5d45aae0e08d44e26a156..84a3b577a49650aba6c00428b57688e7052fa145 100644 (file)
@@ -3,23 +3,23 @@
 /* { dg-options "-march=rv32gc_zvkned_zvknhb_zvbb_zvkt" { target { rv32 } } } */
 
 #ifndef __riscv_zvkn
-#error Feature macro not defined
+#error Feature macro for `Zvkn' not defined
 #endif
 
 #ifndef __riscv_zvkned
-#error Feature macro not defined
+#error Feature macro for `Zvkned' not defined
 #endif
 
 #ifndef __riscv_zvknhb
-#error Feature macro not defined
+#error Feature macro for `Zvknhb' not defined
 #endif
 
 #ifndef __riscv_zvbb
-#error Feature macro not defined
+#error Feature macro for `Zvbb' not defined
 #endif
 
 #ifndef __riscv_zvkt
-#error Feature macro not defined
+#error Feature macro for `Zvkt' not defined
 #endif
 
 int
index af3db40c8f6801759edeeb33c1e271a9d399fcb5..b42c1881b628160ab1db74d4f4765dbbc66eadc2 100644 (file)
@@ -3,23 +3,23 @@
 /* { dg-options "-march=rv32gc_zvkn" { target { rv32 } } } */
 
 #ifndef __riscv_zvkn
-#error Feature macro not defined
+#error Feature macro for `Zvkn' not defined
 #endif
 
 #ifndef __riscv_zvkned
-#error Feature macro not defined
+#error Feature macro for `Zvkned' not defined
 #endif
 
 #ifndef __riscv_zvknhb
-#error Feature macro not defined
+#error Feature macro for `Zvknhb' not defined
 #endif
 
 #ifndef __riscv_zvbb
-#error Feature macro not defined
+#error Feature macro for `Zvbb' not defined
 #endif
 
 #ifndef __riscv_zvkt
-#error Feature macro not defined
+#error Feature macro for `Zvkt' not defined
 #endif
 
 int
index eca2767089545e4f07f20f96b7c0b211507fa632..5c456a6add78e0604e359b184b7c0d99fd8c3839 100644 (file)
@@ -3,31 +3,31 @@
 /* { dg-options "-march=rv32gc_zvkned_zvknhb_zvbb_zvkt_zvbc" { target { rv32 } } } */
 
 #ifndef __riscv_zvknc
-#error Feature macro not defined
+#error Feature macro for `Zvknc' not defined
 #endif
 
 #ifndef __riscv_zvkn
-#error Feature macro not defined
+#error Feature macro for `Zvkn' not defined
 #endif
 
 #ifndef __riscv_zvkned
-#error Feature macro not defined
+#error Feature macro for `Zvkned' not defined
 #endif
 
 #ifndef __riscv_zvknhb
-#error Feature macro not defined
+#error Feature macro for `Zvknhb' not defined
 #endif
 
 #ifndef __riscv_zvbb
-#error Feature macro not defined
+#error Feature macro for `Zvbb' not defined
 #endif
 
 #ifndef __riscv_zvkt
-#error Feature macro not defined
+#error Feature macro for `Zvkt' not defined
 #endif
 
 #ifndef __riscv_zvbc
-#error Feature macro not defined
+#error Feature macro for `Zvbc' not defined
 #endif
 
 int
index e77343a27f35305302915e1b77e4f85f98556a71..fbedbf33636766af733a2cc2a39b4edefe8cb35c 100644 (file)
@@ -3,31 +3,31 @@
 /* { dg-options "-march=rv32gc_zvkn_zvbc" { target { rv32 } } } */
 
 #ifndef __riscv_zvknc
-#error Feature macro not defined
+#error Feature macro for `Zvknc' not defined
 #endif
 
 #ifndef __riscv_zvkn
-#error Feature macro not defined
+#error Feature macro for `Zvkn' not defined
 #endif
 
 #ifndef __riscv_zvkned
-#error Feature macro not defined
+#error Feature macro for `Zvkned' not defined
 #endif
 
 #ifndef __riscv_zvknhb
-#error Feature macro not defined
+#error Feature macro for `Zvknhb' not defined
 #endif
 
 #ifndef __riscv_zvbb
-#error Feature macro not defined
+#error Feature macro for `Zvbb' not defined
 #endif
 
 #ifndef __riscv_zvkt
-#error Feature macro not defined
+#error Feature macro for `Zvkt' not defined
 #endif
 
 #ifndef __riscv_zvbc
-#error Feature macro not defined
+#error Feature macro for `Zvbc' not defined
 #endif
 
 int
index 10bd471da45cd9eadb670bd2ca3555aba407991a..826e36ad4d9c2e6d90f0e80f1e44e3a585a45307 100644 (file)
@@ -3,31 +3,31 @@
 /* { dg-options "-march=rv32gc_zvknc" { target { rv32 } } } */
 
 #ifndef __riscv_zvknc
-#error Feature macro not defined
+#error Feature macro for `Zvknc' not defined
 #endif
 
 #ifndef __riscv_zvkn
-#error Feature macro not defined
+#error Feature macro for `Zvkn' not defined
 #endif
 
 #ifndef __riscv_zvkned
-#error Feature macro not defined
+#error Feature macro for `Zvkned' not defined
 #endif
 
 #ifndef __riscv_zvknhb
-#error Feature macro not defined
+#error Feature macro for `Zvknhb' not defined
 #endif
 
 #ifndef __riscv_zvbb
-#error Feature macro not defined
+#error Feature macro for `Zvbb' not defined
 #endif
 
 #ifndef __riscv_zvkt
-#error Feature macro not defined
+#error Feature macro for `Zvkt' not defined
 #endif
 
 #ifndef __riscv_zvbc
-#error Feature macro not defined
+#error Feature macro for `Zvbc' not defined
 #endif
 
 int
index f4f3cc8e41713ecf47fa2b8b8bd9460519e393c1..c1424127d433af8ffa7dda3d07644c9fe10c1f69 100644 (file)
@@ -3,31 +3,31 @@
 /* { dg-options "-march=rv32gc_zvkned_zvknhb_zvbb_zvkt_zvkg" { target { rv32 } } } */
 
 #ifndef __riscv_zvkng
-#error Feature macro not defined
+#error Feature macro for `Zvkng' not defined
 #endif
 
 #ifndef __riscv_zvkn
-#error Feature macro not defined
+#error Feature macro for `Zvkn' not defined
 #endif
 
 #ifndef __riscv_zvkned
-#error Feature macro not defined
+#error Feature macro for `Zvkned' not defined
 #endif
 
 #ifndef __riscv_zvknhb
-#error Feature macro not defined
+#error Feature macro for `Zvknhb' not defined
 #endif
 
 #ifndef __riscv_zvbb
-#error Feature macro not defined
+#error Feature macro for `Zvbb' not defined
 #endif
 
 #ifndef __riscv_zvkt
-#error Feature macro not defined
+#error Feature macro for `Zvkt' not defined
 #endif
 
 #ifndef __riscv_zvkg
-#error Feature macro not defined
+#error Feature macro for `Zvkg' not defined
 #endif
 
 int
index 2631c1a1c2529ffac7c547738fbc1b1772b2cd74..0150dcaabe6012ddda63ad7cf121b38e3123ca09 100644 (file)
@@ -3,31 +3,31 @@
 /* { dg-options "-march=rv32gc_zvkn_zvkg" { target { rv32 } } } */
 
 #ifndef __riscv_zvkng
-#error Feature macro not defined
+#error Feature macro for `Zvkng' not defined
 #endif
 
 #ifndef __riscv_zvkn
-#error Feature macro not defined
+#error Feature macro for `Zvkn' not defined
 #endif
 
 #ifndef __riscv_zvkned
-#error Feature macro not defined
+#error Feature macro for `Zvkned' not defined
 #endif
 
 #ifndef __riscv_zvknhb
-#error Feature macro not defined
+#error Feature macro for `Zvknhb' not defined
 #endif
 
 #ifndef __riscv_zvbb
-#error Feature macro not defined
+#error Feature macro for `Zvbb' not defined
 #endif
 
 #ifndef __riscv_zvkt
-#error Feature macro not defined
+#error Feature macro for `Zvkt' not defined
 #endif
 
 #ifndef __riscv_zvkg
-#error Feature macro not defined
+#error Feature macro for `Zvkg' not defined
 #endif
 
 int
index e6c950e93237551d52c1bf888aead5a8e5fda112..20cf09890c86f45a9694f0a2ce1be5513f01f133 100644 (file)
@@ -3,31 +3,31 @@
 /* { dg-options "-march=rv32gc_zvkng" { target { rv32 } } } */
 
 #ifndef __riscv_zvkng
-#error Feature macro not defined
+#error Feature macro for `Zvkng' not defined
 #endif
 
 #ifndef __riscv_zvkn
-#error Feature macro not defined
+#error Feature macro for `Zvkn' not defined
 #endif
 
 #ifndef __riscv_zvkned
-#error Feature macro not defined
+#error Feature macro for `Zvkned' not defined
 #endif
 
 #ifndef __riscv_zvknhb
-#error Feature macro not defined
+#error Feature macro for `Zvknhb' not defined
 #endif
 
 #ifndef __riscv_zvbb
-#error Feature macro not defined
+#error Feature macro for `Zvbb' not defined
 #endif
 
 #ifndef __riscv_zvkt
-#error Feature macro not defined
+#error Feature macro for `Zvkt' not defined
 #endif
 
 #ifndef __riscv_zvkg
-#error Feature macro not defined
+#error Feature macro for `Zvkg' not defined
 #endif
 
 int
index 28ad26af1c14dacab63d94ad04d32a0a2fbacc4e..30d12539a9fb676190c049aecfd8538acaacf22e 100644 (file)
@@ -3,23 +3,23 @@
 /* { dg-options "-march=rv32gc_zvksed_zvksh_zvbb_zvkt" { target { rv32 } } } */
 
 #ifndef __riscv_zvks
-#error Feature macro not defined
+#error Feature macro for `Zvks' not defined
 #endif
 
 #ifndef __riscv_zvksed
-#error Feature macro not defined
+#error Feature macro for `Zvksed' not defined
 #endif
 
 #ifndef __riscv_zvksh
-#error Feature macro not defined
+#error Feature macro for `Zvksh' not defined
 #endif
 
 #ifndef __riscv_zvbb
-#error Feature macro not defined
+#error Feature macro for `Zvbb' not defined
 #endif
 
 #ifndef __riscv_zvkt
-#error Feature macro not defined
+#error Feature macro for `Zvkt' not defined
 #endif
 
 int
index a48c9186d5e457922f20961c0ef4ba7c1b1d3d31..4af3a2a96ae9dae54d8a8f5a59ba9b60c453e1d5 100644 (file)
@@ -3,23 +3,23 @@
 /* { dg-options "-march=rv32gc_zvks" { target { rv32 } } } */
 
 #ifndef __riscv_zvks
-#error Feature macro not defined
+#error Feature macro for `Zvks' not defined
 #endif
 
 #ifndef __riscv_zvksed
-#error Feature macro not defined
+#error Feature macro for `Zvksed' not defined
 #endif
 
 #ifndef __riscv_zvksh
-#error Feature macro not defined
+#error Feature macro for `Zvksh' not defined
 #endif
 
 #ifndef __riscv_zvbb
-#error Feature macro not defined
+#error Feature macro for `Zvbb' not defined
 #endif
 
 #ifndef __riscv_zvkt
-#error Feature macro not defined
+#error Feature macro for `Zvkt' not defined
 #endif
 
 int
index 72d9676e68c59459754a5d16987907e67f8b8aea..b547ae8efe2d775ea82c5ae8f8f04a88bc9b8509 100644 (file)
@@ -3,31 +3,31 @@
 /* { dg-options "-march=rv32gc_zvksed_zvksh_zvbb_zvkt_zvbc" { target { rv32 } } } */
 
 #ifndef __riscv_zvksc
-#error Feature macro not defined
+#error Feature macro for `Zvksc' not defined
 #endif
 
 #ifndef __riscv_zvks
-#error Feature macro not defined
+#error Feature macro for `Zvks' not defined
 #endif
 
 #ifndef __riscv_zvksed
-#error Feature macro not defined
+#error Feature macro for `Zvksed' not defined
 #endif
 
 #ifndef __riscv_zvksh
-#error Feature macro not defined
+#error Feature macro for `Zvksh' not defined
 #endif
 
 #ifndef __riscv_zvbb
-#error Feature macro not defined
+#error Feature macro for `Zvbb' not defined
 #endif
 
 #ifndef __riscv_zvkt
-#error Feature macro not defined
+#error Feature macro for `Zvkt' not defined
 #endif
 
 #ifndef __riscv_zvbc
-#error Feature macro not defined
+#error Feature macro for `Zvbc' not defined
 #endif
 
 int
index c78b4fe90772cdf17a9c157db1073c50423c5d3c..d0623bbf16c38869ccd1b2bf64e14560cb133610 100644 (file)
@@ -3,31 +3,31 @@
 /* { dg-options "-march=rv32gc_zvks_zvbc" { target { rv32 } } } */
 
 #ifndef __riscv_zvksc
-#error Feature macro not defined
+#error Feature macro for `Zvksc' not defined
 #endif
 
 #ifndef __riscv_zvks
-#error Feature macro not defined
+#error Feature macro for `Zvks' not defined
 #endif
 
 #ifndef __riscv_zvksed
-#error Feature macro not defined
+#error Feature macro for `Zvksed' not defined
 #endif
 
 #ifndef __riscv_zvksh
-#error Feature macro not defined
+#error Feature macro for `Zvksh' not defined
 #endif
 
 #ifndef __riscv_zvbb
-#error Feature macro not defined
+#error Feature macro for `Zvbb' not defined
 #endif
 
 #ifndef __riscv_zvkt
-#error Feature macro not defined
+#error Feature macro for `Zvkt' not defined
 #endif
 
 #ifndef __riscv_zvbc
-#error Feature macro not defined
+#error Feature macro for `Zvbc' not defined
 #endif
 
 int
index fb61561a2af5c5fe3f71bb757d5dd0326288fb44..f712aed7b8f99a36ff41164cf0f57a9247602712 100644 (file)
@@ -3,31 +3,31 @@
 /* { dg-options "-march=rv32gc_zvksc" { target { rv32 } } } */
 
 #ifndef __riscv_zvksc
-#error Feature macro not defined
+#error Feature macro for `Zvksc' not defined
 #endif
 
 #ifndef __riscv_zvks
-#error Feature macro not defined
+#error Feature macro for `Zvks' not defined
 #endif
 
 #ifndef __riscv_zvksed
-#error Feature macro not defined
+#error Feature macro for `Zvksed' not defined
 #endif
 
 #ifndef __riscv_zvksh
-#error Feature macro not defined
+#error Feature macro for `Zvksh' not defined
 #endif
 
 #ifndef __riscv_zvbb
-#error Feature macro not defined
+#error Feature macro for `Zvbb' not defined
 #endif
 
 #ifndef __riscv_zvkt
-#error Feature macro not defined
+#error Feature macro for `Zvkt' not defined
 #endif
 
 #ifndef __riscv_zvbc
-#error Feature macro not defined
+#error Feature macro for `Zvbc' not defined
 #endif
 
 int
index 8cbd0331168c81b1139be0a3e7f9bf328c3dbd08..ed1e4f73dfec3138d1959cf840701d724e268fbb 100644 (file)
@@ -3,31 +3,31 @@
 /* { dg-options "-march=rv32gc_zvksed_zvksh_zvbb_zvkt_zvkg" { target { rv32 } } } */
 
 #ifndef __riscv_zvksg
-#error Feature macro not defined
+#error Feature macro for `Zvksg' not defined
 #endif
 
 #ifndef __riscv_zvks
-#error Feature macro not defined
+#error Feature macro for `Zvks' not defined
 #endif
 
 #ifndef __riscv_zvksed
-#error Feature macro not defined
+#error Feature macro for `Zvksed' not defined
 #endif
 
 #ifndef __riscv_zvksh
-#error Feature macro not defined
+#error Feature macro for `Zvksh' not defined
 #endif
 
 #ifndef __riscv_zvbb
-#error Feature macro not defined
+#error Feature macro for `Zvbb' not defined
 #endif
 
 #ifndef __riscv_zvkt
-#error Feature macro not defined
+#error Feature macro for `Zvkt' not defined
 #endif
 
 #ifndef __riscv_zvkg
-#error Feature macro not defined
+#error Feature macro for `Zvkg' not defined
 #endif
 
 int
index d56c47e897cca1676d95dc3f7fcccf2edf0f16f3..4e6df2d55f846839a34c130590bdef88989a6b75 100644 (file)
@@ -3,31 +3,31 @@
 /* { dg-options "-march=rv32gc_zvks_zvkg" { target { rv32 } } } */
 
 #ifndef __riscv_zvksg
-#error Feature macro not defined
+#error Feature macro for `Zvksg' not defined
 #endif
 
 #ifndef __riscv_zvks
-#error Feature macro not defined
+#error Feature macro for `Zvks' not defined
 #endif
 
 #ifndef __riscv_zvksed
-#error Feature macro not defined
+#error Feature macro for `Zvksed' not defined
 #endif
 
 #ifndef __riscv_zvksh
-#error Feature macro not defined
+#error Feature macro for `Zvksh' not defined
 #endif
 
 #ifndef __riscv_zvbb
-#error Feature macro not defined
+#error Feature macro for `Zvbb' not defined
 #endif
 
 #ifndef __riscv_zvkt
-#error Feature macro not defined
+#error Feature macro for `Zvkt' not defined
 #endif
 
 #ifndef __riscv_zvkg
-#error Feature macro not defined
+#error Feature macro for `Zvkg' not defined
 #endif
 
 int
index 44dffb41395497fc39113835d7a1d85e7df58c3c..e8a33f47ba41604a3f534da52475bb91604c02cd 100644 (file)
@@ -3,31 +3,31 @@
 /* { dg-options "-march=rv32gc_zvksg" { target { rv32 } } } */
 
 #ifndef __riscv_zvksg
-#error Feature macro not defined
+#error Feature macro for `Zvksg' not defined
 #endif
 
 #ifndef __riscv_zvks
-#error Feature macro not defined
+#error Feature macro for `Zvks' not defined
 #endif
 
 #ifndef __riscv_zvksed
-#error Feature macro not defined
+#error Feature macro for `Zvksed' not defined
 #endif
 
 #ifndef __riscv_zvksh
-#error Feature macro not defined
+#error Feature macro for `Zvksh' not defined
 #endif
 
 #ifndef __riscv_zvbb
-#error Feature macro not defined
+#error Feature macro for `Zvbb' not defined
 #endif
 
 #ifndef __riscv_zvkt
-#error Feature macro not defined
+#error Feature macro for `Zvkt' not defined
 #endif
 
 #ifndef __riscv_zvkg
-#error Feature macro not defined
+#error Feature macro for `Zvkg' not defined
 #endif
 
 int