aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIain Buclaw <ibuclaw@gdcproject.org>2016-01-26 20:57:37 +0000
committerIain Buclaw <ibuclaw@gcc.gnu.org>2016-01-26 20:57:37 +0000
commit3671c99673af214992ef23e4fd9a28ab2417f33a (patch)
tree1fc286963a7658a6290aa88c8f52be4f2ae9b6a9
parent4d2d386c47b1738e7c5ab722cc1a73643e99bfd6 (diff)
downloadgcc-3671c99673af214992ef23e4fd9a28ab2417f33a.zip
gcc-3671c99673af214992ef23e4fd9a28ab2417f33a.tar.gz
gcc-3671c99673af214992ef23e4fd9a28ab2417f33a.tar.bz2
re PR rtl-optimization/69217 (ICE at var-tracking.c:5038 Segmentation fault)
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. From-SVN: r232845
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/var-tracking.c3
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index dd774be..e94010a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2016-01-26 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ 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.
+
2016-01-26 Jakub Jelinek <jakub@redhat.com>
PR target/68662
diff --git a/gcc/var-tracking.c b/gcc/var-tracking.c
index d044b7f..9f09d30 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;