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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [duplicate_labels.f90] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
! { dg-do compile }
2
! PR 21257
3
program dups
4
 
5
  integer i,j,k
6
 
7
  abc: do i = 1, 3
8
  abc:    do j = 1, 3    ! { dg-error "Duplicate construct label" }
9
              k = i + j
10
          end do abc
11
       end do abc        ! { dg-error "Expecting END PROGRAM" }
12
 
13
  xyz: do i = 1, 2
14
          k = i + 2
15
       end do xyz
16
  xyz: do j = 1, 5      ! { dg-error "Duplicate construct label" }
17
          k = j + 2
18
       end do loop      ! { dg-error "Expecting END PROGRAM" }
19
 
20
  her: if (i == 1) then
21
  her:    if (j  == 1) then  ! { dg-error "Duplicate construct label" }
22
               k = i + j
23
          end if her
24
       end if her            ! { dg-error "Expecting END PROGRAM" }
25
 
26
  his: if (i == 1) then
27
           i = j
28
        end if his
29
  his: if (j === 1) then    ! { dg-error "Duplicate construct label" }
30
           print *, j
31
        end if his          ! { dg-error "Expecting END PROGRAM" }
32
 
33
  sgk: select case (i)
34
       case (1)
35
  sgk:   select case (j)    ! { dg-error "Duplicate construct label" }
36
          case (10)
37
             i = i + j
38
          case (20)
39
             j = j + i
40
          end select sgk
41
        case (2)             ! { dg-error "Unexpected CASE statement" }
42
            i = i + 1
43
            j = j + 1
44
        end select sgk       ! { dg-error "Expecting END PROGRAM" }
45
 
46
  apl: select case (i)
47
         case (1)
48
            k = 2
49
         case (2)
50
            j = 1
51
         end select apl
52
  apl: select case (i)  ! { dg-error "Duplicate construct label" }
53
         case (1)       ! { dg-error "Unexpected CASE statement" }
54
            j = 2
55
         case (2)       ! { dg-error "Unexpected CASE statement" }
56
            k = 1
57
         end select apl ! { dg-error "Expecting END PROGRAM" }
58
 
59
end program dups

powered by: WebSVN 2.1.0

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