URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 302 |
Rev 384 |
! { dg-do compile }
|
! { dg-do compile }
|
! { dg-options "-O0" }
|
! { dg-options "-O0" }
|
! PR20902 - Overlapping initializers in an equivalence block must
|
! PR20902 - Overlapping initializers in an equivalence block must
|
! have the same value.
|
! have the same value.
|
!
|
!
|
! The code was replaced completely after the fix for PR30875, which
|
! The code was replaced completely after the fix for PR30875, which
|
! is a repeat of the original and comes from the same contributor.
|
! is a repeat of the original and comes from the same contributor.
|
! The fix for 20902 was wrong.
|
! The fix for 20902 was wrong.
|
!
|
!
|
! Contributed by Joost VandeVondele
|
! Contributed by Joost VandeVondele
|
!
|
!
|
TYPE T1
|
TYPE T1
|
sequence
|
sequence
|
integer :: i=1
|
integer :: i=1
|
END TYPE T1
|
END TYPE T1
|
TYPE T2 ! OK because initializers are equal
|
TYPE T2 ! OK because initializers are equal
|
sequence
|
sequence
|
integer :: i=1
|
integer :: i=1
|
END TYPE T2
|
END TYPE T2
|
TYPE T3
|
TYPE T3
|
sequence
|
sequence
|
integer :: i=2 ! { dg-error "Overlapping unequal initializers" }
|
integer :: i=2 ! { dg-error "Overlapping unequal initializers" }
|
END TYPE T3
|
END TYPE T3
|
TYPE(T1) :: a1
|
TYPE(T1) :: a1
|
TYPE(T2) :: a2
|
TYPE(T2) :: a2
|
TYPE(T3) :: a3
|
TYPE(T3) :: a3
|
EQUIVALENCE (a1, a2)
|
EQUIVALENCE (a1, a2)
|
EQUIVALENCE (a1, a3)
|
EQUIVALENCE (a1, a3)
|
write(6, *) a1, a2, a3
|
write(6, *) a1, a2, a3
|
END
|
END
|
|
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.