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
This commit is contained in:
Richard Biener 2014-07-28 08:25:34 +00:00 committed by Richard Biener
parent f9a7442316
commit cfe2053d0e
4 changed files with 29 additions and 1 deletions

View File

@ -1,3 +1,9 @@
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.
2014-07-28 Roman Gareev <gareevroman@gmail.com>
* graphite-sese-to-poly.c:

View File

@ -1,3 +1,8 @@
2014-07-28 Richard Biener <rguenther@suse.de>
PR tree-optimization/61921
* gfortran.dg/pr61921.f90: New testcase.
2014-07-28 Richard Biener <rguenther@suse.de>
PR rtl-optimization/61801

View File

@ -0,0 +1,15 @@
! { dg-do compile }
! { dg-options "-O2 -fipa-pta" }
MODULE min_heap
TYPE heap_t
END TYPE heap_t
CONTAINS
ELEMENTAL FUNCTION get_left_child(n) RESULT (child)
INTEGER, INTENT(IN) :: n
END FUNCTION get_left_child
ELEMENTAL FUNCTION get_value(heap, n) RESULT (value)
TYPE(heap_t), INTENT(IN) :: heap
INTEGER, INTENT(IN) :: n
END FUNCTION get_value
END MODULE min_heap

View File

@ -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;