public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/96992] New: Class arrays of different ranks are rejected as storage association argument
@ 2020-09-09 8:53 tkoenig at gcc dot gnu.org
2020-10-05 20:52 ` [Bug fortran/96992] " dominiq at lps dot ens.fr
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2020-09-09 8:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96992
Bug ID: 96992
Summary: Class arrays of different ranks are rejected as
storage association argument
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: tkoenig at gcc dot gnu.org
Target Milestone: ---
The following program is wrongly rejected. I don't find anything
wrong with it from my reading of the F2018 standard. This is classic
sequence association, as defined in 15.5.2.11 of F2018:
# An actual argument that represents an element sequence and
# corresponds to a dummy argument that is an array is sequence
# associated with the dummy argument. The rank and shape of the
# actual argument need not agree with the rank and shape of the
# dummy argument, but the number of elements in the dummy argument
# shall not exceed the number of elements in the element sequence
# of the actual argument. If the dummy argument is assumed-size,
# the number of elements in the dummy argument is exactly
# the number of elements in the element sequence.
module foo_mod
implicit none
type foo
integer :: i
end type foo
contains
subroutine d1(x,n)
integer, intent(in) :: n
class (foo), intent(out), dimension(n) :: x
select type(x)
class is(foo)
x%i = 42
class default
stop "Bad crazyness"
end select
end subroutine d1
subroutine d2(x,n)
integer, intent(in) :: n
class (foo), intent(in), dimension(n,n) :: x
select type (x)
class is (foo)
print *,x%i
class default
stop "Even worse crazyness"
end select
end subroutine d2
end module foo_mod
program main
use foo_mod
implicit none
type (foo), dimension(:), allocatable :: f
integer :: n
n = 3
allocate (f(n*n))
call d1(f,n*n)
call d2(f,n)
end program main
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/96992] Class arrays of different ranks are rejected as storage association argument
2020-09-09 8:53 [Bug fortran/96992] New: Class arrays of different ranks are rejected as storage association argument tkoenig at gcc dot gnu.org
@ 2020-10-05 20:52 ` dominiq at lps dot ens.fr
2024-06-14 7:31 ` vehre at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: dominiq at lps dot ens.fr @ 2020-10-05 20:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96992
Dominique d'Humieres <dominiq at lps dot ens.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P4
Ever confirmed|0 |1
Last reconfirmed| |2020-10-05
Status|UNCONFIRMED |NEW
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/96992] Class arrays of different ranks are rejected as storage association argument
2020-09-09 8:53 [Bug fortran/96992] New: Class arrays of different ranks are rejected as storage association argument tkoenig at gcc dot gnu.org
2020-10-05 20:52 ` [Bug fortran/96992] " dominiq at lps dot ens.fr
@ 2024-06-14 7:31 ` vehre at gcc dot gnu.org
2024-06-14 15:06 ` vehre at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: vehre at gcc dot gnu.org @ 2024-06-14 7:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96992
Andre Vehreschild <vehre at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |vehre at gcc dot gnu.org
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/96992] Class arrays of different ranks are rejected as storage association argument
2020-09-09 8:53 [Bug fortran/96992] New: Class arrays of different ranks are rejected as storage association argument tkoenig at gcc dot gnu.org
2020-10-05 20:52 ` [Bug fortran/96992] " dominiq at lps dot ens.fr
2024-06-14 7:31 ` vehre at gcc dot gnu.org
@ 2024-06-14 15:06 ` vehre at gcc dot gnu.org
2024-06-14 15:06 ` vehre at gcc dot gnu.org
2024-06-19 7:25 ` vehre at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: vehre at gcc dot gnu.org @ 2024-06-14 15:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96992
--- Comment #1 from Andre Vehreschild <vehre at gcc dot gnu.org> ---
Created attachment 58430
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58430&action=edit
Fix ICE and class array stride in dim 0.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/96992] Class arrays of different ranks are rejected as storage association argument
2020-09-09 8:53 [Bug fortran/96992] New: Class arrays of different ranks are rejected as storage association argument tkoenig at gcc dot gnu.org
` (2 preceding siblings ...)
2024-06-14 15:06 ` vehre at gcc dot gnu.org
@ 2024-06-14 15:06 ` vehre at gcc dot gnu.org
2024-06-19 7:25 ` vehre at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: vehre at gcc dot gnu.org @ 2024-06-14 15:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96992
Andre Vehreschild <vehre at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |WAITING
--- Comment #2 from Andre Vehreschild <vehre at gcc dot gnu.org> ---
Waiting for review of:
https://gcc.gnu.org/pipermail/fortran/2024-June/060582.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/96992] Class arrays of different ranks are rejected as storage association argument
2020-09-09 8:53 [Bug fortran/96992] New: Class arrays of different ranks are rejected as storage association argument tkoenig at gcc dot gnu.org
` (3 preceding siblings ...)
2024-06-14 15:06 ` vehre at gcc dot gnu.org
@ 2024-06-19 7:25 ` vehre at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: vehre at gcc dot gnu.org @ 2024-06-19 7:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96992
--- Comment #3 from Andre Vehreschild <vehre at gcc dot gnu.org> ---
Second version of patch. Now also working for negative strides:
https://gcc.gnu.org/pipermail/fortran/2024-June/060592.html
Waiting for review.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-06-19 7:25 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-09 8:53 [Bug fortran/96992] New: Class arrays of different ranks are rejected as storage association argument tkoenig at gcc dot gnu.org
2020-10-05 20:52 ` [Bug fortran/96992] " dominiq at lps dot ens.fr
2024-06-14 7:31 ` vehre at gcc dot gnu.org
2024-06-14 15:06 ` vehre at gcc dot gnu.org
2024-06-14 15:06 ` vehre at gcc dot gnu.org
2024-06-19 7:25 ` vehre at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).