diff options
author | Richard Biener <rguenther@suse.de> | 2014-07-28 08:25:34 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2014-07-28 08:25:34 +0000 |
commit | cfe2053d0edc7424353ef98c11c571b0475cf902 (patch) | |
tree | 0771311416d969e037a6cfb97f85e10f3fe6cd6c /gcc/tree-ssa-structalias.c | |
parent | f9a7442316d8a025c6adf1d14a8b491f3b044337 (diff) | |
download | gcc-cfe2053d0edc7424353ef98c11c571b0475cf902.zip gcc-cfe2053d0edc7424353ef98c11c571b0475cf902.tar.gz gcc-cfe2053d0edc7424353ef98c11c571b0475cf902.tar.bz2 |
re PR ipa/61921 (ICE: SIGSEGV in varpool_node::get_constructor(), at varpool.c:275 with -O2 -fipa-pta)
2014-07-28 Richard Biener <rguenther@suse.de>
PR tree-optimization/61921
* tree-ssa-structalias.c (create_variable_info_for_1): Check
if there is a varpool node before dereferencing it.
* gfortran.dg/pr61921.f90: New testcase.
From-SVN: r213114
Diffstat (limited to 'gcc/tree-ssa-structalias.c')
-rw-r--r-- | gcc/tree-ssa-structalias.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c index 1879fc0..0aa0c4b 100644 --- a/gcc/tree-ssa-structalias.c +++ b/gcc/tree-ssa-structalias.c @@ -5650,6 +5650,7 @@ create_variable_info_for_1 (tree decl, const char *name) auto_vec<fieldoff_s> fieldstack; fieldoff_s *fo; unsigned int i; + varpool_node *vnode; if (!declsize || !tree_fits_uhwi_p (declsize)) @@ -5671,7 +5672,8 @@ create_variable_info_for_1 (tree decl, const char *name) in IPA mode. Else we'd have to parse arbitrary initializers. */ && !(in_ipa_mode && is_global_var (decl) - && varpool_node::get (decl)->get_constructor ())) + && (vnode = varpool_node::get (decl)) + && vnode->get_constructor ())) { fieldoff_s *fo = NULL; bool notokay = false; |