public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/100607] New: ICE with SELECT RANK
@ 2021-05-14 21:10 burnus at gcc dot gnu.org
  2021-05-16 13:34 ` [Bug fortran/100607] " dominiq at lps dot ens.fr
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: burnus at gcc dot gnu.org @ 2021-05-14 21:10 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100607

            Bug ID: 100607
           Summary: ICE with SELECT RANK
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: burnus at gcc dot gnu.org
  Target Milestone: ---

Created attachment 50815
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50815&action=edit
Fortran testcase

The following program works, if the invalid code is commented.

The invalid part violates (quote from F202x but same in F2018):
  "C1158  A SELECT RANK construct shall not have aselect-rank-case-stmtthat is
RANK ( * )
   if the selector23has the ALLOCATABLE or POINTER attribute."


Hence, the code is invalid. Output is the following

Notes:
- '__tmp_INTEGER_4_rank_m1' error is bogus
- 'cannot be used' error is valid, but should only be printed once
- An ICE is always wrong, of course.



   24 |  rank(*) ! { dg-error "cannot be used with the pointer or allocatable
selector" }
Error: Allocatable array ‘__tmp_INTEGER_4_rank_m1’ at (1) must have a deferred
shape or assumed rank

   24 |  rank(*) ! { dg-error "cannot be used with the pointer or allocatable
selector" }
Error: RANK (*) at (1) cannot be used with the pointer or allocatable selector
at (2)

   24 |  rank(*) ! { dg-error "cannot be used with the pointer or allocatable
selector" }
Error: RANK (*) at (1) cannot be used with the pointer or allocatable selector
at (2)

f951: internal compiler error: in simplify_bound, at fortran/simplify.c:4266
0x619680 simplify_bound
        ../../repos/gcc/gcc/fortran/simplify.c:4266

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2023-06-04 18:22 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-14 21:10 [Bug fortran/100607] New: ICE with SELECT RANK burnus at gcc dot gnu.org
2021-05-16 13:34 ` [Bug fortran/100607] " dominiq at lps dot ens.fr
2022-06-06 21:33 ` kargl at gcc dot gnu.org
2022-06-07  4:35 ` kargl at gcc dot gnu.org
2023-04-03  1:27 ` kargl at gcc dot gnu.org
2023-04-03 20:16 ` anlauf at gcc dot gnu.org
2023-04-03 20:32 ` anlauf at gcc dot gnu.org
2023-04-03 21:28 ` sgk at troutmask dot apl.washington.edu
2023-05-29 23:10 ` kargl at gcc dot gnu.org
2023-06-01 19:26 ` anlauf at gcc dot gnu.org
2023-06-01 19:47 ` sgk at troutmask dot apl.washington.edu
2023-06-02 16:28 ` anlauf at gcc dot gnu.org
2023-06-02 17:59 ` cvs-commit at gcc dot gnu.org
2023-06-02 18:06 ` anlauf at gcc dot gnu.org
2023-06-02 18:17 ` sgk at troutmask dot apl.washington.edu
2023-06-03 18:21 ` cvs-commit at gcc dot gnu.org
2023-06-04 18:13 ` cvs-commit at gcc dot gnu.org
2023-06-04 18:22 ` cvs-commit 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).