| 1 |
! { dg-do compile } |
| 2 |
! { dg-options "-fcray-pointer" } |
| 3 |
! |
| 4 |
! Test the fix for PR36497 in which there was no error for the second |
| 5 |
! declaration of 'x'. |
| 6 |
! |
| 7 |
! Contributed by Tobias Burnus <[email protected]> |
| 8 |
! |
| 9 |
module test |
| 10 |
integer(8) ipt |
| 11 |
integer z(2), x |
| 12 |
pointer (ipt, x) |
| 13 |
end module |
| 14 |
|
| 15 |
program bar |
| 16 |
use test ! { dg-error "conflicts with symbol" } |
| 17 |
integer x ! { dg-error "conflicts with symbol" } |
| 18 |
ipt = loc(z(1)) |
| 19 |
x = 1 |
| 20 |
ipt = loc(z(2)) |
| 21 |
x = 3 |
| 22 |
if (any (z .ne. [1,3])) stop 1 |
| 23 |
end |