Summary: | [OOP] Fortran runtime error: internal error: bad hash value in dynamic dispatch | ||
---|---|---|---|
Product: | gcc | Reporter: | David Car <david.car7> |
Component: | fortran | Assignee: | Not yet assigned to anyone <unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | gcc-bugs, janus |
Priority: | P3 | Keywords: | wrong-code |
Version: | 4.5.1 | ||
Target Milestone: | 4.6.0 | ||
Host: | Target: | ||
Build: | Known to work: | 4.6.0 | |
Known to fail: | 4.5.1 | Last reconfirmed: | |
Attachments: | test case described in post |
Description
David Car
2010-07-08 02:09:17 UTC
Created attachment 21136 [details]
test case described in post
Can you update to GCC 4.6? I get the same error with 4.5, but with 4.6 I get the same result as with NAG or Intel. The reason is that gfortran now uses a proper vtable. Or in the words of http://gcc.gnu.org/gcc-4.6/changes.html : * Improved support for polymorphism between libraries and programs and for complicated inheritance patterns (cf. http://gcc.gnu.org/wiki/OOP) Newer binaries can be found at http://gcc.gnu.org/wiki/GFortranBinaries Closing as fixed. Subject: Bug 44863 Author: janus Date: Sat Aug 21 14:50:57 2010 New Revision: 163445 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=163445 Log: 2010-08-21 Janus Weil <janus@gcc.gnu.org> PR fortran/45271 PR fortran/45290 * class.c (add_proc_comp): Add static initializer for PPCs. (add_procs_to_declared_vtab): Modified comment. * module.c (mio_component): Add argument 'vtype'. Don't read/write the initializer if the component is part of a vtype. (mio_component_list): Add argument 'vtype', pass it on to 'mio_component'. (mio_symbol): Modified call to 'mio_component_list'. * trans.h (gfc_conv_initializer): Modified prototype. (gfc_trans_assign_vtab_procs): Removed. * trans-common.c (create_common): Modified call to 'gfc_conv_initializer'. * trans-decl.c (gfc_get_symbol_decl,get_proc_pointer_decl, gfc_emit_parameter_debug_info): Modified call to 'gfc_conv_initializer'. (build_function_decl): Remove assertion. * trans-expr.c (gfc_conv_derived_to_class,gfc_trans_class_assign): Removed call to 'gfc_trans_assign_vtab_procs'. (gfc_conv_initializer): Add argument 'procptr'. (gfc_conv_structure): Modified call to 'gfc_conv_initializer'. (gfc_trans_assign_vtab_procs): Removed. * trans-stmt.c (gfc_trans_allocate): Removed call to 'gfc_trans_assign_vtab_procs'. 2010-08-21 Janus Weil <janus@gcc.gnu.org> PR fortran/44863 PR fortran/45271 PR fortran/45290 * gfortran.dg/dynamic_dispatch_10.f03: New (PR 44863 comment #1). * gfortran.dg/pointer_init_5.f90: New (PR 45290 comment #6). * gfortran.dg/typebound_call_18.f03: New (PR 45271 comment #3). Added: trunk/gcc/testsuite/gfortran.dg/dynamic_dispatch_10.f03 trunk/gcc/testsuite/gfortran.dg/pointer_init_5.f90 trunk/gcc/testsuite/gfortran.dg/typebound_call_18.f03 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/class.c trunk/gcc/fortran/module.c trunk/gcc/fortran/trans-common.c trunk/gcc/fortran/trans-decl.c trunk/gcc/fortran/trans-expr.c trunk/gcc/fortran/trans-stmt.c trunk/gcc/fortran/trans.h trunk/gcc/testsuite/ChangeLog r163445 adds comment #1 to the testsuite, because it uncovered a regression in my recent patch for PR 45271 (thanks to Dominique for noticing). |