public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/46974] New: ICE with TRANSFER using a C_PTR entity
@ 2010-12-15 21:39 kargl at gcc dot gnu.org
  2010-12-17 23:15 ` [Bug fortran/46974] " kargl at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: kargl at gcc dot gnu.org @ 2010-12-15 21:39 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: ICE with TRANSFER using a C_PTR entity
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: kargl@gcc.gnu.org


program bug1
   use ISO_C_BINDING
   implicit none
   type(c_ptr) :: m
   type mytype
     integer a, b, c
   end type mytype
   type(mytype) x
   print *, transfer(32512, x)  ! Works.
   print *, transfer(32512, m)  ! Cause ICE.
end program bug1 


laptop:kargl[206] gfc4x -c po.f90
f951: internal compiler error: Segmentation fault: 11
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

laptop:kargl[207] gdb
/usr/home/kargl/work/libexec/gcc/i386-unknown-freebsd9.0/4.6.0/f951
GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i386-unknown-freebsd8.0"...
(gdb) run po.f90
Starting program:
/usr/home/kargl/work/libexec/gcc/i386-unknown-freebsd9.0/4.6.0/f951 po.f90

Program received signal SIGSEGV, Segmentation fault.
0x0814d56d in gfc_interpret_derived (buffer=0xbfbfe0e0 "", buffer_size=4, 
    result=0x495759e0) at ../../gcc4x/gcc/fortran/target-memory.c:486
486           ptr = TREE_INT_CST_LOW (DECL_FIELD_BIT_OFFSET
(cmp->backend_decl));
(gdb) print cmp->backend_decl
$1 = (tree) 0x0
(gdb) print *cmp
$3 = {name = 0x49830a64 "__c_ptr_c_address", ts = {type = BT_INTEGER, 
    kind = 4, u = {derived = 0x0, cl = 0x0, pad = 0}, interface = 0x0, 
    is_c_interop = 1, is_iso_c = 0, f90_type = BT_INTEGER, deferred = 0 '\0'}, 
  attr = {allocatable = 0, dimension = 0, codimension = 0, external = 0, 
    intrinsic = 0, optional = 0, pointer = 0, target = 0, value = 0, 
    volatile_ = 0, temporary = 0, dummy = 0, result = 0, assign = 0, 
    threadprivate = 0, not_always_present = 0, implied_index = 0, 
    subref_array_pointer = 0, proc_pointer = 0, asynchronous = 0, 
    contiguous = 0, class_pointer = 0, save = SAVE_NONE, data = 0, 
    is_protected = 0, use_assoc = 0, use_only = 0, use_rename = 0, 
    imported = 0, host_assoc = 0, in_namelist = 0, in_common = 0, 
    in_equivalence = 0, function = 0, subroutine = 0, procedure = 0, 
    generic = 0, generic_copy = 0, implicit_type = 0, untyped = 0, 
    is_bind_c = 0, extension = 0, is_class = 0, class_ok = 0, vtab = 0, 
    vtype = 0, is_c_interop = 0, is_iso_c = 0, sequence = 0, elemental = 0, 
    pure = 0, recursive = 0, unmaskable = 0, masked = 0, contained = 0, 
    mod_proc = 0, abstract = 0, noreturn = 0, entry = 0, entry_master = 0, 
    mixed_entry_master = 0, always_explicit = 0, referenced = 0, 
    is_main_program = 0, access = ACCESS_UNKNOWN, intent = INTENT_UNKNOWN, 
    flavor = FL_UNKNOWN, if_source = IFSRC_UNKNOWN, proc = PROC_UNKNOWN, 
    cray_pointer = 0, cray_pointee = 0, alloc_comp = 0, pointer_comp = 0, 
    proc_pointer_comp = 0, private_comp = 0, zero_comp = 0, coarray_comp = 0, 
    select_type_temporary = 0, ext_attr = 0, volatile_ns = 0x0, 
    asynchronous_ns = 0x0}, as = 0x0, backend_decl = 0x0, loc = {
    nextc = 0x495740e4, lb = 0x49574080}, initializer = 0x0, next = 0x0, 
  formal = 0x0, formal_ns = 0x0, tb = 0x0}


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

end of thread, other threads:[~2010-12-20 21:44 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-15 21:39 [Bug fortran/46974] New: ICE with TRANSFER using a C_PTR entity kargl at gcc dot gnu.org
2010-12-17 23:15 ` [Bug fortran/46974] " kargl at gcc dot gnu.org
2010-12-18  0:01 ` sgk at troutmask dot apl.washington.edu
2010-12-18  6:45 ` sgk at troutmask dot apl.washington.edu
2010-12-18 10:07 ` burnus at gcc dot gnu.org
2010-12-18 15:38 ` burnus at gcc dot gnu.org
2010-12-18 16:21 ` burnus at gcc dot gnu.org
2010-12-18 17:11 ` sgk at troutmask dot apl.washington.edu
2010-12-18 20:19 ` burnus at gcc dot gnu.org
2010-12-18 20:26 ` burnus at gcc dot gnu.org
2010-12-19 11:25 ` burnus at gcc dot gnu.org
2010-12-20 21:44 ` 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).