diff options
author | aldyh <aldyh@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-10-28 16:41:29 +0000 |
---|---|---|
committer | aldyh <aldyh@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-10-28 16:41:29 +0000 |
commit | d24c40791c9fa820fde38c3617eb19095ce78156 (patch) | |
tree | 57f0e6995a01567e1c4587d2b02e241704c80b34 /gcc/c-family/c-pretty-print.c | |
parent | cb419ccc45326d741fc3bb8f5fc10d7c4d293f75 (diff) | |
download | gcc-d24c40791c9fa820fde38c3617eb19095ce78156.tar.gz |
PR debug/77773
* c-pretty-print.c (simple_type_specifier): Do not dereference `t'
if NULL.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@241653 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-family/c-pretty-print.c')
-rw-r--r-- | gcc/c-family/c-pretty-print.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/gcc/c-family/c-pretty-print.c b/gcc/c-family/c-pretty-print.c index 90428cac183..7ad59003456 100644 --- a/gcc/c-family/c-pretty-print.c +++ b/gcc/c-family/c-pretty-print.c @@ -344,14 +344,17 @@ c_pretty_printer::simple_type_specifier (tree t) else { int prec = TYPE_PRECISION (t); + tree common_t; if (ALL_FIXED_POINT_MODE_P (TYPE_MODE (t))) - t = c_common_type_for_mode (TYPE_MODE (t), TYPE_SATURATING (t)); + common_t = c_common_type_for_mode (TYPE_MODE (t), + TYPE_SATURATING (t)); else - t = c_common_type_for_mode (TYPE_MODE (t), TYPE_UNSIGNED (t)); - if (TYPE_NAME (t)) + common_t = c_common_type_for_mode (TYPE_MODE (t), + TYPE_UNSIGNED (t)); + if (common_t && TYPE_NAME (common_t)) { - simple_type_specifier (t); - if (TYPE_PRECISION (t) != prec) + simple_type_specifier (common_t); + if (TYPE_PRECISION (common_t) != prec) { pp_colon (this); pp_decimal_int (this, prec); |