diff options
author | Maxim Blinov <maxim.blinov@embecosm.com> | 2019-07-31 21:36:41 +0000 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 2019-07-31 14:36:41 -0700 |
commit | 285cf766c1309edd7e61bf0dc45754af987d1b26 (patch) | |
tree | 66055209daef2fc584601b4c1e27d95effeb05d6 /gcc/common | |
parent | 3090082cbefd8b1374f237bd4242b554490b2933 (diff) | |
download | gcc-285cf766c1309edd7e61bf0dc45754af987d1b26.zip gcc-285cf766c1309edd7e61bf0dc45754af987d1b26.tar.gz gcc-285cf766c1309edd7e61bf0dc45754af987d1b26.tar.bz2 |
RISC-V: Raise error on unexpected ISA string at end.
2019-07-31 Maxim Blinov <maxim.blinov@embecosm.com>
gcc/
* common/config/riscv/riscv-common.c: Check -march string ends
with null.
gcc/testsuite/
* gcc.target/riscv/attribute-10.c: New test.
From-SVN: r273951
Diffstat (limited to 'gcc/common')
-rw-r--r-- | gcc/common/config/riscv/riscv-common.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/common/config/riscv/riscv-common.c b/gcc/common/config/riscv/riscv-common.c index eeb7571..a16d6c5 100644 --- a/gcc/common/config/riscv/riscv-common.c +++ b/gcc/common/config/riscv/riscv-common.c @@ -513,6 +513,13 @@ riscv_subset_list::parse (const char *arch, location_t loc) if (p == NULL) goto fail; + if (*p != '\0') + { + error_at (loc, "%<-march=%s%>: unexpected ISA string at end: %qs", + arch, p); + goto fail; + } + return subset_list; fail: |