https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104047
Bug ID: 104047 Summary: Invalid result with assignment of recursive derived type Product: gcc Version: 11.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: arjen.markus895 at gmail dot com Target Milestone: --- Created attachment 52204 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52204&action=edit Source of the program in question The attached program uses a recursively defined derived type and uses the default assignment to handle variables of this type. The output is: chain1: 3 - expected: 3 chain2: 1 - expected: 1 chain2: 2 - expected: 2 chain2: 1 - expected: 1 chain2: 1 - expected: 1 chain2: 1 - expected: 2 The last value printed is wrong.