public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/102503] New: ICE in gfc_conv_array_bound, at fortran/trans-types.c:1224
@ 2021-09-27 19:46 gscfq@t-online.de
  2021-10-22 12:12 ` [Bug fortran/102503] " dominiq at lps dot ens.fr
  2021-10-22 16:00 ` burnus at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: gscfq@t-online.de @ 2021-09-27 19:46 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 102503
           Summary: ICE in gfc_conv_array_bound, at
                    fortran/trans-types.c:1224
           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: ---

Affects versions down to at least r5 :
(rejected with attribute allocatable/pointer)


$ cat z1.f90
subroutine s(x)
   class(*) :: x(..)[*]
end


$ cat z2.f90
program p
   type t
   end type
contains
   subroutine s(x)
      class(t) :: x(..)[*]
   end
end


$ gfortran-12-20210926 -c z1.f90 -fcoarray=lib
z1.f90:1:12:

    1 | subroutine s(x)
      |            1
internal compiler error: Segmentation fault
0xd400cf crash_signal
        ../../gcc/toplev.c:328
0x8cb54b gfc_conv_array_bound
        ../../gcc/fortran/trans-types.c:1224
0x8cb54b gfc_build_array_type
        ../../gcc/fortran/trans-types.c:1425
0x8cd5de gfc_get_derived_type(gfc_symbol*, int)
        ../../gcc/fortran/trans-types.c:2799
0x8cdd98 gfc_typenode_for_spec(gfc_typespec*, int)
        ../../gcc/fortran/trans-types.c:1178
0x8cdfee gfc_sym_type(gfc_symbol*)
        ../../gcc/fortran/trans-types.c:2289
0x8cc524 gfc_get_function_type(gfc_symbol*, gfc_actual_arglist*, char const*)
        ../../gcc/fortran/trans-types.c:3134
0x864ea4 build_function_decl
        ../../gcc/fortran/trans-decl.c:2406
0x86ab16 gfc_create_function_decl(gfc_namespace*, bool)
        ../../gcc/fortran/trans-decl.c:3105
0x871176 gfc_generate_function_code(gfc_namespace*)
        ../../gcc/fortran/trans-decl.c:6813
0x7f6646 translate_all_program_units
        ../../gcc/fortran/parse.c:6572
0x7f6646 gfc_parse_file()
        ../../gcc/fortran/parse.c:6841
0x842daf gfc_be_parse_file
        ../../gcc/fortran/f95-lang.c:216

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

* [Bug fortran/102503] ICE in gfc_conv_array_bound, at fortran/trans-types.c:1224
  2021-09-27 19:46 [Bug fortran/102503] New: ICE in gfc_conv_array_bound, at fortran/trans-types.c:1224 gscfq@t-online.de
@ 2021-10-22 12:12 ` dominiq at lps dot ens.fr
  2021-10-22 16:00 ` burnus at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: dominiq at lps dot ens.fr @ 2021-10-22 12:12 UTC (permalink / raw)
  To: gcc-bugs

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

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2021-10-22

--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Confirmed.

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

* [Bug fortran/102503] ICE in gfc_conv_array_bound, at fortran/trans-types.c:1224
  2021-09-27 19:46 [Bug fortran/102503] New: ICE in gfc_conv_array_bound, at fortran/trans-types.c:1224 gscfq@t-online.de
  2021-10-22 12:12 ` [Bug fortran/102503] " dominiq at lps dot ens.fr
@ 2021-10-22 16:00 ` burnus at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: burnus at gcc dot gnu.org @ 2021-10-22 16:00 UTC (permalink / raw)
  To: gcc-bugs

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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |burnus at gcc dot gnu.org

--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> ---
F2018:C837 An assumed-rank entity shall be a dummy data object that does not
have the CODIMENSION or VALUE attribute.

In principle, something like the following should do - but reading the file
shows that there are many more issues of the same kind :-(

--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -15623,7 +15623,7 @@ resolve_symbol (gfc_symbol *sym)
          return;
        }
       if (as->type == AS_ASSUMED_RANK
-         && (sym->attr.codimension || sym->attr.value))
+         && (class_attr->attr.codimension || sym->attr.value))
        {
          gfc_error ("Assumed-rank array at %L may not have the VALUE or "
                     "CODIMENSION attribute", &sym->declared_at);

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

end of thread, other threads:[~2021-10-22 16:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-27 19:46 [Bug fortran/102503] New: ICE in gfc_conv_array_bound, at fortran/trans-types.c:1224 gscfq@t-online.de
2021-10-22 12:12 ` [Bug fortran/102503] " dominiq at lps dot ens.fr
2021-10-22 16:00 ` burnus 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).