This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/25746] New: Elemental assignment gives wrong result


Hi,

now that elemental subroutines appear to not ICE anymore,
I found that the example code at

http://home.comcast.net/~kmbtib/Fortran_stuff/elem_assign.f90

gives a wrong result.

gfortran prints:

 original x =            7          11          13
 permuted x =           11          13           7
      new x =           11          13          11

However, the last line should equal the second.  It appears that
the assignment

   x = x((/2,3,1/))

does not properly recognize that source and target overlap.

Cheers,
-ha


-- 
           Summary: Elemental assignment gives wrong result
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: anlauf at gmx dot de
  GCC host triplet: i686-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25746



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]