public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/95068] New: [10/11 Regression] ICE in gfc_get_class_from_expr, at fortran/trans-expr.c:484
@ 2020-05-11 18:55 gscfq@t-online.de
  2020-05-11 18:56 ` [Bug fortran/95068] " gscfq@t-online.de
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: gscfq@t-online.de @ 2020-05-11 18:55 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 95068
           Summary: [10/11 Regression] ICE in gfc_get_class_from_expr, at
                    fortran/trans-expr.c:484
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gscfq@t-online.de
  Target Milestone: ---

Changed between 20190922 and 20190929 :


$ cat z1.f90
program p
   type t
   end type
contains
   function f() result(x)
      class(t), allocatable :: x
      associate (y => (f))
      end associate
   end
end


$ gfortran-9 -c z1.f90   # no error
z1.f90:7:23:

    7 |       associate (y => (f))
      |                       1
Warning: Non-RECURSIVE procedure 'f' at (1) is possibly calling itself
recursively.  Declare it RECURSIVE or use '-frecursive'



$ gfortran-11-20200510-chk -c z1.f90
z1.f90:7:23:

    7 |       associate (y => (f))
      |                       1
Warning: Non-RECURSIVE procedure 'f' at (1) is possibly calling itself
recursively.  Declare it RECURSIVE or use '-frecursive'
z1.f90:7:0:

    7 |       associate (y => (f))
      |
internal compiler error: tree check: expected class 'expression', have
'declaration' (function_decl) in tree_operand_check, at tree.h:3792
0x61669c tree_class_check_failed(tree_node const*, tree_code_class, char
const*, int, char const*)
        ../../gcc/tree.c:9736
0x776349 expr_check(tree_node*, char const*, int, char const*)
        ../../gcc/tree.h:3463
0x776349 tree_operand_check(tree_node*, int, char const*, int, char const*)
        ../../gcc/tree.h:3792
0x776349 gfc_get_class_from_expr(tree_node*)
        ../../gcc/fortran/trans-expr.c:484
0x7d2502 trans_associate_var
        ../../gcc/fortran/trans-stmt.c:2100
0x7d8d99 gfc_trans_block_construct(gfc_code*)
        ../../gcc/fortran/trans-stmt.c:2283
0x73a207 trans_code
        ../../gcc/fortran/trans.c:1960
0x77194d gfc_generate_function_code(gfc_namespace*)
        ../../gcc/fortran/trans-decl.c:6835
0x77165c gfc_generate_contained_functions
        ../../gcc/fortran/trans-decl.c:5830
0x77165c gfc_generate_function_code(gfc_namespace*)
        ../../gcc/fortran/trans-decl.c:6767
0x6ea066 translate_all_program_units
        ../../gcc/fortran/parse.c:6306
0x6ea066 gfc_parse_file()
        ../../gcc/fortran/parse.c:6545
0x7364ff gfc_be_parse_file
        ../../gcc/fortran/f95-lang.c:210

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

end of thread, other threads:[~2023-06-02  8:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-11 18:55 [Bug fortran/95068] New: [10/11 Regression] ICE in gfc_get_class_from_expr, at fortran/trans-expr.c:484 gscfq@t-online.de
2020-05-11 18:56 ` [Bug fortran/95068] " gscfq@t-online.de
2020-05-12  6:49 ` marxin at gcc dot gnu.org
2020-06-26 12:05 ` rguenth at gcc dot gnu.org
2020-07-23  6:51 ` rguenth at gcc dot gnu.org
2021-04-08 12:02 ` rguenth at gcc dot gnu.org
2022-06-28 10:40 ` [Bug fortran/95068] [10/11/12/13 " jakub at gcc dot gnu.org
2023-06-02  8:23 ` [Bug fortran/95068] [10/11/12/13/14 " 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).