public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/93678] [9/10/11 Regression] ICE in 9.2/9.2.1 not happening in previous gfortran versions
[not found] <bug-93678-4@http.gcc.gnu.org/bugzilla/>
@ 2020-07-12 12:34 ` tkoenig at gcc dot gnu.org
2020-07-12 12:55 ` tkoenig at gcc dot gnu.org
` (11 subsequent siblings)
12 siblings, 0 replies; 13+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2020-07-12 12:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93678
Thomas Koenig <tkoenig at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|ICE in 9.2/9.2.1 not |[9/10/11 Regression] ICE in
|happening in previous |9.2/9.2.1 not happening in
|gfortran versions |previous gfortran versions
Target Milestone|--- |9.4
CC| |tkoenig at gcc dot gnu.org
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/93678] [9/10/11 Regression] ICE in 9.2/9.2.1 not happening in previous gfortran versions
[not found] <bug-93678-4@http.gcc.gnu.org/bugzilla/>
2020-07-12 12:34 ` [Bug fortran/93678] [9/10/11 Regression] ICE in 9.2/9.2.1 not happening in previous gfortran versions tkoenig at gcc dot gnu.org
@ 2020-07-12 12:55 ` tkoenig at gcc dot gnu.org
2020-07-12 13:08 ` [Bug fortran/93678] [9/10/11 Regression] ICE with TRANSFER and typebound procedures tkoenig at gcc dot gnu.org
` (10 subsequent siblings)
12 siblings, 0 replies; 13+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2020-07-12 12:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93678
--- Comment #5 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
A somewhat smaller test case, which of course does nothing useful,
but still reproduces the ICE:
module mo_a
implicit none
type t_b
integer :: n = 0
integer :: nr = 0
character, pointer :: buffer(:) => NULL()
contains
procedure :: unpackbytes => b_unpackbytes
end type t_b
character :: characterarraymold(1)
contains
subroutine b_unpackint(me, val)
class(t_b), intent(inout) :: me
integer, intent(out) :: val
val = transfer(me%unpackbytes(transfer(val, characterarraymold)), val)
end subroutine b_unpackint
function b_unpackbytes(me, bytearraymold) result(res)
class(t_b), intent(inout) :: me
character, intent(in) :: bytearraymold(:)
character, pointer :: res(:)
end function b_unpackbytes
end module mo_a
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/93678] [9/10/11 Regression] ICE with TRANSFER and typebound procedures
[not found] <bug-93678-4@http.gcc.gnu.org/bugzilla/>
2020-07-12 12:34 ` [Bug fortran/93678] [9/10/11 Regression] ICE in 9.2/9.2.1 not happening in previous gfortran versions tkoenig at gcc dot gnu.org
2020-07-12 12:55 ` tkoenig at gcc dot gnu.org
@ 2020-07-12 13:08 ` tkoenig at gcc dot gnu.org
2020-10-30 20:31 ` [Bug fortran/93678] [8/9/10/11 " anlauf at gcc dot gnu.org
` (9 subsequent siblings)
12 siblings, 0 replies; 13+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2020-07-12 13:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93678
Thomas Koenig <tkoenig at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[9/10/11 Regression] ICE in |[9/10/11 Regression] ICE
|9.2/9.2.1 not happening in |with TRANSFER and typebound
|previous gfortran versions |procedures
--- Comment #6 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
So, it is the typebound procedure that causes the problem.
This does not ICE:
val = transfer(b_unpackbytes(me, characterarraymold), val)
But this does ICE:
val = transfer(me%unpackbytes(characterarraymold), val)
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/93678] [8/9/10/11 Regression] ICE with TRANSFER and typebound procedures
[not found] <bug-93678-4@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2020-07-12 13:08 ` [Bug fortran/93678] [9/10/11 Regression] ICE with TRANSFER and typebound procedures tkoenig at gcc dot gnu.org
@ 2020-10-30 20:31 ` anlauf at gcc dot gnu.org
2020-10-30 20:48 ` anlauf at gcc dot gnu.org
` (8 subsequent siblings)
12 siblings, 0 replies; 13+ messages in thread
From: anlauf at gcc dot gnu.org @ 2020-10-30 20:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93678
--- Comment #7 from anlauf at gcc dot gnu.org ---
(In reply to Thomas Koenig from comment #5)
> A somewhat smaller test case, which of course does nothing useful,
> but still reproduces the ICE:
Further reduced / simplified:
module mo_a
implicit none
type t_b
contains
procedure :: unpackbytes => b_unpackbytes
end type t_b
contains
subroutine b_unpackint (me)
class(t_b), intent(inout) :: me
integer :: val
val = transfer (me% unpackbytes ("*"), val)
end subroutine b_unpackint
function b_unpackbytes (me, bytearraymold) result (res)
class(t_b), intent(inout) :: me
character(*), intent(in) :: bytearraymold
character :: res(1)
end function b_unpackbytes
end module mo_a
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/93678] [8/9/10/11 Regression] ICE with TRANSFER and typebound procedures
[not found] <bug-93678-4@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2020-10-30 20:31 ` [Bug fortran/93678] [8/9/10/11 " anlauf at gcc dot gnu.org
@ 2020-10-30 20:48 ` anlauf at gcc dot gnu.org
2020-10-30 21:03 ` anlauf at gcc dot gnu.org
` (7 subsequent siblings)
12 siblings, 0 replies; 13+ messages in thread
From: anlauf at gcc dot gnu.org @ 2020-10-30 20:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93678
--- Comment #8 from anlauf at gcc dot gnu.org ---
Further reduced:
module mo_a
implicit none
type t_b
contains
procedure :: unpackbytes => b_unpackbytes
end type t_b
contains
function b_unpackbytes (me) result (res)
class(t_b), intent(inout) :: me
character :: res(1)
end function b_unpackbytes
subroutine b_unpackint (me)
class(t_b), intent(inout) :: me
! print *, b_unpackbytes (me) ! ok
print *, me% unpackbytes () ! ICE
end subroutine b_unpackint
end module mo_a
The "arrayness" of the result res seems to be key.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/93678] [8/9/10/11 Regression] ICE with TRANSFER and typebound procedures
[not found] <bug-93678-4@http.gcc.gnu.org/bugzilla/>
` (4 preceding siblings ...)
2020-10-30 20:48 ` anlauf at gcc dot gnu.org
@ 2020-10-30 21:03 ` anlauf at gcc dot gnu.org
2021-06-01 8:16 ` [Bug fortran/93678] [9/10/11/12 " rguenth at gcc dot gnu.org
` (6 subsequent siblings)
12 siblings, 0 replies; 13+ messages in thread
From: anlauf at gcc dot gnu.org @ 2020-10-30 21:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93678
--- Comment #9 from anlauf at gcc dot gnu.org ---
Another data point: comparing the -fdump-fortran-original of
res = b_unpackbytes (me) ! ok
vs.
res = me% unpackbytes () ! ICE
I see:
ASSIGN b_unpackint:res(FULL) b_unpackbytes[[((b_unpackint:me))]]
vs.
ASSIGN b_unpackint:res(FULL) b_unpackbytes % _vptr %
unpackbytes[[((b_unpackint:me))]]
This hasn't changed since gcc-7. Maybe Paul(?) has some idea?
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/93678] [9/10/11/12 Regression] ICE with TRANSFER and typebound procedures
[not found] <bug-93678-4@http.gcc.gnu.org/bugzilla/>
` (5 preceding siblings ...)
2020-10-30 21:03 ` anlauf at gcc dot gnu.org
@ 2021-06-01 8:16 ` rguenth at gcc dot gnu.org
2022-05-27 9:42 ` [Bug fortran/93678] [10/11/12/13 " rguenth at gcc dot gnu.org
` (5 subsequent siblings)
12 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-06-01 8:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93678
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|9.4 |9.5
--- Comment #10 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 9.4 is being released, retargeting bugs to GCC 9.5.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/93678] [10/11/12/13 Regression] ICE with TRANSFER and typebound procedures
[not found] <bug-93678-4@http.gcc.gnu.org/bugzilla/>
` (6 preceding siblings ...)
2021-06-01 8:16 ` [Bug fortran/93678] [9/10/11/12 " rguenth at gcc dot gnu.org
@ 2022-05-27 9:42 ` rguenth at gcc dot gnu.org
2022-06-28 10:39 ` jakub at gcc dot gnu.org
` (4 subsequent siblings)
12 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-05-27 9:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93678
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|9.5 |10.4
--- Comment #11 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 9 branch is being closed
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/93678] [10/11/12/13 Regression] ICE with TRANSFER and typebound procedures
[not found] <bug-93678-4@http.gcc.gnu.org/bugzilla/>
` (7 preceding siblings ...)
2022-05-27 9:42 ` [Bug fortran/93678] [10/11/12/13 " rguenth at gcc dot gnu.org
@ 2022-06-28 10:39 ` jakub at gcc dot gnu.org
2023-07-07 10:36 ` [Bug fortran/93678] [11/12/13/14 " rguenth at gcc dot gnu.org
` (3 subsequent siblings)
12 siblings, 0 replies; 13+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-06-28 10:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93678
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|10.4 |10.5
--- Comment #12 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 10.4 is being released, retargeting bugs to GCC 10.5.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/93678] [11/12/13/14 Regression] ICE with TRANSFER and typebound procedures
[not found] <bug-93678-4@http.gcc.gnu.org/bugzilla/>
` (8 preceding siblings ...)
2022-06-28 10:39 ` jakub at gcc dot gnu.org
@ 2023-07-07 10:36 ` rguenth at gcc dot gnu.org
2024-04-24 15:49 ` pault at gcc dot gnu.org
` (2 subsequent siblings)
12 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-07-07 10:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93678
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|10.5 |11.5
--- Comment #13 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 10 branch is being closed.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/93678] [11/12/13/14 Regression] ICE with TRANSFER and typebound procedures
[not found] <bug-93678-4@http.gcc.gnu.org/bugzilla/>
` (9 preceding siblings ...)
2023-07-07 10:36 ` [Bug fortran/93678] [11/12/13/14 " rguenth at gcc dot gnu.org
@ 2024-04-24 15:49 ` pault at gcc dot gnu.org
2024-04-25 5:56 ` cvs-commit at gcc dot gnu.org
2024-04-25 6:00 ` [Bug fortran/93678] [11/12/13 " pault at gcc dot gnu.org
12 siblings, 0 replies; 13+ messages in thread
From: pault at gcc dot gnu.org @ 2024-04-24 15:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93678
Paul Thomas <pault at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |pault at gcc dot gnu.org
CC| |pault at gcc dot gnu.org
--- Comment #14 from Paul Thomas <pault at gcc dot gnu.org> ---
Created attachment 58026
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58026&action=edit
Fix for this PR
I'll package it all up for the list in the next 24 hours. Regtests OK, the
testcase of comment 1 compiles and this runs fine:
! { dg-do compile }
! Test the fix for PR93678 in which the charlen for the 'unpackbytes'
! vtable field was incomplete and caused the ICE as indicated.
! Contributed by Luis Kornblueh <mail.luis@web.de>
!
! The testcase was reduced by various gfortran regulars.
module mo_a
implicit none
type t_b
integer :: i
contains
procedure :: unpackbytes => b_unpackbytes
end type t_b
contains
function b_unpackbytes (me) result (res)
class(t_b), intent(inout) :: me
character :: res(1)
res = char (me%i)
end function b_unpackbytes
subroutine b_unpackint (me, c)
class(t_b), intent(inout) :: me
character, intent(in) :: c
! print *, b_unpackbytes (me) ! ok
if (any (me% unpackbytes () .ne. c)) stop 1 ! ICEd here
end subroutine b_unpackint
end module mo_a
use mo_a
class(t_b), allocatable :: z
allocate (z, source = t_b(97))
call b_unpackint (z, "a")
end
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/93678] [11/12/13/14 Regression] ICE with TRANSFER and typebound procedures
[not found] <bug-93678-4@http.gcc.gnu.org/bugzilla/>
` (10 preceding siblings ...)
2024-04-24 15:49 ` pault at gcc dot gnu.org
@ 2024-04-25 5:56 ` cvs-commit at gcc dot gnu.org
2024-04-25 6:00 ` [Bug fortran/93678] [11/12/13 " pault at gcc dot gnu.org
12 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-04-25 5:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93678
--- Comment #15 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Paul Thomas <pault@gcc.gnu.org>:
https://gcc.gnu.org/g:c058105bc47a0701e157d1028e60f48554561f9f
commit r14-10116-gc058105bc47a0701e157d1028e60f48554561f9f
Author: Paul Thomas <pault@gcc.gnu.org>
Date: Thu Apr 25 06:56:10 2024 +0100
Fortran: Fix ICE in gfc_trans_create_temp_array from bad type [PR93678]
2024-04-25 Paul Thomas <pault@gcc.gnu.org>
gcc/fortran
PR fortran/93678
* trans-expr.cc (gfc_conv_procedure_call): Use the interface,
where possible, to obtain the type of character procedure
pointers of class entities.
gcc/testsuite/
PR fortran/93678
* gfortran.dg/pr93678.f90: New test.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug fortran/93678] [11/12/13 Regression] ICE with TRANSFER and typebound procedures
[not found] <bug-93678-4@http.gcc.gnu.org/bugzilla/>
` (11 preceding siblings ...)
2024-04-25 5:56 ` cvs-commit at gcc dot gnu.org
@ 2024-04-25 6:00 ` pault at gcc dot gnu.org
12 siblings, 0 replies; 13+ messages in thread
From: pault at gcc dot gnu.org @ 2024-04-25 6:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93678
Paul Thomas <pault at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[11/12/13/14 Regression] |[11/12/13 Regression] ICE
|ICE with TRANSFER and |with TRANSFER and typebound
|typebound procedures |procedures
--- Comment #16 from Paul Thomas <pault at gcc dot gnu.org> ---
Fixed on mainline, so changing summary. Will backport in a couple of weeks.
Paul
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2024-04-25 6:00 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-93678-4@http.gcc.gnu.org/bugzilla/>
2020-07-12 12:34 ` [Bug fortran/93678] [9/10/11 Regression] ICE in 9.2/9.2.1 not happening in previous gfortran versions tkoenig at gcc dot gnu.org
2020-07-12 12:55 ` tkoenig at gcc dot gnu.org
2020-07-12 13:08 ` [Bug fortran/93678] [9/10/11 Regression] ICE with TRANSFER and typebound procedures tkoenig at gcc dot gnu.org
2020-10-30 20:31 ` [Bug fortran/93678] [8/9/10/11 " anlauf at gcc dot gnu.org
2020-10-30 20:48 ` anlauf at gcc dot gnu.org
2020-10-30 21:03 ` anlauf at gcc dot gnu.org
2021-06-01 8:16 ` [Bug fortran/93678] [9/10/11/12 " rguenth at gcc dot gnu.org
2022-05-27 9:42 ` [Bug fortran/93678] [10/11/12/13 " rguenth at gcc dot gnu.org
2022-06-28 10:39 ` jakub at gcc dot gnu.org
2023-07-07 10:36 ` [Bug fortran/93678] [11/12/13/14 " rguenth at gcc dot gnu.org
2024-04-24 15:49 ` pault at gcc dot gnu.org
2024-04-25 5:56 ` cvs-commit at gcc dot gnu.org
2024-04-25 6:00 ` [Bug fortran/93678] [11/12/13 " pault 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).