public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/104553] New: ICE in aggregate_value_p, at function.cc:2087
@ 2022-02-15 19:37 gscfq@t-online.de
  2022-02-15 19:38 ` [Bug fortran/104553] " gscfq@t-online.de
  0 siblings, 1 reply; 2+ messages in thread
From: gscfq@t-online.de @ 2022-02-15 19:37 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 104553
           Summary: ICE in aggregate_value_p, at function.cc:2087
           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 :


$ cat z1.f90
module m
   type t
   contains
      procedure :: g => h
   end type
contains
   subroutine h(a, b)
      class(t) :: a
      class(t) :: b
   end
   subroutine s(c, d)
      class(t) :: c
      class(t) :: d(:)
      call c%g(c(1))
   end
end


$ gfortran-12-20220213 -c z1.f90
during RTL pass: expand
z1.f90:14:20:

   14 |       call c%g(c(1))
      |                    ^
internal compiler error: in aggregate_value_p, at function.cc:2087
0x9d05c7 aggregate_value_p(tree_node const*, tree_node const*)
        ../../gcc/function.cc:2087
0x860eeb expand_call(tree_node*, rtx_def*, int)
        ../../gcc/calls.cc:2770
0x97fafe expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
        ../../gcc/expr.cc:11539
0x874e21 expand_expr
        ../../gcc/expr.h:301
0x874e21 expand_call_stmt
        ../../gcc/cfgexpand.cc:2831
0x874e21 expand_gimple_stmt_1
        ../../gcc/cfgexpand.cc:3864
0x874e21 expand_gimple_stmt
        ../../gcc/cfgexpand.cc:4028
0x8799f7 expand_gimple_basic_block
        ../../gcc/cfgexpand.cc:6069
0x87c49e execute
        ../../gcc/cfgexpand.cc:6795


$ gfortran-12-20220213 -c z1.f90   # with checking enabled
z1.f90:14:20:

   14 |       call c%g(c(1))
      |                    ^
internal compiler error: tree check: expected function_type or method_type,
have pointer_type in gimplify_call_expr, at gimplify.cc:3588
0x6aa308 tree_check_failed(tree_node const*, char const*, int, char const*,
...)
        ../../gcc/tree.cc:8688
0xb49200 tree_check2(tree_node*, char const*, int, char const*, tree_code,
tree_code)
        ../../gcc/tree.h:3464
0xb49200 gimplify_call_expr
        ../../gcc/gimplify.cc:3588
0xb3cdcc gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        ../../gcc/gimplify.cc:14945
0xb40b08 gimplify_stmt(tree_node**, gimple**)
        ../../gcc/gimplify.cc:7028
0xb3c16b gimplify_statement_list
        ../../gcc/gimplify.cc:2018
0xb3c16b gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        ../../gcc/gimplify.cc:15418
0xb40b08 gimplify_stmt(tree_node**, gimple**)
        ../../gcc/gimplify.cc:7028
0xb41493 gimplify_bind_expr
        ../../gcc/gimplify.cc:1427
0xb3ce1a gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        ../../gcc/gimplify.cc:15174
0xb40b08 gimplify_stmt(tree_node**, gimple**)
        ../../gcc/gimplify.cc:7028
0xb41493 gimplify_bind_expr
        ../../gcc/gimplify.cc:1427
0xb3ce1a gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        ../../gcc/gimplify.cc:15174
0xb40b08 gimplify_stmt(tree_node**, gimple**)
        ../../gcc/gimplify.cc:7028
0xb426ee gimplify_body(tree_node*, bool)
        ../../gcc/gimplify.cc:16219
0xb42cd7 gimplify_function_tree(tree_node*)
        ../../gcc/gimplify.cc:16373
0x953c87 cgraph_node::analyze()
        ../../gcc/cgraphunit.cc:675
0x956f36 analyze_functions
        ../../gcc/cgraphunit.cc:1240
0x95810d symbol_table::finalize_compilation_unit()
        ../../gcc/cgraphunit.cc:2500

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

* [Bug fortran/104553] ICE in aggregate_value_p, at function.cc:2087
  2022-02-15 19:37 [Bug fortran/104553] New: ICE in aggregate_value_p, at function.cc:2087 gscfq@t-online.de
@ 2022-02-15 19:38 ` gscfq@t-online.de
  0 siblings, 0 replies; 2+ messages in thread
From: gscfq@t-online.de @ 2022-02-15 19:38 UTC (permalink / raw)
  To: gcc-bugs

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

G. Steinmetz <gscfq@t-online.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-invalid-code

--- Comment #1 from G. Steinmetz <gscfq@t-online.de> ---

OK with corrected typo :


$ cat z2.f90
module m
   type t
   contains
      procedure :: g => h
   end type
contains
   subroutine h(a, b)
      class(t) :: a
      class(t) :: b
   end
   subroutine s(c, d)
      class(t) :: c
      class(t) :: d(:)
      call c%g(d(1))
   end
end

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

end of thread, other threads:[~2022-02-15 19:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-15 19:37 [Bug fortran/104553] New: ICE in aggregate_value_p, at function.cc:2087 gscfq@t-online.de
2022-02-15 19:38 ` [Bug fortran/104553] " gscfq@t-online.de

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).