public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/51970] New: gimplification failed for an avatar of pr51948
@ 2012-01-23 17:37 dominiq at lps dot ens.fr
  2012-01-23 18:01 ` [Bug fortran/51970] " burnus at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: dominiq at lps dot ens.fr @ 2012-01-23 17:37 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 51970
           Summary: gimplification failed for an avatar of pr51948
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: dominiq@lps.ens.fr
                CC: burnus@net-b.de


Compiling the following (invalid?) avatar of pr51948

type t
end type t

contains
  function func(x)
    class(t), allocatable :: x(:), func2(:)
    call move_alloc (x, func2)
! FAILS: Error: the 'from' and 'to' arguments of 'move_alloc' intrinsic at (1)
must have the same rank 0/1
  end function

  function func2(x)
    type(t), allocatable :: x
    class(t), allocatable :: func2
    call move_alloc (x, func2)
! FAILS: Error: 'to' argument of 'move_alloc' intrinsic at (1) must be a
variable
  end function
end

gives the following ICE

gimplification failed:
&func2._data <addr_expr 0x142d38550
    type <pointer_type 0x142d332a0
        type <record_type 0x142d2fdc8 array1_t type_1 BLK
            size <integer_cst 0x142d0db80 constant 384>
            unit size <integer_cst 0x142d0d600 constant 48>
            align 64 symtab 0 alias set -1 canonical type 0x142d2fe70 fields
<field_decl 0x142d21a18 data>
            pointer_to_this <pointer_type 0x142d332a0> chain <type_decl
0x142d310b8 D.1886>>
        public unsigned DI
        size <integer_cst 0x142c0c940 constant 64>
        unit size <integer_cst 0x142c0c960 constant 8>
        align 64 symtab 0 alias set -1 canonical type 0x142d33348>

    arg 0 <component_ref 0x142d0c540 type <record_type 0x142d2fdc8 array1_t>

        arg 0 <var_decl 0x142c0e640 func2 type <record_type 0x142d2f9d8
__class_MAIN___T_1_a>
            addressable used BLK file pr51948_db.f90 line 6 col 0
            size <integer_cst 0x142d0d820 constant 448>
            unit size <integer_cst 0x142d0d860 constant 56>
            align 64 context <function_decl 0x142d2a500 func>>
        arg 1 <field_decl 0x142d32130 _data type <record_type 0x142d2fdc8
array1_t>
            BLK file pr51948_db.f90 line 6 col 0 size <integer_cst 0x142d0db80
384> unit size <integer_cst 0x142d0d600 48>
            align 64 offset_align 128
            offset <integer_cst 0x142c0c980 constant 0>
            bit offset <integer_cst 0x142c0c9e0 constant 0> context
<record_type 0x142d2f9d8 __class_MAIN___T_1_a> chain <field_decl 0x142d321c8
_vptr>>
        pr51948_db.f90:7:0>
    pr51948_db.f90:7:0>
pr51948_db.f90: In function 'func':
pr51948_db.f90:7:0: internal compiler error: gimplification failed

This may due to the patch at
http://gcc.gnu.org/ml/fortran/2012-01/msg00213.html . The code is accepted by
trunk r183357.


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

end of thread, other threads:[~2012-01-27 13:09 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-23 17:37 [Bug fortran/51970] New: gimplification failed for an avatar of pr51948 dominiq at lps dot ens.fr
2012-01-23 18:01 ` [Bug fortran/51970] " burnus at gcc dot gnu.org
2012-01-24 10:41 ` [Bug fortran/51970] [OOP] gimplification failed for polymorphic MOVE_ALLOC dominiq at lps dot ens.fr
2012-01-24 16:03 ` burnus at gcc dot gnu.org
2012-01-24 23:01 ` dominiq at lps dot ens.fr
2012-01-27 13:12 ` burnus at gcc dot gnu.org
2012-01-27 13:18 ` burnus 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).