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

            Bug ID: 82253
           Summary: internal compiler error: in convert_move, at
                    expr.c:604 (Regression somewhere between 5.4.0 and
                    6.2.0))
           Product: gcc
           Version: 7.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: joachim.herb at gmx dot de
  Target Milestone: ---

Created attachment 42205
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42205&action=edit
Module source code resulting in internal compiler error

The attached module source code results in the following error, if compiled
with gfortran 6.3.0, 6.4.0, 7.2.0. It works with 4.9.2, 5.2.0, and 5.4.0. 

It happens, if the option -Og is used. If -g is used, the module is compiled.

The compiler error happens using the Linux and Cygwin version:
Cygwin:

$ gfortran --version
GNU Fortran (GCC) 5.4.0
Copyright (C) 2015 Free Software Foundation, Inc.

$ gfortran -Og -c compiler_bug.f90

$ gfortran --version
GNU Fortran (GCC) 6.4.0
Copyright (C) 2017 Free Software Foundation, Inc.

$ gfortran -Og -c compiler_bug.f90
compiler_bug.f90:50:0:

       obj = transfer( zero, obj )

internal compiler error: in convert_move, at expr.c:644

compiler_bug.f90:50:0: internal compiler error: Segmentation fault
mmap: No such device
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


Linux:

gcc (GCC) 7.2.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

> gfortran -c compiler_bug.f90  -g
> gfortran -c compiler_bug.f90  -Og
compiler_bug.f90:50:0:

       obj = transfer( zero, obj )

internal compiler error: in convert_move, at expr.c:604
0x85b18b convert_move(rtx_def*, rtx_def*, int)
        ../../gcc-7.2.0/gcc/expr.c:604
0x861773 store_expr_with_bounds(tree_node*, rtx_def*, int, bool, bool,
tree_node*)
        ../../gcc-7.2.0/gcc/expr.c:5629
0x8628d1 expand_assignment(tree_node*, tree_node*, bool)
        ../../gcc-7.2.0/gcc/expr.c:5110
0x774f00 expand_gimple_stmt_1
        ../../gcc-7.2.0/gcc/cfgexpand.c:3639
0x774f00 expand_gimple_stmt
        ../../gcc-7.2.0/gcc/cfgexpand.c:3737
0x7764cf expand_gimple_basic_block
        ../../gcc-7.2.0/gcc/cfgexpand.c:5744
0x77b636 execute
        ../../gcc-7.2.0/gcc/cfgexpand.c:6357
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

Reply via email to