This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] trivial cleanup in dwarf2out.c
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Ulrich Drepper <drepper at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 21 Jul 2017 10:43:46 +0200
- Subject: Re: [PATCH] trivial cleanup in dwarf2out.c
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=jakub at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com B098F4A6E2
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com B098F4A6E2
- References: <114d09c6-29f7-6398-116a-4085c06d3b37@redhat.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Fri, Jul 21, 2017 at 10:36:46AM +0200, Ulrich Drepper wrote:
> 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.
Ok, thanks.
> --- 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
Jakub