Fix duplicate label in gdb.dwarf2/dw2-op-out-param.S

Message ID 1595432525-20786-1-git-send-email-gbenson@redhat.com
State New
Headers show
Series
  • Fix duplicate label in gdb.dwarf2/dw2-op-out-param.S
Related show

Commit Message

H.J. Lu via Gdb-patches July 22, 2020, 3:42 p.m.
Hi all,

gdb.dwarf2/dw2-op-out-param.S contained a duplicate label, and failed
to build with clang with the following error:

 gdb compile failed, /gdbtest/src/gdb/testsuite/gdb.dwarf2/dw2-op-out-param.S:163:1:
       error: invalid symbol redefinition
 .Ltext5:
 ^

This commit renames the two labels as .Ltext5a and .Ltext5b, and
updates all references appropriately.

Checked on Fedora 31 x86_64, GCC and clang.  Ok to commit?

Cheers,
Gary

--
gdb/testsuite/ChangeLog:

	* gdb.dwarf2/dw2-op-out-param.S (.Ltext5): Fix duplicate label.
---
 gdb/testsuite/ChangeLog                     |  4 ++++
 gdb/testsuite/gdb.dwarf2/dw2-op-out-param.S | 16 ++++++++--------
 2 files changed, 12 insertions(+), 8 deletions(-)

-- 
1.8.3.1

Comments

Tom Tromey July 22, 2020, 4:36 p.m. | #1
>>>>> "Gary" == Gary Benson via Gdb-patches <gdb-patches@sourceware.org> writes:


Gary> gdb/testsuite/ChangeLog:

Gary> 	* gdb.dwarf2/dw2-op-out-param.S (.Ltext5): Fix duplicate label.

Looks good to me, thanks.

Tom
H.J. Lu via Gdb-patches Aug. 12, 2020, 1:51 p.m. | #2
Tom Tromey wrote:
> >>>>> "Gary" == Gary Benson via Gdb-patches <gdb-patches@sourceware.org> writes:

> 

> Gary> gdb/testsuite/ChangeLog:

> 

> Gary> 	* gdb.dwarf2/dw2-op-out-param.S (.Ltext5): Fix duplicate label.

> 

> Looks good to me, thanks.


Thanks Tom, I pushed it.

-- 
Gary Benson - he / him / his
Principal Software Engineer, Red Hat

Patch

diff --git a/gdb/testsuite/gdb.dwarf2/dw2-op-out-param.S b/gdb/testsuite/gdb.dwarf2/dw2-op-out-param.S
index 2a20b63..325a99d 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-op-out-param.S
+++ b/gdb/testsuite/gdb.dwarf2/dw2-op-out-param.S
@@ -153,14 +153,14 @@  breakpt:
         sub    $0x8,%rsp
         add    $0x8, %rsp
         retq
-.Ltext5:
+.Ltext5a:
         .size   breakpt, .-breakpt
 
         /* int_param_single_reg_loc */
 .globl int_param_single_reg_loc
         .type   int_param_single_reg_loc, @function
 int_param_single_reg_loc:
-.Ltext5:
+.Ltext5b:
         sub    $0x8,%rsp
 .Ltext6:
         nop
@@ -248,7 +248,7 @@  int_param_two_reg_pieces:
 .LASFDE0:
 	.long	.Lframe0                /* CIE reference */
 	.quad	.Ltext4                 /* start */
-	.quad	.Ltext5-.Ltext4         /* length */
+	.quad	.Ltext5a-.Ltext4        /* length */
         /* Instructions */
         .byte   0x7                     /* DW_CFA_undefined */
         .uleb128 0x2                    /* reg# */
@@ -264,11 +264,11 @@  int_param_two_reg_pieces:
 	.long	.LEFDE2-.LASFDE2        /* length */
 .LASFDE2:
 	.long	.Lframe0                /* CIE reference */
-	.quad	.Ltext5                 /* start */
-	.quad	.Ltext7-.Ltext5         /* length */
+	.quad	.Ltext5b                /* start */
+	.quad	.Ltext7-.Ltext5b        /* length */
         /* Instructions */
  	.byte	0x4
-	.long	.Ltext6-.Ltext5
+	.long	.Ltext6-.Ltext5b
 	.byte	0xe
 	.uleb128 0x10
 	.align 8
@@ -357,7 +357,7 @@  int_param_two_reg_pieces:
 	.string	"breakpt"               /* DW_AT_name */
 	.byte	0x1                     /* DW_AT_prototyped */
 	.quad	.Ltext4                 /* DW_AT_low_pc */
-	.quad	.Ltext5                 /* DW_AT_high_pc */
+	.quad	.Ltext5a                /* DW_AT_high_pc */
 
 .LDI2:
 	.uleb128 0x5                    /* DW_TAG_base_type */
@@ -401,7 +401,7 @@  int_param_two_reg_pieces:
 	.byte	0x1                     /* DW_AT_external */
 	.string	"int_param_single_reg_loc"                 /* DW_AT_name */
 	.byte	0x1                     /* DW_AT_prototyped */
-	.quad	.Ltext5                 /* DW_AT_low_pc */
+	.quad	.Ltext5b                /* DW_AT_low_pc */
 	.quad	.Ltext7                 /* DW_AT_high_pc */
 	.long	.LDI11 - .Ldebug_info0  /* DW_AT_sibling */