From 49f3f450046a63b5de61be28eb6023d86e0c950e Mon Sep 17 00:00:00 2001 From: Wilco Dijkstra Date: Mon, 3 Jun 2019 11:27:50 +0000 Subject: [PATCH] Fix alignment option parser (PR90684) Fix the alignment option parser to always allow up to 4 alignments. Now -falign-functions=16:8:8:8 no longer reports an error. gcc/ PR driver/90684 * opts.c (parse_and_check_align_values): Allow 4 alignment values. M gcc/ChangeLog M gcc/opts.c From-SVN: r271864 --- gcc/ChangeLog | 5 +++++ gcc/opts.c | 9 +-------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 06184edd27f..bb764ac3b47 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2019-06-03 Wilco Dijkstra + + PR driver/90684 + * opts.c (parse_and_check_align_values): Allow 4 alignment values. + 2019-06-03 Kyrylo Tkachov * config/aarch64/iterators.md (MAX_OPP): New code attr. diff --git a/gcc/opts.c b/gcc/opts.c index 9e396f85714..64f94ac8ffd 100644 --- a/gcc/opts.c +++ b/gcc/opts.c @@ -2022,14 +2022,7 @@ parse_and_check_align_values (const char *flag, free (str); /* Check that we have a correct number of values. */ -#ifdef SUBALIGN_LOG - unsigned max_valid_values = 4; -#else - unsigned max_valid_values = 2; -#endif - - if (result_values.is_empty () - || result_values.length () > max_valid_values) + if (result_values.is_empty () || result_values.length () > 4) { if (report_error) error_at (loc, "invalid number of arguments for %<-falign-%s%> " -- 2.30.2