Commit 285cf766 by Maxim Blinov Committed by Jim Wilson

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
parent 3090082c
2019-07-31 Maxim Blinov <maxim.blinov@embecosm.com>
* common/config/riscv/riscv-common.c: Check -march string ends
with null.
2019-07-31 Alexander Monakov <amonakov@ispras.ru> 2019-07-31 Alexander Monakov <amonakov@ispras.ru>
* ipa-devirt.c (type_warning_cmp): Make static. * ipa-devirt.c (type_warning_cmp): Make static.
......
...@@ -513,6 +513,13 @@ riscv_subset_list::parse (const char *arch, location_t loc) ...@@ -513,6 +513,13 @@ riscv_subset_list::parse (const char *arch, location_t loc)
if (p == NULL) if (p == NULL)
goto fail; goto fail;
if (*p != '\0')
{
error_at (loc, "%<-march=%s%>: unexpected ISA string at end: %qs",
arch, p);
goto fail;
}
return subset_list; return subset_list;
fail: fail:
......
2019-07-31 Maxim Blinov <maxim.blinov@embecosm.com>
* gcc.target/riscv/attribute-10.c: New test.
2019-07-31 Richard Biener <rguenther@suse.de> 2019-07-31 Richard Biener <rguenther@suse.de>
PR tree-optimization/91280 PR tree-optimization/91280
......
/* { dg-do compile } */
/* { dg-options "-O2 -march=rv32im_s_sx_unexpectedstring -mabi=ilp32" } */
int foo()
{
}
/* { dg-error "unexpected ISA string at end:" "" { target { "riscv*-*-*" } } 0 } */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment