]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Fix Aarch64 bug in warning filtering.
authorTamar Christina <tamar.christina@arm.com>
Tue, 18 Sep 2018 13:36:37 +0000 (14:36 +0100)
committerTamar Christina <tamar.christina@arm.com>
Tue, 18 Sep 2018 13:52:53 +0000 (14:52 +0100)
This fixes a small bug with the warning filtering code, which when a line has
generated a warning and a template decode error (due to the way templates are
resolved) which would not have been emitted and warnings are being suppressed
with -W it would erroneously emit the error.

I have no testcase for this because the only places we generate warnings during
encoding/decoding now is using msr/mrs and system registers.  They don't have a
template that would trigger this.

However an upcoming patch series will have tests in it which would expose this bug.

gas/ChangeLog:

* config/tc-aarch64.c (output_operand_error_report): Apply filtering to
current instead of head message.

(cherry picked from commit af81c43b51e17c597c8eb5bfaa02fa7f5f6dbe72)

gas/ChangeLog
gas/config/tc-aarch64.c

index 31ee45157f573f9659101d2e323d9cb69df27543..682ccb0e1770bb68e11d5e3188d8391956e0598d 100644 (file)
@@ -1,3 +1,8 @@
+2018-09-18  Tamar Christina  <tamar.christina@arm.com>
+
+       * config/tc-aarch64.c (output_operand_error_report): Apply filtering to
+       current instead of head message.
+
 2018-09-17  Nick Clifton  <nickc@redhat.com>
 
        backport from mainline:
index 31985963e314cbe772afbd190d4b0ca6e9608466..c77de21d19dc1cc73df05f17c0e985152f3992ed 100644 (file)
@@ -4809,7 +4809,7 @@ output_operand_error_report (char *str, bfd_boolean non_fatal_only)
       /* If we don't want to print non-fatal errors then don't consider them
         at all.  */
       if (curr->detail.kind != kind
-         || (non_fatal_only && !head->detail.non_fatal))
+         || (non_fatal_only && !curr->detail.non_fatal))
        continue;
       /* If there are multiple errors, pick up the one with the highest
         mismatching operand index.  In the case of multiple errors with