public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug fortran/100027] New: ICE on storage_size with polymorphic argument @ 2021-04-11 0:16 jrfsousa at gmail dot com 2021-04-11 0:37 ` [Bug fortran/100027] " jrfsousa at gmail dot com ` (4 more replies) 0 siblings, 5 replies; 6+ messages in thread From: jrfsousa at gmail dot com @ 2021-04-11 0:16 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100027 Bug ID: 100027 Summary: ICE on storage_size with polymorphic argument Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: jrfsousa at gmail dot com Target Milestone: --- Created attachment 50554 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50554&action=edit Fortran code showing problem Hi All! ICE on storage_size with pointer (or allocatable) array argument. Tested on: GNU Fortran (GCC) 11.0.1 20210410 (experimental) GNU Fortran (GCC) 10.3.1 20210410 GNU Fortran (GCC) 9.3.1 20210410 Thank you very much. Best regards, José Rui ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/100027] ICE on storage_size with polymorphic argument 2021-04-11 0:16 [Bug fortran/100027] New: ICE on storage_size with polymorphic argument jrfsousa at gmail dot com @ 2021-04-11 0:37 ` jrfsousa at gmail dot com 2021-04-14 18:25 ` dominiq at lps dot ens.fr ` (3 subsequent siblings) 4 siblings, 0 replies; 6+ messages in thread From: jrfsousa at gmail dot com @ 2021-04-11 0:37 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100027 --- Comment #1 from José Rui Faustino de Sousa <jrfsousa at gmail dot com> --- Patch posted https://gcc.gnu.org/pipermail/fortran/2021-April/055922.html ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/100027] ICE on storage_size with polymorphic argument 2021-04-11 0:16 [Bug fortran/100027] New: ICE on storage_size with polymorphic argument jrfsousa at gmail dot com 2021-04-11 0:37 ` [Bug fortran/100027] " jrfsousa at gmail dot com @ 2021-04-14 18:25 ` dominiq at lps dot ens.fr 2021-04-17 10:17 ` pault at gcc dot gnu.org ` (2 subsequent siblings) 4 siblings, 0 replies; 6+ messages in thread From: dominiq at lps dot ens.fr @ 2021-04-14 18:25 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100027 Dominique d'Humieres <dominiq at lps dot ens.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2021-04-14 Ever confirmed|0 |1 --- Comment #2 from Dominique d'Humieres <dominiq at lps dot ens.fr> --- Confirmed since at least GCC7. Likely a duplicate of pr84006. ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/100027] ICE on storage_size with polymorphic argument 2021-04-11 0:16 [Bug fortran/100027] New: ICE on storage_size with polymorphic argument jrfsousa at gmail dot com 2021-04-11 0:37 ` [Bug fortran/100027] " jrfsousa at gmail dot com 2021-04-14 18:25 ` dominiq at lps dot ens.fr @ 2021-04-17 10:17 ` pault at gcc dot gnu.org 2024-05-12 5:59 ` cvs-commit at gcc dot gnu.org 2024-05-12 6:06 ` pault at gcc dot gnu.org 4 siblings, 0 replies; 6+ messages in thread From: pault at gcc dot gnu.org @ 2021-04-17 10:17 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100027 Paul Thomas <pault at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pault at gcc dot gnu.org --- Comment #3 from Paul Thomas <pault at gcc dot gnu.org> --- (In reply to José Rui Faustino de Sousa from comment #1) > Patch posted > > https://gcc.gnu.org/pipermail/fortran/2021-April/055922.html Hi Jose, Please take a look at PR98534. I think that you need to adjust your patch a little bit to take account of unlimited polymorphic entities with character dynamic type. I agree that it is a bit of a corner case but it is as well that your patch be complete. I will remove myself as the assignee. Best regards Paul ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/100027] ICE on storage_size with polymorphic argument 2021-04-11 0:16 [Bug fortran/100027] New: ICE on storage_size with polymorphic argument jrfsousa at gmail dot com ` (2 preceding siblings ...) 2021-04-17 10:17 ` pault at gcc dot gnu.org @ 2024-05-12 5:59 ` cvs-commit at gcc dot gnu.org 2024-05-12 6:06 ` pault at gcc dot gnu.org 4 siblings, 0 replies; 6+ messages in thread From: cvs-commit at gcc dot gnu.org @ 2024-05-12 5:59 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100027 --- Comment #4 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:b9294757f82aae8de6d98c122cd4e3b98f685217 commit r15-386-gb9294757f82aae8de6d98c122cd4e3b98f685217 Author: Paul Thomas <pault@gcc.gnu.org> Date: Sun May 12 06:59:45 2024 +0100 Fortran: Unlimited polymorphic intrinsic function arguments [PR84006] 2024-05-12 Paul Thomas <pault@gcc.gnu.org> gcc/fortran PR fortran/84006 PR fortran/100027 PR fortran/98534 * iresolve.cc (gfc_resolve_transfer): Emit a TODO error for unlimited polymorphic mold. * trans-expr.cc (gfc_resize_class_size_with_len): Use the fold even if a block is not available in which to fix the result. (trans_class_assignment): Enable correct assignment of character expressions to unlimited polymorphic variables using lhs _len field and rse string_length. * trans-intrinsic.cc (gfc_conv_intrinsic_storage_size): Extract the class expression so that the unlimited polymorphic class expression can be used in gfc_resize_class_size_with_len to obtain the storage size for character payloads. Guard the use of GFC_DECL_SAVED_DESCRIPTOR by testing for DECL_LANG_SPECIFIC to prevent the ICE. Also, invert the order to use the class expression extracted from the argument. (gfc_conv_intrinsic_transfer): In same way as 'storage_size', use the _len field to obtaining the correct length for arg 1. Add a branch for the element size in bytes of class expressions with provision to make use of the unlimited polymorphic _len field. Again, the class references are explicitly identified. 'mold_expr' was already declared. Use it instead of 'arg'. Do not fix 'dest_word_len' for deferred character sources because reallocation on assign makes use of it before it is assigned. gcc/testsuite/ PR fortran/84006 PR fortran/100027 * gfortran.dg/storage_size_7.f90: New test. PR fortran/98534 * gfortran.dg/transfer_class_4.f90: New test. ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/100027] ICE on storage_size with polymorphic argument 2021-04-11 0:16 [Bug fortran/100027] New: ICE on storage_size with polymorphic argument jrfsousa at gmail dot com ` (3 preceding siblings ...) 2024-05-12 5:59 ` cvs-commit at gcc dot gnu.org @ 2024-05-12 6:06 ` pault at gcc dot gnu.org 4 siblings, 0 replies; 6+ messages in thread From: pault at gcc dot gnu.org @ 2024-05-12 6:06 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100027 Paul Thomas <pault at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|NEW |RESOLVED --- Comment #5 from Paul Thomas <pault at gcc dot gnu.org> --- Fixed on mainline. Thanks for the report and the patch. It's a pity that you didn't reply to me that you couldn't or wouldn't do the commit :-( Paul ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-05-12 6:06 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-04-11 0:16 [Bug fortran/100027] New: ICE on storage_size with polymorphic argument jrfsousa at gmail dot com 2021-04-11 0:37 ` [Bug fortran/100027] " jrfsousa at gmail dot com 2021-04-14 18:25 ` dominiq at lps dot ens.fr 2021-04-17 10:17 ` pault at gcc dot gnu.org 2024-05-12 5:59 ` cvs-commit at gcc dot gnu.org 2024-05-12 6:06 ` 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).