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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do compile }
2
! Tests standard indepedendent constraints for variables in a data statement
3
!
4
! Contributed by Paul Thomas 
5
!
6
  module global
7
   integer n
8
  end module global
9
 
10
  use global
11
  integer q
12
  data n /0/            ! { dg-error "Cannot change attributes" }
13
  n = 1
14
  n = foo (n)
15
contains
16
  function foo (m) result (bar)
17
  integer p (m), bar
18
  integer, allocatable :: l(:)
19
  allocate (l(1))
20
  data l /42/           ! { dg-error "conflicts with ALLOCATABLE" }
21
  data p(1) /1/         ! { dg-error "non-constant array in DATA" }
22
  data q /1/            ! { dg-error "Host associated variable" }
23
  data m /1/            ! { dg-error "conflicts with DUMMY attribute" }
24
  data bar /99/         ! { dg-error "conflicts with RESULT" }
25
  end function foo
26
  function foobar ()
27
  integer foobar
28
  data foobar /0/       ! { dg-error "conflicts with FUNCTION" }
29
  end function foobar
30
end
31
 
32
! { dg-final { cleanup-modules "global" } }

powered by: WebSVN 2.1.0

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