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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [equiv_constraint_5.f90] - Blame information for rev 801

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do compile }
2
! { dg-options "-O0" }
3
! PR20902 - Overlapping initializers in an equivalence block must
4
! have the same value.
5
!
6
! The code was replaced completely after the fix for PR30875, which
7
! is a repeat of the original and comes from the same contributor.
8
! The fix for 20902 was wrong.
9
!
10
! Contributed by Joost VandeVondele 
11
!
12
  TYPE T1
13
    sequence
14
    integer :: i=1
15
  END TYPE T1
16
  TYPE T2           ! OK because initializers are equal
17
    sequence
18
    integer :: i=1
19
  END TYPE T2
20
  TYPE T3
21
    sequence
22
    integer :: i=2 ! { dg-error "Overlapping unequal initializers" }
23
  END TYPE T3
24
  TYPE(T1) :: a1
25
  TYPE(T2) :: a2
26
  TYPE(T3) :: a3
27
  EQUIVALENCE (a1, a2)
28
  EQUIVALENCE (a1, a3)
29
  write(6, *) a1, a2, a3
30
END
31
 

powered by: WebSVN 2.1.0

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