public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/102745] New: CLASS → TYPE check fails after RESHAPE
@ 2021-10-14 14:16 burnus at gcc dot gnu.org
2021-10-18 7:49 ` [Bug fortran/102745] " cvs-commit at gcc dot gnu.org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: burnus at gcc dot gnu.org @ 2021-10-14 14:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102745
Bug ID: 102745
Summary: CLASS → TYPE check fails after RESHAPE
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Keywords: accepts-invalid, diagnostic
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: burnus at gcc dot gnu.org
Target Milestone: ---
Found when working on PR102689
Expected:
* 'CLASS(t)' in the first error message
* an error for passing CLASS(t) to TYPE(t2) in the call with RESHAPE.
implicit none (type, external)
type t
end type t
type, extends(t) :: t2
integer :: i
end type t2
class(t), allocatable :: A(:), B(:,:,:)
allocate (t2 :: A(100), B(10,10,1))
call bar(A) ! Rejected (with slightly odd message: Error: Type mismatch in
argument ‘x’ at (1); passed CLASS(__class_MAIN___T_1_0a) to TYPE(t2)
call bar(reshape(B, [size(B)])) ! Wrongly accepted
contains
subroutine bar(x)
type(t2), intent(in) :: x(:)
end
end
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/102745] CLASS → TYPE check fails after RESHAPE
2021-10-14 14:16 [Bug fortran/102745] New: CLASS → TYPE check fails after RESHAPE burnus at gcc dot gnu.org
@ 2021-10-18 7:49 ` cvs-commit at gcc dot gnu.org
2021-10-19 8:52 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-10-18 7:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102745
--- Comment #1 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tobias Burnus <burnus@gcc.gnu.org>:
https://gcc.gnu.org/g:017665f63047ce47b087b0b283548a60e5abf3d2
commit r12-4464-g017665f63047ce47b087b0b283548a60e5abf3d2
Author: Tobias Burnus <tobias@codesourcery.com>
Date: Mon Oct 18 09:49:05 2021 +0200
Fortran: Fix CLASS conversion check [PR102745]
PR fortran/102745
gcc/fortran/ChangeLog
* intrinsic.c (gfc_convert_type_warn): Fix checks by checking CLASS
and do typcheck in correct order for type extension.
* misc.c (gfc_typename): Print proper not internal CLASS type name.
gcc/testsuite/ChangeLog
* gfortran.dg/class_72.f90: New.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/102745] CLASS → TYPE check fails after RESHAPE
2021-10-14 14:16 [Bug fortran/102745] New: CLASS → TYPE check fails after RESHAPE burnus at gcc dot gnu.org
2021-10-18 7:49 ` [Bug fortran/102745] " cvs-commit at gcc dot gnu.org
@ 2021-10-19 8:52 ` cvs-commit at gcc dot gnu.org
2021-10-19 10:38 ` burnus at gcc dot gnu.org
2021-11-23 8:03 ` pinskia at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-10-19 8:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102745
--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Tobias Burnus
<burnus@gcc.gnu.org>:
https://gcc.gnu.org/g:3de82c6c36fea8fad7145b62ccb3a7c06d1f3c51
commit r11-9173-g3de82c6c36fea8fad7145b62ccb3a7c06d1f3c51
Author: Tobias Burnus <tobias@codesourcery.com>
Date: Mon Oct 18 09:49:05 2021 +0200
Fortran: Fix CLASS conversion check [PR102745]
PR fortran/102745
gcc/fortran/ChangeLog
* intrinsic.c (gfc_convert_type_warn): Fix checks by checking CLASS
and do typcheck in correct order for type extension.
* misc.c (gfc_typename): Print proper not internal CLASS type name.
gcc/testsuite/ChangeLog
* gfortran.dg/class_72.f90: New.
(cherry picked from commit 017665f63047ce47b087b0b283548a60e5abf3d2)
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/102745] CLASS → TYPE check fails after RESHAPE
2021-10-14 14:16 [Bug fortran/102745] New: CLASS → TYPE check fails after RESHAPE burnus at gcc dot gnu.org
2021-10-18 7:49 ` [Bug fortran/102745] " cvs-commit at gcc dot gnu.org
2021-10-19 8:52 ` cvs-commit at gcc dot gnu.org
@ 2021-10-19 10:38 ` burnus at gcc dot gnu.org
2021-11-23 8:03 ` pinskia at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: burnus at gcc dot gnu.org @ 2021-10-19 10:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102745
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|UNCONFIRMED |RESOLVED
--- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> ---
FIXED (for GCC 11 + 12).
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/102745] CLASS → TYPE check fails after RESHAPE
2021-10-14 14:16 [Bug fortran/102745] New: CLASS → TYPE check fails after RESHAPE burnus at gcc dot gnu.org
` (2 preceding siblings ...)
2021-10-19 10:38 ` burnus at gcc dot gnu.org
@ 2021-11-23 8:03 ` pinskia at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-11-23 8:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102745
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |11.3
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-11-23 8:03 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-14 14:16 [Bug fortran/102745] New: CLASS → TYPE check fails after RESHAPE burnus at gcc dot gnu.org
2021-10-18 7:49 ` [Bug fortran/102745] " cvs-commit at gcc dot gnu.org
2021-10-19 8:52 ` cvs-commit at gcc dot gnu.org
2021-10-19 10:38 ` burnus at gcc dot gnu.org
2021-11-23 8:03 ` pinskia 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).