https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52921

Mikael Morin <mikael at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mikael at gcc dot gnu.org

--- Comment #2 from Mikael Morin <mikael at gcc dot gnu.org> ---
(In reply to Tobias Burnus from comment #1)
> I already get the valgrind warning
>    Conditional jump or move depends on uninitialised value(s)
> for
>         MY_ARR%ARR(I)%CMP = [1, 2]
> even without any optimization.
> 
> (I replaced the READ by an assignment and marked "i" as VOLATILE.)

No error here using the following program; FIXED?

      PROGRAM QUICK_TEST

      TYPE COMP
        INTEGER, ALLOCATABLE :: CMP(:)
      END TYPE COMP
      TYPE COMP_ARRAY
        TYPE (COMP), ALLOCATABLE :: ARR(:)
      END TYPE COMP_ARRAY

      INTEGER, VOLATILE :: I
      TYPE (COMP_ARRAY), TARGET :: MY_ARR

      I=10
      ALLOCATE (MY_ARR%ARR(I))
      MY_ARR%ARR(I)%CMP = [1, 2]

      END PROGRAM QUICK_TEST

Reply via email to