repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
2017-12-08 Richard Biener <rguenther@suse.de>
[official-gcc.git]
/
gcc
/
testsuite
/
gfortran.dg
/
actual_rank_check_1.f90
blob
7167de4270c410f4100f00dd0381efbd88d9e8e4
1
! { dg-do compile }
2
! Test the fix for PR40158, where the errro message was not clear about scalars.
3
!
4
! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
5
!
6
implicit none
7
integer
::
i
(
4
,
5
),
j
8
i
=
0
9
call
sub1
(
i
)
10
call
sub1
(
j
)
! { dg-error "rank-1 and scalar" }
11
call
sub2
(
i
)
! { dg-error "scalar and rank-2" }
12
call
sub2
(
j
)
13
print
'(5i0)'
,
i
14
contains
15
subroutine
sub1
(
i1
)
16
integer
::
i1
(*)
17
i1
(
1
) =
2
18
end subroutine
sub1
19
subroutine
sub2
(
i2
)
20
integer
::
i2
21
i2
=
2
22
end subroutine
sub2
23
end