[Bug fortran/104047] New: Invalid result with assignment of recursive derived type

arjen.markus895 at gmail dot com gcc-bugzilla@gcc.gnu.org
Sun Jan 16 11:14:04 GMT 2022


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.


More information about the Gcc-bugs mailing list