Commit e0ffb247 by Richard Biener Committed by Richard Biener

re PR lto/64373 (ICE with lto related to variably modified type)

2015-01-13  Richard Biener  <rguenther@suse.de>

	PR lto/64373
	* lto-streamer-out.c (tree_is_indexable): Guard for NULL
	DECL_CONTEXT.

	* gcc.dg/lto/pr64373_0.c: New testcase.

From-SVN: r219531
parent bf84ac44
2015-01-13 Richard Biener <rguenther@suse.de>
PR lto/64373
* lto-streamer-out.c (tree_is_indexable): Guard for NULL
DECL_CONTEXT.
2015-01-13 Andrew Pinski <apinski@cavium.com> 2015-01-13 Andrew Pinski <apinski@cavium.com>
* config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp): Reject * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp): Reject
......
...@@ -154,7 +154,8 @@ tree_is_indexable (tree t) ...@@ -154,7 +154,8 @@ tree_is_indexable (tree t)
/* Parameters and return values of functions of variably modified types /* Parameters and return values of functions of variably modified types
must go to global stream, because they may be used in the type must go to global stream, because they may be used in the type
definition. */ definition. */
if (TREE_CODE (t) == PARM_DECL || TREE_CODE (t) == RESULT_DECL) if ((TREE_CODE (t) == PARM_DECL || TREE_CODE (t) == RESULT_DECL)
&& DECL_CONTEXT (t))
return variably_modified_type_p (TREE_TYPE (DECL_CONTEXT (t)), NULL_TREE); return variably_modified_type_p (TREE_TYPE (DECL_CONTEXT (t)), NULL_TREE);
/* IMPORTED_DECL is put into BLOCK and thus it never can be shared. */ /* IMPORTED_DECL is put into BLOCK and thus it never can be shared. */
else if (TREE_CODE (t) == IMPORTED_DECL) else if (TREE_CODE (t) == IMPORTED_DECL)
......
2015-01-13 Richard Biener <rguenther@suse.de>
PR lto/64373
* gcc.dg/lto/pr64373_0.c: New testcase.
2015-01-13 Andrew Pinski <apinski@cavium.com> 2015-01-13 Andrew Pinski <apinski@cavium.com>
* gcc.target/aarch64/volatileloadpair-1.c: New testcase. * gcc.target/aarch64/volatileloadpair-1.c: New testcase.
......
/* { dg-lto-do assemble } */
extern void b(int L, float (*data)[L]);
void a(void)
{
float* p = 0;
int i = 0;
b(10, (float (*)[10])(p + i));
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment