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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [associate_7.f03] - Rev 694

Compare with Previous | Blame | View Log

! { dg-do run }
! { dg-options "-std=f2003 -fall-intrinsics" }

! PR fortran/38936
! Check association and pointers.

! Contributed by Daniel Kraft, d@domob.eu.

PROGRAM main
  IMPLICIT NONE
  INTEGER, TARGET :: tgt
  INTEGER, POINTER :: ptr

  tgt = 1
  ASSOCIATE (x => tgt)
    ptr => x
    IF (ptr /= 1) CALL abort ()
    ptr = 2
  END ASSOCIATE
  IF (tgt /= 2) CALL abort ()
END PROGRAM main

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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