This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PR pretty-print/67567 do not pass NULL as a string
- From: Manuel LÃpez-IbÃÃez <lopezibanez at gmail dot com>
- To: Gcc Patch List <gcc-patches at gcc dot gnu dot org>, "fortran at gcc dot gnu dot org List" <fortran at gcc dot gnu dot org>, "Joseph S. Myers" <joseph at codesourcery dot com>, Dodji Seketeli <dodji at redhat dot com>
- Date: Sun, 20 Sep 2015 20:24:31 +0200
- Subject: Re: PR pretty-print/67567 do not pass NULL as a string
- Authentication-results: sourceware.org; auth=none
- References: <CAESRpQBH_-vymM7ugmvLG7BWptVpup9i7Sm9t2L71_aSTq==vA at mail dot gmail dot com>
PING: https://gcc.gnu.org/ml/gcc-patches/2015-09/msg01219.html
On 16 September 2015 at 19:45, Manuel LÃpez-IbÃÃez
<lopezibanez@gmail.com> wrote:
> Fortran passes NULL where a non-null string is expected by the pretty-printer,
> which causes a sanitizer warning. This could have been found earlier by using
> gcc_checking_assert. Even if the assertion is false, the result is just an
> incomplete diagnostic, thus it seems more user-friendly to assert only when
> checking. I do not have any idea how to properly fix the Fortran bug, thus this
> patch simply works-around it.
>
> Bootstrapped & regtested on x86_64-linux-gnu.
>
> OK?
>
> gcc/fortran/ChangeLog:
>
> 2015-09-15 Manuel LÃpez-IbÃÃez <manu@gcc.gnu.org>
>
> PR pretty-print/67567
> * resolve.c (resolve_fl_procedure): Work-around when iface->module
> == NULL.
>
> gcc/ChangeLog:
>
> 2015-09-15 Manuel LÃpez-IbÃÃez <manu@gcc.gnu.org>
>
> PR pretty-print/67567
> * pretty-print.c (pp_string): Add gcc_checking_assert.
> * pretty-print.h (output_buffer_append_r): Likewise.