http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56385

             Bug #: 56385
           Summary: ICE with allocatable function result in a type-bound
                    procedure
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: vladimir.f...@gmail.com


Created attachment 29488
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29488
reproduction case source

I got an internal compiler error for the attached source. Workaround is to
define the scalar_flux_interface to return an array with explicit size.

> gfortran ice2.f90 -c -v
Using built-in specs.
COLLECT_GCC=gfortran
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-4.8-20130217/configure --enable-languages=c,c++,fortran
--prefix=/usr/local/gcc-4.8
Thread model: posix
gcc version 4.8.0 20130217 (experimental) (GCC) 
COLLECT_GCC_OPTIONS='-c' '-v' '-mtune=generic' '-march=x86-64'
 /usr/local/gcc-4.8/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/f951 ice2.f90 -quiet
-dumpbase ice2.f90 -mtune=generic -march=x86-64 -auxbase ice2 -version
-fintrinsic-modules-path
/usr/local/gcc-4.8/lib64/gcc/x86_64-unknown-linux-gnu/4.8.0/finclude -o
/tmp/ccpwiWpj.s
GNU Fortran (GCC) version 4.8.0 20130217 (experimental)
(x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.8.0 20130217 (experimental), GMP version
5.0.5, MPFR version 3.1.0-p1, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU Fortran (GCC) version 4.8.0 20130217 (experimental)
(x86_64-unknown-linux-gnu)
        compiled by GNU C version 4.8.0 20130217 (experimental), GMP version
5.0.5, MPFR version 3.1.0-p1, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
ice2.f90: In function ‘__copy_volumesources_Tvolumesourcebody’:
ice2.f90:59:0: internal compiler error: in gfc_conv_descriptor_data_set, at
fortran/trans-array.c:171
       class(TVolumeSourceBody),intent(in) :: self
 ^
0x5bf8c8 gfc_conv_descriptor_data_set(stmtblock_t*, tree_node*, tree_node*)
        ../../gcc-4.8-20130217/gcc/fortran/trans-array.c:171
0x5c07d9 duplicate_allocatable
        ../../gcc-4.8-20130217/gcc/fortran/trans-array.c:7347
0x5ca037 gfc_duplicate_allocatable
        ../../gcc-4.8-20130217/gcc/fortran/trans-array.c:7394
0x5ca037 structure_alloc_comps
        ../../gcc-4.8-20130217/gcc/fortran/trans-array.c:7736
0x5e9532 gfc_trans_scalar_assign(gfc_se*, gfc_se*, gfc_typespec, bool, bool,
bool)
        ../../gcc-4.8-20130217/gcc/fortran/trans-expr.c:6866
0x5f5522 gfc_trans_assignment_1
        ../../gcc-4.8-20130217/gcc/fortran/trans-expr.c:7782
0x5bc175 trans_code
        ../../gcc-4.8-20130217/gcc/fortran/trans.c:1446
0x5e312e gfc_generate_function_code(gfc_namespace*)
        ../../gcc-4.8-20130217/gcc/fortran/trans-decl.c:5395
0x5bceb1 gfc_generate_module_code(gfc_namespace*)
        ../../gcc-4.8-20130217/gcc/fortran/trans.c:1755
0x57c10b translate_all_program_units
        ../../gcc-4.8-20130217/gcc/fortran/parse.c:4455
0x57c10b gfc_parse_file()
        ../../gcc-4.8-20130217/gcc/fortran/parse.c:4682
0x5b79f5 gfc_be_parse_file
        ../../gcc-4.8-20130217/gcc/fortran/f95-lang.c:189
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

Reply via email to