[Bug fortran/116829] Missing default initialization of finalizable non-polymorphic intent(out) arguments
anlauf at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Feb 5 21:32:32 GMT 2025
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116829
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2025-02-05
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
Keywords| |wrong-code
Priority|P3 |P4
--- Comment #1 from anlauf at gcc dot gnu.org ---
Confirmed. All versions since at least gcc-7 fail.
With finalization commented out, I see:
void makeaap (struct aaptype & restrict a)
{
{
struct aaptype aaptype.2;
aaptype.2.i = 0;
*a = aaptype.2;
}
as it should, but the original testcase has:
void makeaap (struct aaptype & restrict a)
{
{
struct array00_aaptype desc.6;
desc.6.dtype = {.elem_len=4, .version=0, .rank=0, .type=5};
desc.6.data = (void * restrict) a;
desc.6.span = (integer(kind=8)) desc.6.dtype.elem_len;
__final_m_Aaptype (&desc.6, 4, 0);
}
Clearly wrong.
More information about the Gcc-bugs
mailing list