Bug 95214 - ICE on assumed-rank character array with select rank
Summary: ICE on assumed-rank character array with select rank
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 11.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-19 15:11 UTC by José Rui Faustino de Sousa
Modified: 2020-06-03 17:58 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2020-05-20 00:00:00


Attachments
Fortran code demonstrating problems. (262 bytes, text/plain)
2020-05-19 15:11 UTC, José Rui Faustino de Sousa
Details

Note You need to log in before you can comment on or make changes to this bug.
Description José Rui Faustino de Sousa 2020-05-19 15:11:14 UTC
Created attachment 48568 [details]
Fortran code demonstrating problems.

Hi All!

ICE with 10 and 11 on assumed-rank character array with select rank block.

using:

GNU Fortran (GCC) 10.1.1 20200518
GNU Fortran (GCC) 11.0.0 20200518 (experimental)

This is very likely related to Bug 67938 and Bug 66833.

Thank you very much.

Best regards,
José Rui
Comment 1 Martin Liška 2020-05-20 10:08:08 UTC
Started with r10-2912-g70570ec192745095, it was rejected before the revision.
Comment 2 GCC Commits 2020-06-03 17:38:49 UTC
The master branch has been updated by Thomas Kथà¤nig <tkoenig@gcc.gnu.org>:

https://gcc.gnu.org/g:8d57c30611b05a89fd265f6c0a74fe829c21cd34

commit r11-879-g8d57c30611b05a89fd265f6c0a74fe829c21cd34
Author: José Rui Faustino de Sousa <jrfsousa@gmail.com>
Date:   Wed Jun 3 19:33:11 2020 +0200

    Simple patch only add assumed-rank to the list of possible attributes.
    
    gcc/fortran/ChangeLog:
    
    2020-06-03  José Rui Faustino de Sousa  <jrfsousa@gmail.com>
    
            PR fortran/95214
            PR fortran/66833
            PR fortran/67938
            * trans-expr.c (gfc_maybe_dereference_var): Add assumed-rank to
            character dummy arguments list of possible attributes.
    
    gcc/testsuite/ChangeLog:
    
    2020-06-03  José Rui Faustino de Sousa  <jrfsousa@gmail.com>
    
            PR fortran/95214
            PR fortran/66833
            PR fortran/67938
            * gfortran.dg/PR95214.f90: New test.
Comment 3 Thomas Koenig 2020-06-03 17:58:13 UTC
Fixed on master, thank you for the bug report!