PR27221, 058430b4a1 warnings while assembling the Linux kernel
authorAlan Modra <amodra@gmail.com>
Thu, 21 Jan 2021 06:20:02 +0000 (16:50 +1030)
committerAlan Modra <amodra@gmail.com>
Thu, 21 Jan 2021 08:40:15 +0000 (19:10 +1030)
PR 27221
* dwarf2dbg.c (dwarf2_gen_line_info_1): Don't warn about ignored
line number info when gas is generating it.
* testsuite/gas/elf/dwarf2-20.d: Adjust to not expect warnings.
* testsuite/gas/m68hc11/indexed12.d: Likewise.
* testsuite/gas/elf/elf.exp: Don't run warn-2.
* gas/testsuite/gas/elf/warn-2.s: Delete.

gas/ChangeLog
gas/dwarf2dbg.c
gas/testsuite/gas/elf/dwarf2-20.d
gas/testsuite/gas/elf/elf.exp
gas/testsuite/gas/elf/warn-2.s [deleted file]
gas/testsuite/gas/m68hc11/indexed12.d

index f390bf266136bdcf82e00c2b3943b31a102d8538..74185318b17eca1ee544e279589e775d5b0fdb41 100644 (file)
@@ -1,3 +1,13 @@
+2021-01-21  Alan Modra  <amodra@gmail.com>
+
+       PR 27221
+       * dwarf2dbg.c (dwarf2_gen_line_info_1): Don't warn about ignored
+       line number info when gas is generating it.
+       * testsuite/gas/elf/dwarf2-20.d: Adjust to not expect warnings.
+       * testsuite/gas/m68hc11/indexed12.d: Likewise.
+       * testsuite/gas/elf/elf.exp: Don't run warn-2.
+       * gas/testsuite/gas/elf/warn-2.s: Delete.
+
 2021-01-21  Alan Modra  <amodra@gmail.com>
 
        PR 27218
index 635a31cb48f763feeaa49fe69f77d5a70fc27740..4fbd1e38ec22cbc5f584d155fbe5fde04e306f24 100644 (file)
@@ -514,8 +514,9 @@ dwarf2_gen_line_info_1 (symbolS *label, struct dwarf2_line_info *loc)
   if ((now_seg->flags & need_flags) != need_flags)
     {
       /* FIXME: Add code to suppress multiple warnings ?  */
-      as_warn ("dwarf line number information for %s ignored",
-              segment_name (now_seg));
+      if (debug_type != DEBUG_DWARF2)
+       as_warn ("dwarf line number information for %s ignored",
+                segment_name (now_seg));
       return;
     }
 
index 7f3d21cec995e797e9cb8f7d8e69f7cbe9176f6b..e0c6c8d0a714681af38af043b281d09ecb10ea24 100644 (file)
@@ -5,10 +5,6 @@
 #xfail: mn102*-*
 # score-elf, tic6x-elf and xtensa-elf need special handling to support .nop 16
 #xfail: score-* tic6x-* xtensa-*
-#warning: .* \.alloc0 ignored
-#warning: .* \.alloc1 ignored
-#warning: .* \.nonalloc ignored
-#warning: .* \.nonallocexec ignored
 
 Contents of the .debug_aranges section:
 
index a0f98eddd67907903f8bb60126044b71b41a6c7c..4f7ff6a2e01aeadb5f97f97a5ac16c358a758b2e 100644 (file)
@@ -328,9 +328,4 @@ if { [is_elf_format] } then {
 
     run_dump_test "bignums"
     run_dump_test "section-symbol-redef"
-    
-    load_lib gas-dg.exp
-    dg-init
-    dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/err-*.s $srcdir/$subdir/warn-*.s]] "" ""
-    dg-finish
 }
diff --git a/gas/testsuite/gas/elf/warn-2.s b/gas/testsuite/gas/elf/warn-2.s
deleted file mode 100644 (file)
index 8a128a1..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-;# { dg-do assemble }
-;# { dg-options "--gdwarf2" }
-
-       .offset 40
-       .nop
-
-;# { dg-warning "Warning: dwarf line number information for .* ignored" "" { xfail v850*-*-* } 0 }
index 08279d73941234b6f6a9091a0113c3578a245d15..1862b6ac0742f9dcfeee16d0ea01bff0913b25f7 100644 (file)
@@ -2,10 +2,6 @@
 #as: -m68hc12 -gdwarf2
 #name: 68HC12 indexed addressing mode with 5, 9 and 16-bit offsets (indexed12)
 #source: indexed12.s
-#warning: .* line number information for \.data ignored
-#warning: .* line number information for \.data ignored
-#warning: .* line number information for \.data ignored
-#warning: .* line number information for \.data ignored
 
 .*: +file format elf32\-m68hc12