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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
! { dg-options "-pedantic-errors -mdalign" { target sh*-*-* } }
3
! Tests the fix for PR37614, in which the alignement of commons followed
4
! g77 rather than the standard or other compilers.
5
!
6
! Contributed by Tobias Burnus  
7
!
8
subroutine foo (z)
9
  real(8) x, y, z
10
  common i(8)
11
  equivalence (x, i(3)),(y,i(7))
12
  if ((i(1) .ne. 42) .or. (i(5) .ne. 43)) call abort
13
  if ((i(2) .ne. 0) .or. (i(2) .ne. 0)) call abort
14
  if ((x .ne. z) .or. (y .ne. z)) call abort
15
end subroutine
16
 
17
subroutine bar
18
  common i(8)
19
  i = 0
20
end subroutine
21
 
22
  real(8) x, y
23
  common i, x, j, y ! { dg-warning "Padding" }
24
  call bar
25
  i = 42
26
  j = 43
27
  x = atan (1.0)*4.0
28
  y = x
29
  call foo (x)
30
end
31
 

powered by: WebSVN 2.1.0

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