Message ID | CABOHX+c3dd3baBDgWRJO2AGnuGJrkMU91SETM4RHEzH4=wV78w@mail.gmail.com |
---|---|
State | New |
Headers | show |
On Jan 23, 2016, Iain Buclaw <ibuclaw@gdcproject.org> wrote: > PR rtl-optimization/69217 > * var-tracking.c (tracked_record_parameter_p): Don't segfault if there > are no TYPE_FIELDS set for the record type. This looks good to me, thanks.
Author: Iain Buclaw <ibuclaw@gdcproject.org> Date: Sat Jan 23 13:42:51 2016 +0100 PR rtl-optimization/69217 * var-tracking.c (tracked_record_parameter_p): Don't segfault if there are no TYPE_FIELDS set for the record type. diff --git a/gcc/var-tracking.c b/gcc/var-tracking.c index 86183b3..de3a80b 100644 --- a/gcc/var-tracking.c +++ b/gcc/var-tracking.c @@ -5128,7 +5128,8 @@ tracked_record_parameter_p (tree t) if (TREE_CODE (type) != RECORD_TYPE) return false; - if (DECL_CHAIN (TYPE_FIELDS (type)) == NULL_TREE) + if (TYPE_FIELDS (type) == NULL_TREE + || DECL_CHAIN (TYPE_FIELDS (type)) == NULL_TREE) return false; return true;