re PR driver/71063 (ICE: Segmentation fault with --help="^")

PR driver/71063
	* opts.c (common_handle_option): Detect missing argument for --help^.

	* gcc.dg/opts-7.c: New test.

From-SVN: r236170
This commit is contained in:
Marek Polacek 2016-05-12 10:59:11 +00:00 committed by Marek Polacek
parent 5acc47a40d
commit a5fbf76d42
4 changed files with 33 additions and 12 deletions

View File

@ -1,3 +1,8 @@
2016-05-12 Marek Polacek <polacek@redhat.com>
PR driver/71063
* opts.c (common_handle_option): Detect missing argument for --help^.
2016-05-12 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
PR target/70830

View File

@ -1640,6 +1640,11 @@ common_handle_option (struct gcc_options *opts,
if (*a == '^')
{
++a;
if (*a == '\0')
{
error_at (loc, "missing argument to %qs", "--help=^");
break;
}
pflags = &exclude_flags;
}
else

View File

@ -1,3 +1,8 @@
2016-05-12 Marek Polacek <polacek@redhat.com>
PR driver/71063
* gcc.dg/opts-7.c: New test.
2016-05-12 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
PR target/70830

View File

@ -0,0 +1,6 @@
/* PR driver/71063 */
/* Test we don't ICE. */
/* { dg-do compile } */
/* { dg-options "--help=^" } */
/* { dg-error "missing argument to" "" { target *-*-* } 0 } */