Fix misleading aarch64 mcpu/march warning string
authorJoel Hutton <joel.hutton@arm.com>
Fri, 28 Feb 2020 14:46:26 +0000 (14:46 +0000)
committerJoel Hutton <joel.hutton@arm.com>
Fri, 28 Feb 2020 15:19:00 +0000 (15:19 +0000)
The message for conflicting mcpu and march previously printed the
architecture of the CPU instead of the CPU name, as well as omitting the
extensions to the march string. This patch corrects both errors. This
patch fixes PR target/87612.

2020-02-27  Joel Hutton  <Joel.Hutton@arm.com>

        PR target/87612
        * config/aarch64/aarch64.c (aarch64_override_options): Fix
        misleading warning string.

gcc/ChangeLog
gcc/config/aarch64/aarch64.c

index 1992369d068a2a07a1fc11b2e1d37d0715c8a34c..f6a9ae2375ef5ce301eb88df574752be02ce63bd 100644 (file)
@@ -1,3 +1,9 @@
+2020-02-27  Joel Hutton  <Joel.Hutton@arm.com>
+
+       PR target/87612
+       * config/aarch64/aarch64.c (aarch64_override_options): Fix
+       misleading warning string.
+
 2020-02-27  Martin Sebor  <msebor@redhat.com>
 
        * doc/invoke.texi (-Wbuiltin-declaration-mismatch): Fix a typo.
index f53c98e73765387974cc14f3d3ab4840a9331a08..4b9747b4c5e70432e900b4087eaefab6da6e162a 100644 (file)
@@ -14131,8 +14131,8 @@ aarch64_override_options (void)
       if (selected_arch->arch != selected_cpu->arch)
        {
          warning (0, "switch %<-mcpu=%s%> conflicts with %<-march=%s%> switch",
-                      all_architectures[selected_cpu->arch].name,
-                      selected_arch->name);
+                      aarch64_cpu_string,
+                      aarch64_arch_string);
        }
       aarch64_isa_flags = arch_isa;
       explicit_arch = selected_arch->arch;