OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [gfortran.dg/] [derived_comp_array_ref_5.f90] - Diff between revs 302 and 384

Only display areas with differences | Details | Blame | View Log

Rev 302 Rev 384
! { dg-do compile }
! { dg-do compile }
! Tests the fix for PR33566, in which the first variable array ref
! Tests the fix for PR33566, in which the first variable array ref
! to v1 would cause an incompatible ranks error and the second an ICE.
! to v1 would cause an incompatible ranks error and the second an ICE.
!
!
! Contributed by Mikael Morin 
! Contributed by Mikael Morin 
!
!
      program test_vec
      program test_vec
      implicit none
      implicit none
      integer :: i
      integer :: i
      real    :: x
      real    :: x
      type vec3
      type vec3
        real, dimension(3) :: coords
        real, dimension(3) :: coords
      end type vec3
      end type vec3
      type(vec3),parameter :: v1 = vec3((/ 1.0, 2.0, 3.0 /))
      type(vec3),parameter :: v1 = vec3((/ 1.0, 2.0, 3.0 /))
      type(vec3)           :: v2
      type(vec3)           :: v2
      v2 = vec3((/ 1.0, 2.0, 3.0 /))
      v2 = vec3((/ 1.0, 2.0, 3.0 /))
      x = v1%coords(1)
      x = v1%coords(1)
      do i=1,3
      do i=1,3
        x = v1%coords(i)  ! used to fail
        x = v1%coords(i)  ! used to fail
        x = v2%coords(i)
        x = v2%coords(i)
      end do
      end do
      i = 2
      i = 2
      v2 = vec3 (v1%coords ((/i+1, i, i-1/))) ! also broken
      v2 = vec3 (v1%coords ((/i+1, i, i-1/))) ! also broken
      end program test_vec
      end program test_vec
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.