This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] trivial cleanup in dwarf2out.c
- From: Ulrich Drepper <drepper at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 21 Jul 2017 10:36:46 +0200
- Subject: [PATCH] trivial cleanup in dwarf2out.c
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=drepper at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 8E1A5C0467C1
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 8E1A5C0467C1
While looking through dwarf2out.c I came across this if expression where
supposedly in case DWARF before 5 is used the 128 LEB encoding is used.
This of course cannot be the case. There isn't really a deeper problem
since the entire block is guarded by a test for at least DWARF 5.
I propose the following patch.
[gcc/ChangeLog]
2017-07-21 Ulrich Drepper <drepper@redhat.com>
* dwarf2out.c (output_file_names): Avoid double testing for
dwarf_version >= 5.
--- gcc/dwarf2out.c 2017-07-21 06:15:26.993826963 +0200
+++ gcc/dwarf2out.c-new 2017-07-21 10:29:03.382742797 +0200
@@ -11697,7 +11697,7 @@ output_file_names (void)
output_line_string (str_form, filename0, "File Entry", 0);
/* Include directory index. */
- if (dwarf_version >= 5 && idx_form != DW_FORM_udata)
+ if (idx_form != DW_FORM_udata)
dw2_asm_output_data (idx_form == DW_FORM_data1 ? 1 : 2,
0, NULL);
else