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

            Bug ID: 85878
           Summary: [6/7/8/9 Regression] ICE in convert_mode_scalar, at
                    expr.c:287
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gs...@t-online.de
  Target Milestone: ---

Affects versions down to 5 at -O[gs123], with undefined variable "a" :

$ cat z1.f90
program p
   real :: a
   complex :: c = (2.0, 3.0)
   print *, c
   print *, transfer(a, c)
end


$ gfortran-4.9 z1.f90 -O2
$ a.out
 (  2.00000000    ,  3.00000000    )
 (  0.00000000    ,  0.00000000    )


$ gfortran-9-20180520 -c z1.f90 -O2
during RTL pass: expand
z1.f90:5:0:

    print *, transfer(a, c)

internal compiler error: in convert_mode_scalar, at expr.c:287
0x8f9fe9 convert_mode_scalar
        ../../gcc/expr.c:287
0x8f9fe9 convert_move(rtx_def*, rtx_def*, int)
        ../../gcc/expr.c:271
0x900ba5 store_expr_with_bounds(tree_node*, rtx_def*, int, bool, bool,
tree_node*)
        ../../gcc/expr.c:5728
0x902093 expand_assignment(tree_node*, tree_node*, bool)
        ../../gcc/expr.c:5159
0x8041cc expand_gimple_stmt_1
        ../../gcc/cfgexpand.c:3714
0x8041cc expand_gimple_stmt
        ../../gcc/cfgexpand.c:3810
0x8059fd expand_gimple_basic_block
        ../../gcc/cfgexpand.c:5835
0x80ae86 execute
        ../../gcc/cfgexpand.c:6441

Reply via email to