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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [associate_3.f03] - Blame information for rev 774

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 "-std=f2003" }
3
 
4
! PR fortran/38936
5
! Check for errors with ASSOCIATE during parsing.
6
 
7
PROGRAM main
8
  IMPLICIT NONE
9
 
10
  ASSOCIATE ! { dg-error "Expected association list" }
11
 
12
  ASSOCIATE () ! { dg-error "Expected association" }
13
 
14
  ASSOCIATE (a => 1) 5 ! { dg-error "Junk after ASSOCIATE" }
15
 
16
  ASSOCIATE (x =>) ! { dg-error "Expected association" }
17
 
18
  ASSOCIATE (=> 5) ! { dg-error "Expected association" }
19
 
20
  ASSOCIATE (x => 5, ) ! { dg-error "Expected association" }
21
 
22
  myname: ASSOCIATE (a => 1)
23
  END ASSOCIATE ! { dg-error "Expected block name of 'myname'" }
24
 
25
  ASSOCIATE (b => 2)
26
  END ASSOCIATE myname ! { dg-error "Syntax error in END ASSOCIATE" }
27
 
28
  myname2: ASSOCIATE (c => 3)
29
  END ASSOCIATE myname3 ! { dg-error "Expected label 'myname2'" }
30
 
31
  ASSOCIATE (a => 1, b => 2, a => 3) ! { dg-error "Duplicate name 'a'" }
32
 
33
  ASSOCIATE (a => 5)
34
    INTEGER :: b ! { dg-error "Unexpected data declaration statement" }
35
  END ASSOCIATE
36
END PROGRAM main ! { dg-error "Expecting END ASSOCIATE" }
37
! { dg-excess-errors "Unexpected end of file" }

powered by: WebSVN 2.1.0

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