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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [pointer_remapping_6.f08] - 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 "-std=f2008 -fcheck=bounds" }
3
! { dg-shouldfail "Bounds check" }
4
 
5
! PR fortran/29785
6
! Check that -fcheck=bounds catches too small target at runtime for
7
! pointer rank remapping.
8
 
9
! Contributed by Daniel Kraft, d@domob.eu.
10
 
11
PROGRAM main
12
  IMPLICIT NONE
13
  INTEGER, POINTER :: ptr(:, :)
14
  INTEGER :: n
15
 
16
  n = 10
17
  BLOCK
18
    INTEGER, TARGET :: arr(2*n)
19
 
20
    ! These are ok.
21
    ptr(1:5, 1:2) => arr
22
    ptr(1:5, 1:2) => arr(::2)
23
    ptr(-5:-1, 11:14) => arr
24
 
25
    ! This is not.
26
    ptr(1:3, 1:5) => arr(::2)
27
  END BLOCK
28
END PROGRAM main
29
! { dg-output "At line 26 of .*\nFortran runtime error: Target of rank remapping is too small \\(10 < 15\\)" }

powered by: WebSVN 2.1.0

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