public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/101565] New: ICE in gfc_simplify_image_index, at fortran/simplify.c:8234
@ 2021-07-21 17:49 gscfq@t-online.de
  2021-07-21 18:43 ` [Bug fortran/101565] " kargl at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: gscfq@t-online.de @ 2021-07-21 17:49 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 101565
           Summary: ICE in gfc_simplify_image_index, at
                    fortran/simplify.c:8234
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gscfq@t-online.de
  Target Milestone: ---

Non-integer array SUB affects versions down to at least r5 :
(z4 with a misleading error)


$ cat z1.f90
program p
   integer :: x[*]
   print *, image_index(x, [1.0])
end


$ cat z2.f90
program p
   integer :: x[*]
   print *, image_index(x, [.true.])
end


$ cat z3.f90
program p
   type t
      integer :: a
   end type
   integer :: x[*]
   print *, image_index(x, [t(1)])
end


$ cat z4.f90
program p
   integer :: x[*]
   print *, image_index(x, ['1'])
end


$ gfortran-12-20210718 -c z4.f90 -fcoarray=lib
z4.f90:3:24:

    3 |    print *, image_index(x, ['1'])
      |                        1
Error: Out of bounds in IMAGE_INDEX at (1) for dimension 1, SUB has 0 and
COARRAY lower bound is 1)


$ gfortran-12-20210718 -c z1.f90 -fcoarray=lib
f951: internal compiler error: Segmentation fault
0xe3985f crash_signal
        ../../gcc/toplev.c:328
0x7d59d2 gfc_simplify_image_index(gfc_expr*, gfc_expr*)
        ../../gcc/fortran/simplify.c:8234
0x753f73 do_simplify
        ../../gcc/fortran/intrinsic.c:4664
0x75e99a gfc_intrinsic_func_interface(gfc_expr*, int)
        ../../gcc/fortran/intrinsic.c:5050
0x7af8b9 resolve_unknown_f
        ../../gcc/fortran/resolve.c:2926
0x7af8b9 resolve_function
        ../../gcc/fortran/resolve.c:3270
0x7af8b9 gfc_resolve_expr(gfc_expr*)
        ../../gcc/fortran/resolve.c:7104
0x7b5cf4 gfc_resolve_expr(gfc_expr*)
        ../../gcc/fortran/resolve.c:7071
0x7b5cf4 gfc_resolve_code(gfc_code*, gfc_namespace*)
        ../../gcc/fortran/resolve.c:11832
0x7b463f gfc_resolve_blocks(gfc_code*, gfc_namespace*)
        ../../gcc/fortran/resolve.c:10851
0x7b4a08 gfc_resolve_code(gfc_code*, gfc_namespace*)
        ../../gcc/fortran/resolve.c:11822
0x7b7317 resolve_codes
        ../../gcc/fortran/resolve.c:17427
0x7b73de gfc_resolve(gfc_namespace*)
        ../../gcc/fortran/resolve.c:17462
0x79f924 resolve_all_program_units
        ../../gcc/fortran/parse.c:6403
0x79f924 gfc_parse_file()
        ../../gcc/fortran/parse.c:6655
0x7ecf1f gfc_be_parse_file
        ../../gcc/fortran/f95-lang.c:216

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

end of thread, other threads:[~2021-11-30 19:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-21 17:49 [Bug fortran/101565] New: ICE in gfc_simplify_image_index, at fortran/simplify.c:8234 gscfq@t-online.de
2021-07-21 18:43 ` [Bug fortran/101565] " kargl at gcc dot gnu.org
2021-11-29 21:32 ` anlauf at gcc dot gnu.org
2021-11-30 19:39 ` cvs-commit at gcc dot gnu.org
2021-11-30 19:57 ` anlauf 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).