https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77732
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2017-08-10
CC| |jamborm at gcc dot gnu.org,
| |marxin at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Ok, so GIMPLE IL is different in between x86_64-linux-gnu:
__attribute__((noinline))
bar (const struct S f, int x)
{
int _5;
<bb 2> [100.00%] [count: INV]:
hs = &f;
_5 = foo (f, x_3(D));
return _5;
}
and hppa-unknown-linux-gnu:
__attribute__((noinline))
bar (const struct S f, int x)
{
const struct S f.0;
int _6;
<bb 2> [100.00%] [count: INV]:
f.0 = f;
hs = &f.0;
_6 = foo (f.0, x_4(D));
return _6;
}
We decide about creation of f.0 variable in:
│2472 /* See if this arg was passed by invisible reference. */
│2473 if (pass_by_reference (&all->args_so_far_v, passed_mode,
│2474 passed_type, data->named_arg))
│2475 {
│2476 passed_type = nominal_type = build_pointer_type
(passed_type);
│2477 data->passed_pointer = true;
>│2478 passed_mode = nominal_mode = TYPE_MODE (nominal_type);
|2479 }
So hppa uses invisible reference to pass the struct argument.
Thus I guess we should not run the test-case on hppa target? Martin can you
please take a look?