[Bug fortran/34246] gfortran.dg/bind_c_usage_16.f03 doesn't work
dominiq at lps dot ens dot fr
gcc-bugzilla@gcc.gnu.org
Tue Nov 27 23:00:00 GMT 2007
------- Comment #5 from dominiq at lps dot ens dot fr 2007-11-27 23:00 -------
On Intel Darwin9 (working) -fdump-tree-gimple shows without -m64:
foo ()
{
character(kind=1) __result_foo[1:1];
__result_foo[1]{lb: 1 sz: 1} = 66;
D.831 = __result_foo;
return D.831;
}
bar (x)
{
character(kind=1) D.834;
character(kind=1) D.835[1:1];
character(kind=1) __result_bar[1:1];
D.834 = (*x)[1]{lb: 1 sz: 1};
__result_bar[1]{lb: 1 sz: 1} = D.834;
__result_bar[1]{lb: 1 sz: 1} = 65;
D.835 = __result_bar;
return D.835;
}
and with -m64:
foo ()
{
character(kind=1) D.872[1:1];
character(kind=1) __result_foo[1:1];
__result_foo[1]{lb: 1 sz: 1} = 66;
D.872 = __result_foo;
return D.872;
}
bar (x)
{
character(kind=1) D.875;
character(kind=1) D.876[1:1];
character(kind=1) __result_bar[1:1];
D.875 = (*x)[1]{lb: 1 sz: 1};
__result_bar[1]{lb: 1 sz: 1} = D.875;
__result_bar[1]{lb: 1 sz: 1} = 65;
D.876 = __result_bar;
return D.876;
}
and on PPC Darwin9 (non working) without -m64:
foo ()
{
character(kind=1) __result_foo[1:1];
__result_foo[1]{lb: 1 sz: 1} = 66;
<retval> = __result_foo;
return <retval>;
}
bar (x)
{
character(kind=1) D.951;
character(kind=1) __result_bar[1:1];
D.951 = (*x)[1]{lb: 1 sz: 1};
__result_bar[1]{lb: 1 sz: 1} = D.951;
__result_bar[1]{lb: 1 sz: 1} = 65;
<retval> = __result_bar;
return <retval>;
}
and with -m64:
foo ()
{
character(kind=1) __result_foo[1:1];
__result_foo[1]{lb: 1 sz: 1} = 66;
<retval> = __result_foo;
return <retval>;
}
bar (x)
{
character(kind=1) D.966;
character(kind=1) __result_bar[1:1];
D.966 = (*x)[1]{lb: 1 sz: 1};
__result_bar[1]{lb: 1 sz: 1} = D.966;
__result_bar[1]{lb: 1 sz: 1} = 65;
<retval> = __result_bar;
return <retval>;
}
So it seems to follow the same pattern you see on x86-64-linux?
working:
+ D.864 = __result_foo;
+ return D.864;
not working:
- <retval> = __result_foo;
- return <retval>;
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34246
More information about the Gcc-bugs
mailing list