Commit 62f96a79 by Martin Liska Committed by Martin Liska

Fix calls.c for a _complex type (PR ipa/80104).

2017-03-28  Martin Liska  <mliska@suse.cz>

	PR ipa/80104
	* cgraphunit.c (cgraph_node::expand_thunk): Mark argument of a
	thunk call as DECL_GIMPLE_REG_P when vector or complex type.
2017-03-28  Martin Liska  <mliska@suse.cz>

	PR ipa/80104
	* gcc.dg/ipa/pr80104.c: New test.

From-SVN: r246525
parent 0dee55fe
2017-03-28 Martin Liska <mliska@suse.cz>
PR ipa/80104
* cgraphunit.c (cgraph_node::expand_thunk): Mark argument of a
thunk call as DECL_GIMPLE_REG_P when vector or complex type.
2017-03-28 Claudiu Zissulescu <claziss@synopsys.com>
Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
......
......@@ -1806,6 +1806,10 @@ cgraph_node::expand_thunk (bool output_asm_thunks, bool force_gimple_thunk)
for (; i < nargs; i++, arg = DECL_CHAIN (arg))
{
tree tmp = arg;
if (VECTOR_TYPE_P (TREE_TYPE (arg))
|| TREE_CODE (TREE_TYPE (arg)) == COMPLEX_TYPE)
DECL_GIMPLE_REG_P (arg) = 1;
if (!is_gimple_val (arg))
{
tmp = create_tmp_reg (TYPE_MAIN_VARIANT
......
2017-03-28 Martin Liska <mliska@suse.cz>
PR ipa/80104
* gcc.dg/ipa/pr80104.c: New test.
2017-03-28 Marek Polacek <polacek@redhat.com>
PR sanitizer/80067
......
/* PR ipa/80104 */
/* { dg-do compile } */
/* { dg-options "-fipa-icf" } */
float
a (_Complex float b)
{
return *&b;
}
float
c (_Complex float b)
{
return (&b)[0];
}
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