diff options
author | Richard Biener <rguenther@suse.de> | 2018-06-14 10:55:00 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2018-06-14 10:55:00 +0000 |
commit | a16fa075a887aad84b4de0d6d396bec06d539e39 (patch) | |
tree | df1a26fcb9bbb3fedaee646002bfeb935b01a1ca /gcc | |
parent | 4c1d999a7e937da0d417e8153f54b646603bb210 (diff) | |
download | gcc-a16fa075a887aad84b4de0d6d396bec06d539e39.zip gcc-a16fa075a887aad84b4de0d6d396bec06d539e39.tar.gz gcc-a16fa075a887aad84b4de0d6d396bec06d539e39.tar.bz2 |
re PR ipa/86124 (ICE in create_variable_info_for, at tree-ssa-structalias.c:6123)
2018-06-14 Richard Biener <rguenther@suse.de>
PR ipa/86124
* tree-ssa-struct-alias.c (create_variable_info_for): Handle
NULL cgraph_node.
* gcc.dg/pr86124.c: New testcase.
From-SVN: r261587
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/pr86124.c | 11 | ||||
-rw-r--r-- | gcc/tree-ssa-structalias.c | 3 |
4 files changed, 24 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ceb0d66..bdd9493 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2018-06-14 Richard Biener <rguenther@suse.de> + + PR ipa/86124 + * tree-ssa-struct-alias.c (create_variable_info_for): Handle + NULL cgraph_node. + 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de> * config/rtems.h (STDINT_LONG32): Define. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 32d158f..1286073 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2018-06-14 Richard Biener <rguenther@suse.de> + + PR ipa/86124 + * gcc.dg/pr86124.c: New testcase. + 2018-06-13 Martin Sebor <msebor@redhat.com> PR tree-optimization/86114 diff --git a/gcc/testsuite/gcc.dg/pr86124.c b/gcc/testsuite/gcc.dg/pr86124.c new file mode 100644 index 0000000..218b482 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr86124.c @@ -0,0 +1,11 @@ +/* { dg-do compile } */ +/* { dg-options "-O -fipa-pta" } */ + +extern void a (void); + +void b (void) +{ + void *c; + c = a; + *(char *)c = 1; +} diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c index 73e500b..ac5d4bc 100644 --- a/gcc/tree-ssa-structalias.c +++ b/gcc/tree-ssa-structalias.c @@ -6120,7 +6120,8 @@ create_variable_info_for (tree decl, const char *name, bool add_id) cgraph_node *node; if (in_ipa_mode && TREE_CODE (decl) == FUNCTION_DECL - && (node = cgraph_node::get (decl))->ifunc_resolver) + && (node = cgraph_node::get (decl)) + && node->ifunc_resolver) { varinfo_t fi = get_vi_for_tree (node->get_alias_target ()->decl); constraint_expr rhs |