[Bug fortran/41656] [OOP] Unresolved GENERIC
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=41656 janus at gcc dot gnu.org changed: What|Removed |Added Target Milestone|--- |4.5.0
[Bug fortran/41656] [OOP] Unresolved GENERIC
--- Comment #6 from pault at gcc dot gnu dot org 2009-10-16 06:07 --- Subject: Bug 41656 Author: pault Date: Fri Oct 16 06:07:09 2009 New Revision: 152890 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=152890 Log: 2009-10-16 Paul Thomas pa...@gcc.gnu.org PR fortran/41648 PR fortran/41656 * trans-expr.c (select_class_proc): Convert the expression for the vindex, carried on the first member of the esym list. * gfortran.h : Add the vindex field to the esym_list structure. and eliminate the class_object field. * resolve.c (check_class_members): Remove the setting of the class_object field. (vindex_expr): New function. (get_class_from_expr): New function. (resolve_class_compcall): Call the above to find the ultimate class or derived component. If derived, do not generate the esym list. Add and expression for the vindex to the esym list by calling the above. (resolve_class_typebound_call): The same. 2009-10-16 Paul Thomas pa...@gcc.gnu.org PR fortran/41648 * gfortran.dg/dynamic_dispatch_4.f03 : New test. PR fortran/41656 * gfortran.dg/dynamic_dispatch_5.f03 : New test. Added: trunk/gcc/testsuite/gfortran.dg/dynamic_dispatch_4.f03 trunk/gcc/testsuite/gfortran.dg/dynamic_dispatch_5.f03 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/resolve.c trunk/gcc/fortran/trans-expr.c trunk/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41656
[Bug fortran/41656] [OOP] Unresolved GENERIC
--- Comment #7 from pault at gcc dot gnu dot org 2009-10-16 06:09 --- Fixed on trunk. Thanks for the patch. Paul -- pault at gcc dot gnu dot org changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41656
[Bug fortran/41656] [OOP] Unresolved GENERIC
--- Comment #5 from sfilippone at uniroma2 dot it 2009-10-13 09:06 --- (In reply to comment #4) The recent combined patch by Paul makes my compilation progress; however a little later I get an ICE here: #0 0x00349887efa0 in strcmp () from /lib64/libc.so.6 #1 0x0050ffdd in gfc_find_symtree (st=0x128e7d0, name=0x0) at ../../gcc /gcc/fortran/symbol.c:1810 #2 0x004dd749 in load_derived_extensions () at ../../gcc/gcc/fortran/mo dule.c:3604 #3 read_module () at ../../gcc/gcc/fortran/module.c:4450 #4 0x004de834 in gfc_use_module () at ../../gcc/gcc/fortran/module.c:36 04 #5 0x004e2ca5 in accept_statement (st=value optimized out) at ../../g cc/gcc/fortran/parse.c:4047 #6 0x7fffd710 in ?? () #7 0x004e572e in parse_spec (st=value optimized out) at ../../gcc/gcc /fortran/parse.c:4047 #8 0x7fffd82c in ?? () #9 0x in ?? () If this is related to this patch, it needs some more work. Otherwise, I'll cut the test case and open a new PR -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41656
[Bug fortran/41656] [OOP] Unresolved GENERIC
--- Comment #4 from sfilippone at uniroma2 dot it 2009-10-12 13:44 --- (In reply to comment #3) (In reply to comment #2) The latest patch from Janus cures the SOURCE= problem. Unfortunately a simple extension of test-der5.f03 does not show the ICE; back to the cutting board (to find a trimmed-down test case...) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41656
[Bug fortran/41656] [OOP] Unresolved GENERIC
--- Comment #2 from pault at gcc dot gnu dot org 2009-10-11 16:05 --- Created an attachment (id=18783) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18783action=view) Provisional fix for this PR Hi Salvatore, You might like to exercise this patch. It seems to work correctly but I would be interested to know how it works when used in anger. I am unable to commit anything for the next few days and I wish to fix PR41648 at the same time, since it suffers the same problem. Therefore, posting the patch, testcases and so on is a few days away. ciao Paul -- pault at gcc dot gnu dot org changed: What|Removed |Added AssignedTo|unassigned at gcc dot gnu |pault at gcc dot gnu dot org |dot org | Status|UNCONFIRMED |ASSIGNED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41656
[Bug fortran/41656] [OOP] Unresolved GENERIC
--- Comment #3 from sfilippone at uniroma2 dot it 2009-10-11 18:19 --- (In reply to comment #2) Hi Paul, Seems to work as advertised, in that it takes out the errors it's supposed to cure. On my full application I now get this: psb_s_mat_mod.f03:1345.45: allocate(altmp, source=mold,stat=info) 1 Error: Using SOURCE= with a class variable at (1) not supported yet psb_s_mat_mod.f03: In function s_sizeof: psb_s_mat_mod.f03:152:0: error: case labels not sorted: case 1: is greater than case 1: but comes before it. psb_s_mat_mod.f03:152:0: internal compiler error: verify_flow_info failed Please submit a full bug report, with preprocessed source if appropriate. See http://gcc.gnu.org/bugs.html for instructions. The SOURCE= error is clear enough, but the other is interesting, because it happens in one of the cases that gave rise to PR 41648, line 152 is the end of this function function s_sizeof(a) result(res) implicit none class(psb_s_sparse_mat), intent(in) :: a integer(psb_long_int_k_) :: res res = 0 if (allocated(a%a)) then res = a%a%sizeof() end if end function s_sizeof Since you say you want to take them both do you need access to the full source code? Regards Salvatore -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41656
[Bug fortran/41656] [OOP] Unresolved GENERIC
--- Comment #1 from sfilippone at uniroma2 dot it 2009-10-10 12:53 --- Created an attachment (id=18772) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18772action=view) test case -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41656