[Bug fortran/56079] New: [4.8 Regression] ICE with C_PTR renaming
tkoenig at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Jan 22 19:59:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56079
Bug #: 56079
Summary: [4.8 Regression] ICE with C_PTR renaming
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: tkoenig@gcc.gnu.org
Maybe related to PR 51578 and PR 55574.
program gar_nichts
use ISO_C_BINDING
use ISO_C_BINDING, only: C_PTR
use ISO_C_BINDING, only: abc => C_PTR
use ISO_C_BINDING, only: xyz => C_PTR
type(xyz) nada
nada = transfer(C_NULL_PTR,nada)
end program gar_nichts
ig25@linux-fd1f:/tmp> gfortran nada6.f90
f951: interner Compiler-Fehler: Speicherzugriffsfehler
0x96349f crash_signal
../../trunk/gcc/toplev.c:332
0x5ab741 tree_check
../../trunk/gcc/tree.h:3668
0x5ab741 encode_derived
../../trunk/gcc/fortran/target-memory.c:242
0x5ab741 gfc_target_encode_expr(gfc_expr*, unsigned char*, unsigned long)
../../trunk/gcc/fortran/target-memory.c:319
0x5a2158 gfc_simplify_transfer(gfc_expr*, gfc_expr*, gfc_expr*)
../../trunk/gcc/fortran/simplify.c:6056
0x542f31 do_simplify
../../trunk/gcc/fortran/intrinsic.c:3817
0x550146 gfc_intrinsic_func_interface(gfc_expr*, int)
../../trunk/gcc/fortran/intrinsic.c:4160
0x58c0f6 resolve_unknown_f
../../trunk/gcc/fortran/resolve.c:2613
0x58c0f6 resolve_function
../../trunk/gcc/fortran/resolve.c:3214
0x58c0f6 gfc_resolve_expr(gfc_expr*)
../../trunk/gcc/fortran/resolve.c:6549
0x591699 resolve_code
../../trunk/gcc/fortran/resolve.c:10120
0x59421e resolve_codes
../../trunk/gcc/fortran/resolve.c:14963
0x585282 gfc_resolve
../../trunk/gcc/fortran/resolve.c:14991
0x579bc2 resolve_all_program_units
../../trunk/gcc/fortran/parse.c:4395
0x579bc2 gfc_parse_file()
../../trunk/gcc/fortran/parse.c:4662
0x5b5995 gfc_be_parse_file
../../trunk/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.
ig25@linux-fd1f:/tmp> gdb ~/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/f951
GNU gdb (GDB) 7.5
Copyright (C) 2012 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 "x86_64-unknown-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from
/home/ig25/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/f951...done.
(gdb) r nada6.f90
Starting program: /home/ig25/lib/gcc/x86_64-unknown-linux-gnu/4.8.0/f951
nada6.f90
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
Program received signal SIGSEGV, Segmentation fault.
encode_derived (buffer_size=8, buffer=0x7fffffffd6c0 "", source=<optimized
out>) at ../../trunk/gcc/fortran/target-memory.c:242
242 ptr = TREE_INT_CST_LOW(DECL_FIELD_OFFSET(cmp->backend_decl))
(gdb) p cmp->backend_decl
$1 = (tree) 0x0
(gdb) p *cmp
$2 = {name = 0x7ffff6d5b310 "__xyz_c_address", ts = {type = BT_INTEGER, kind =
8, u = {derived = 0x0, cl = 0x0, pad = 0},
interface = 0x0, is_c_interop = 1, is_iso_c = 0, f90_type = BT_INTEGER,
deferred = false}, 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, public_used = 0, implicit_pure = 0,
noreturn = 0, entry = 0, entry_master = 0, mixed_entry_master = 0,
always_explicit = 0, artificial = 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, lock_comp = 0, defined_assign_comp = 0,
unlimited_polymorphic = 0, select_type_temporary = 0,
ext_attr = 0, volatile_ns = 0x0, asynchronous_ns = 0x0}, as = 0x0,
backend_decl = 0x0, norestrict_decl = 0x0, loc = {
nextc = 0x15aa9ac, lb = 0x15aa970}, initializer = 0x0, next = 0x0, formal =
0x0, formal_ns = 0x0, tb = 0x0}
Works with 4.6, haven't checked 4.7 yet.
More information about the Gcc-bugs
mailing list