PR pretty-print/67567 do not pass NULL as a string
authormanu <manu@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 25 Sep 2015 14:24:11 +0000 (14:24 +0000)
committermanu <manu@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 25 Sep 2015 14:24:11 +0000 (14:24 +0000)
commita6871bda07973b01bb6472dbd4cac03339cce8e2
tree21100e9b2f3e1a93346e76fdaba64fa8547b8ad1
parentb0d054a98e062cb8541c1dd00bdae82d5ee4dc9e
PR pretty-print/67567 do not pass NULL as a string

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.

gcc/fortran/ChangeLog:

2015-09-25  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-25  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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@228131 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/fortran/ChangeLog
gcc/fortran/resolve.c
gcc/pretty-print.c
gcc/pretty-print.h