testsuite: Unbreak compat.exp testing with alt compiler PR93294
authorJakub Jelinek <jakub@redhat.com>
Fri, 17 Jan 2020 08:30:17 +0000 (09:30 +0100)
committerJakub Jelinek <jakub@redhat.com>
Fri, 17 Jan 2020 08:33:06 +0000 (09:33 +0100)
2020-01-17  Jakub Jelinek  <jakub@redhat.com>

PR testsuite/93294
* lib/c-compat.exp (compat-use-alt-compiler): Handle
-fdiagnostics-urls=never similarly to -fdiagnostics-color=never.
(compat_setup_dfp): Likewise.

gcc/testsuite/ChangeLog
gcc/testsuite/lib/c-compat.exp

index 6fa2e159d015992049d17dd2adcb658156ce3bb0..eea3bd2ccb371e0202166d34ffc21135527a3c3d 100644 (file)
@@ -1,3 +1,10 @@
+2020-01-17  Jakub Jelinek  <jakub@redhat.com>
+
+       PR testsuite/93294
+       * lib/c-compat.exp (compat-use-alt-compiler): Handle
+       -fdiagnostics-urls=never similarly to -fdiagnostics-color=never.
+       (compat_setup_dfp): Likewise.
+
 2020-01-16  Kerem Kat  <keremkat@gmail.com>
 
        PR c/92833
index 3b94b8814afe9e6fee6bb55ecb254f0eeed45fec..9493c214aea9d6733f90fa80f8093eaa6dd7ae52 100644 (file)
@@ -36,6 +36,7 @@ load_lib target-libpath.exp
 proc compat-use-alt-compiler { } {
     global GCC_UNDER_TEST ALT_CC_UNDER_TEST
     global compat_same_alt compat_alt_caret compat_alt_color compat_no_line_no
+    global compat_alt_urls
     global TEST_ALWAYS_FLAGS
 
     # We don't need to do this if the alternate compiler is actually
@@ -48,6 +49,9 @@ proc compat-use-alt-compiler { } {
        if { $compat_alt_color == 0 } then {
            regsub -- "-fdiagnostics-color=never" $TEST_ALWAYS_FLAGS "" TEST_ALWAYS_FLAGS
        }
+       if { $compat_alt_urls == 0 } then {
+           regsub -- "-fdiagnostics-urls=never" $TEST_ALWAYS_FLAGS "" TEST_ALWAYS_FLAGS
+       }
        if { $compat_no_line_no == 0 } then {
            regsub -- "-fno-diagnostics-show-line-numbers" $TEST_ALWAYS_FLAGS "" TEST_ALWAYS_FLAGS
        }
@@ -80,11 +84,13 @@ proc compat_setup_dfp { } {
     global compat_have_dfp
     global compat_alt_caret
     global compat_alt_color
+    global compat_alt_urls
     global compat_no_line_no
     global TEST_ALWAYS_FLAGS compat_save_TEST_ALWAYS_FLAGS
 
     set compat_alt_caret 0
     set compat_alt_color 0
+    set compat_alt_urls 0
     set compat_no_line_no 0
     set compat_save_TEST_ALWAYS_FLAGS $TEST_ALWAYS_FLAGS
 
@@ -105,6 +111,10 @@ proc compat_setup_dfp { } {
                int dummy; } "-fdiagnostics-color=never"] != 0 } {
            set compat_alt_color 1
        }
+       if { [check_no_compiler_messages_nocache compat_alt_has_urls object {
+               int dummy; } "-fdiagnostics-urls=never"] != 0 } {
+           set compat_alt_urls 1
+       }
        if { [check_no_compiler_messages_nocache compat_alt_has_no_line_no object {
                int dummy; } "-fno-diagnostics-show-line-numbers"] != 0 } {
            set compat_no_line_no 1