[Bug fortran/45654] -fwhole-file doesn't warn about INTERFACE vs. definition mismatches
--- Comment #1 from pault at gcc dot gnu dot org 2010-09-22 05:31 --- No. Confirmed - thanks for picking it up. Paul -- pault at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last reconfirmed|-00-00 00:00:00 |2010-09-22 05:31:30 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45654
[Bug fortran/45081] [4.3/4.4/4.5/4.6 Regression] ICE in gfc_conv_array_initializer, at fortran/trans-array.c:4208
--- Comment #11 from pault at gcc dot gnu dot org 2010-09-20 18:55 --- Subject: Bug 45081 Author: pault Date: Mon Sep 20 18:55:12 2010 New Revision: 164448 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=164448 Log: 2010-09-20 Paul Thomas pa...@gcc.gnu.org PR fortran/45081 * simplify.c (is_constant_array_expr): Allow structure array elements as well as constants. (gfc_simplify_pack, gfc_simplify_reshape, gfc_simplify_spread, gfc_simplify_transpose, gfc_simplify_unpack): Copy the derived type of source to the result. 2010-09-20 Paul Thomas pa...@gcc.gnu.org PR fortran/45081 * gfortran.dg/derived_array_intrinsics_1.f90 : New test. Added: trunk/gcc/testsuite/gfortran.dg/derived_array_intrinisics_1.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/simplify.c trunk/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45081
[Bug fortran/45081] [4.3/4.4/4.5/4.6 Regression] ICE in gfc_conv_array_initializer, at fortran/trans-array.c:4208
--- Comment #12 from pault at gcc dot gnu dot org 2010-09-20 21:23 --- Subject: Bug 45081 Author: pault Date: Mon Sep 20 21:23:38 2010 New Revision: 164457 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=164457 Log: 2010-09-20 Paul Thomas pa...@gcc.gnu.org PR fortran/45081 * simplify.c (is_constant_array_expr): Allow structure array elements as well as constants. (gfc_simplify_pack, gfc_simplify_reshape, gfc_simplify_spread, gfc_simplify_transpose, gfc_simplify_unpack): Copy the derived type of source to the result. 2010-09-20 Paul Thomas pa...@gcc.gnu.org PR fortran/45081 * gfortran.dg/derived_array_intrinsics_1.f90 : New test. Added: branches/gcc-4_5-branch/gcc/testsuite/gfortran.dg/derived_array_intrinisics_1.f90 Modified: branches/gcc-4_5-branch/gcc/fortran/ChangeLog branches/gcc-4_5-branch/gcc/fortran/simplify.c branches/gcc-4_5-branch/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45081
[Bug fortran/45081] [4.3/4.4/4.5/4.6 Regression] ICE in gfc_conv_array_initializer, at fortran/trans-array.c:4208
--- Comment #7 from pault at gcc dot gnu dot org 2010-09-16 05:11 --- Created an attachment (id=21808) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21808action=view) A fix for this PR Bootstraps and regtests on FC9/x86_64. It is clear that many other array intrinsics fail with derived type sources. I have verified this for (un)pack and applied it to the attached patch. I believe that there are related PRs that I have to find. I am away until Monday. I will complete the job then and submit thereafter. Cheers 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|NEW |ASSIGNED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45081
[Bug fortran/24524] Fortran dependency checking should reverse loops
--- Comment #7 from pault at gcc dot gnu dot org 2010-08-21 11:57 --- (In reply to comment #6) Hello Paul, I think the patch you committed to 4.5 causes a regression for normal loops, which are now handled as overlapping. Thomas, I did not commit anything but I tried it out. There is some missing backend fix. My inclination is not to backport and so I have marked the bug as fixed. Thanks 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=24524
[Bug fortran/45305] Array-valued calles to elementals are not simplified
--- Comment #2 from pault at gcc dot gnu dot org 2010-08-20 05:18 --- Created an attachment (id=21527) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21527action=view) fix for the PR Regtests on Ubuntu10.03/i686. Will submit properly this weekend. This was some light relief from the array descriptor work :-) I tried this when I introduced the scalarization of initialization expressions. I obviously missed something but I could not get it going at the time. Cheers 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=45305
[Bug fortran/44735] ICE on FORALL with character array pointer
--- Comment #2 from pault at gcc dot gnu dot org 2010-08-18 18:55 --- Created an attachment (id=21513) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21513action=view) The beginings of a fix This PR is going to drive me mad! The immediate cause is a failure to get the TYPE_SIZE_UNIT to calculate the size of the temporary needed for the assignment. This fixes that part of the problem but moves the focus to the assignment itself. Something is badly wrong with the temporary's TREE_TYPE but I do not see what it is right now. Let this be the record of where I got to Paul -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44735
[Bug fortran/44945] [4.6 Regression] Wrong decl for module vars / FAIL: gfortran.dg/char_array_structure_constructor.f90
--- Comment #27 from pault at gcc dot gnu dot org 2010-08-17 09:42 --- (In reply to comment #25) (In reply to comment #21) In my opinion revision 162487 is only a partial fix of the problem. If I split a modified test case in two files: [...] I still get [...] Bus error (In reply to comment #24) Look at -fdump-tree-original-uid dumps and see if you find the same decl with two different UIDs. I bet you will. One does. The problem is that when the module is not available. The variable c (of example in comment 21) created for the main program char_array_structure_constructor but if one searches for the symbol (in gfc_get_symbol_decl) via gsym = gfc_find_gsymbol (gfc_gsym_root, sym-module); the result is NULL as the only gsym which exists in gfc_gsym_root is the one for char_array_structure_constructor as there is none for the module. One should create a fake gsym for modules, if the module does not exist, and put there the variables, functions, and type declarations - such that they can be found if needed. Tobias, This is a very good suggestion. I will have a think about how to implement it and will come back to you. It is consistent with what I had in mind to improve the efficiency of module reading. ie. read_module proceeds as follows: (i) On encountering a USE statement, look for the module gsym. If it does not exist, use read_module, as at present, to construct the namespace, without any exclusions or renames; (ii) In the current scope, create symtrees using the ONLY and the renames and point to the symbols in the gsym namespace; (iii) Subsequent USEs of the same module proceed by using the gsym namespace. I think that Andy was smoking something or was having a whimsical spell when he wrote module.c. Whilst it is very elegant, it is unnecessarily disjunct from the rest of the frontend and could have been done as above. Cheers Paul -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44945
[Bug fortran/45081] [4.3/4.4/4.5/4.6 Regression] ICE in gfc_conv_array_initializer, at fortran/trans-array.c:4208
--- Comment #6 from pault at gcc dot gnu dot org 2010-08-17 12:07 --- (In reply to comment #1) Confirmed as a regression: it compiles with 4.2.4 (ppc-darwin), gives an ICE with 4.3.4, 4.4.2, 4.5.0 and trunk. You did not mark the PR as confirmed :-) Paul -- pault at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last reconfirmed|-00-00 00:00:00 |2010-08-17 12:07:05 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45081
[Bug fortran/24524] Fortran dependency checking should reverse loops
--- Comment #5 from pault at gcc dot gnu dot org 2010-07-23 14:26 --- Subject: Bug 24524 Author: pault Date: Fri Jul 23 14:25:55 2010 New Revision: 162462 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=162462 Log: 2009-07-23 Paul Thomas pa...@gcc.gnu.org PR fortran/24524 * trans-array.c (gfc_init_loopinfo): Initialize the reverse field. gfc_trans_scalarized_loop_end: If reverse set in dimension n, reverse the scalarization loop. gfc_conv_resolve_dependencies: Pass the reverse field of the loopinfo to gfc_dep_resolver. trans-expr.c (gfc_trans_assignment_1): Enable loop reversal for assignment by resetting loop.reverse. gfortran.h : Add the gfc_reverse enum. trans.h : Add the reverse field to gfc_loopinfo. dependency.c (gfc_check_dependency): Pass null to the new arg of gfc_dep_resolver. (gfc_check_section_vs_section): Check for reverse dependencies. (gfc_dep_resolver): Add reverse argument and deal with the loop reversal logic. dependency.h : Modify prototype for gfc_dep_resolver to include gfc_reverse *. Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/dependency.c trunk/gcc/fortran/dependency.h trunk/gcc/fortran/gfortran.h trunk/gcc/fortran/trans-array.c trunk/gcc/fortran/trans-expr.c trunk/gcc/fortran/trans.h -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24524
[Bug fortran/42385] [OOP] poylmorphic operators do not work
--- Comment #8 from pault at gcc dot gnu dot org 2010-07-19 18:49 --- Subject: Bug 42385 Author: pault Date: Mon Jul 19 18:48:44 2010 New Revision: 162313 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=162313 Log: 2010-07-19 Paul Thomas pa...@gcc.gnu.org PR fortran/42385 * interface.c (matching_typebound_op): Add argument for the return of the generic name for the procedure. (build_compcall_for_operator): Add an argument for the generic name of an operator procedure and supply it to the expression. (gfc_extend_expr, gfc_extend_assign): Use the generic name in calls to the above procedures. * resolve.c (resolve_typebound_function): Catch procedure component calls for CLASS objects, check that the vtable is complete and insert the $vptr and procedure components, to make the call. (resolve_typebound_function): The same. * trans-decl.c (gfc_trans_deferred_vars): Do not deallocate an allocatable scalar if it is a result. 2010-07-19 Paul Thomas pa...@gcc.gnu.org PR fortran/42385 * gfortran.dg/class_defined_operator_1.f03 : New test. Added: trunk/gcc/testsuite/gfortran.dg/class_defined_operator_1.f03 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/interface.c trunk/gcc/fortran/resolve.c trunk/gcc/fortran/trans-decl.c trunk/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42385
[Bug fortran/43179] ICE invalid if accessing array member of non-array
--- Comment #7 from pault at gcc dot gnu dot org 2010-07-18 07:09 --- (In reply to comment #2) (In reply to comment #1) This fixes it and regtests. + if (array-expr_type != EXPR_VARIABLE array-expr_type != EXPR_FUNCTION) The patch looks OK, but actually I fail to see when an EXPR_FUNCTION is valid in this case. If I try: Try allocatable_scalar_5.f90 Paul -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43179
[Bug fortran/44353] rejects legal fortran
--- Comment #3 from pault at gcc dot gnu dot org 2010-07-18 16:16 --- Subject: Bug 44353 Author: pault Date: Sun Jul 18 16:15:43 2010 New Revision: 162286 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=162286 Log: 2010-07-18 Paul Thomas pa...@gcc.gnu.org PR fortran/44353 * match.c (gfc_match_iterator): Remove error that iterator cannot be INTENT(IN). 2010-07-18 Paul Thomas pa...@gcc.gnu.org PR fortran/44353 * gfortran.dg/data_implied_do_2.f03 : New test. Added: trunk/gcc/testsuite/gfortran.dg/data_implied_do_2.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/match.c trunk/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44353
[Bug fortran/44353] rejects legal fortran
--- Comment #4 from pault at gcc dot gnu dot org 2010-07-19 05:05 --- Subject: Bug 44353 Author: pault Date: Mon Jul 19 05:05:23 2010 New Revision: 162294 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=162294 Log: 2010-07-19 Paul Thomas pa...@gcc.gnu.org PR fortran/44353 * match.c (gfc_match_iterator): Revert. 2010-07-19 Paul Thomas pa...@gcc.gnu.org PR fortran/44353 * gfortran.dg/data_implied_do_2.f03 : Remove. Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/match.c trunk/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44353
[Bug fortran/42385] [OOP] poylmorphic operators do not work
--- Comment #7 from pault at gcc dot gnu dot org 2010-07-16 13:20 --- Created an attachment (id=21221) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21221action=view) Fix for the PR Please note that this patch contains part of Janus' clean-up of vtabs diff. This came about because the tree on my laptop is too old. I will separate out the fix for PR42385 tonight. It bootstraps and regtests on RHEL5.3/i686. Paul The following runs correctly: module foo_module implicit none private public :: foo type :: foo integer :: i contains procedure :: times = times_foo procedure :: assign = assign_foo generic :: operator(*) = times generic :: assignment(=) = assign end type contains function times_foo(this,factor) result(product) class(foo) ,intent(in) :: this class(foo) ,pointer :: product real, intent(in) :: factor allocate (product, source = this) product%i = this%i * int (factor) end function subroutine assign_foo(lhs,rhs) class(foo) ,intent(inout) :: lhs class(foo) ,intent(in) :: rhs lhs%i = rhs%i end subroutine end module module bar_module use foo_module ,only : foo implicit none private public :: bar type ,extends(foo) :: bar real :: x contains procedure :: times = times_bar procedure :: assign = assign_bar end type contains subroutine assign_bar(lhs,rhs) class(bar) ,intent(inout) :: lhs class(foo) ,intent(in) :: rhs lhs%i = rhs%i select type(rhs) type is (bar) lhs%x = rhs%x end select end subroutine function times_bar(this,factor) result(product) class(bar) ,intent(in) :: this real, intent(in) :: factor class(foo), pointer :: product select type(this) type is (bar) allocate(product,source=this) select type(product) type is(bar) product%i = this%i*int(factor) product%x = this%x*factor end select end select end function end module program main use foo_module ,only : foo use bar_module ,only : bar implicit none type(foo) :: uniti = foo(2) type(bar) :: unitx = bar(2, 1.0) call rescale(uniti, 3.141592654) call rescale(unitx, 3.141592654) print *, uniti%i print *, unitx%x, unitx%i contains subroutine rescale(this,scale) class(foo) ,intent(inout) :: this real, intent(in) :: scale this = this*scale end subroutine end program -- 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=42385
[Bug fortran/43986] [OOP] gfortran.dg/dynamic_dispatch_4.f03 doesn't work on Linux/ia64
--- Comment #6 from pault at gcc dot gnu dot org 2010-07-16 17:35 --- (In reply to comment #5) Is this now fixed on trunk? We had to deal with the TBAA problem with the arrival of mem-ref2. Paul -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43986
[Bug fortran/40158] Misleading error message for passing a scalar to an array
--- Comment #5 from pault at gcc dot gnu dot org 2010-07-16 04:39 --- PR closed. Thanks for the report. 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=40158
[Bug fortran/44582] gfortran generates wrong results due to wrong ABI in function with array return
--- Comment #21 from pault at gcc dot gnu dot org 2010-07-16 04:49 --- I tried to fix 4.3 but failed to find an easy way of overcoming problems with 4.3. Since this bug has been present for 10 years without being reported, I feel quite relaxed about leaving 4.3 as it is. Fixed on 4.4-4.6 Thanks for the report! Cheers 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=44582
[Bug fortran/44773] [4.6 Regression] Unnecessary temporaries increase the runtime for channel.f90 by ~70%
--- Comment #19 from pault at gcc dot gnu dot org 2010-07-11 16:07 --- Subject: Bug 44773 Author: pault Date: Sun Jul 11 16:06:53 2010 New Revision: 162059 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=162059 Log: 2010-07-11 Paul Thomas pa...@gcc.gnu.org PR fortran/44773 * trans-expr.c (arrayfunc_assign_needs_temporary): No temporary if the lhs has never been host associated, as well as not being use associated, a pointer or a target. * resolve.c (resolve_variable): Mark variables that are host associated. * gfortran.h: Add the host_assoc bit to the symbol_attribute structure. Modified: branches/gcc-4_5-branch/gcc/fortran/ChangeLog branches/gcc-4_5-branch/gcc/fortran/gfortran.h branches/gcc-4_5-branch/gcc/fortran/resolve.c branches/gcc-4_5-branch/gcc/fortran/trans-expr.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44773
[Bug fortran/44596] [OOP] Dynamic dispatch uses broken types
--- Comment #20 from pault at gcc dot gnu dot org 2010-07-11 17:45 --- (In reply to comment #19) Subject: Re: [OOP] Dynamic dispatch uses broken types Dear Tobias, Paul, thanks for the check in. Do you plan to backport it to 4.5, which sems to use the same code? When I add the vtype attribute and the above patch, almost every OOP test fails with, for example: /svn/gcc-4_5-branch/gcc/testsuite/gfortran.dg/class_6.f03:7:0: internal compiler error: in gimplify_expr, at gimplify.c:7346 Please submit a full bug report, with preprocessed source if appropriate. See http://gcc.gnu.org/bugs.html for instructions. I think that, since we do not need this (yet!), I am disinclined to spend any more time on it, unless Richard understands what is happening. Paul -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44596
[Bug fortran/44773] [4.6 Regression] Unnecessary temporaries increase the runtime for channel.f90 by ~70%
--- Comment #17 from pault at gcc dot gnu dot org 2010-07-10 14:57 --- Subject: Bug 44773 Author: pault Date: Sat Jul 10 14:57:25 2010 New Revision: 162038 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=162038 Log: 2010-07-10 Paul Thomas pa...@gcc.gnu.org PR fortran/44773 * trans-expr.c (arrayfunc_assign_needs_temporary): No temporary if the lhs has never been host associated, as well as not being use associated, a pointer or a target. * resolve.c (resolve_variable): Mark variables that are host associated. * gfortran.h: Add the host_assoc bit to the symbol_attribute structure. Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/gfortran.h trunk/gcc/fortran/resolve.c trunk/gcc/fortran/trans-expr.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44773
[Bug fortran/40591] Procedure(interface): Rejected if interface is indirectly hostassociated
--- Comment #11 from pault at gcc dot gnu dot org 2010-07-10 16:46 --- (In reply to comment #10) Note that I did not apply the patch to 4.4 as I said that I would. What do you think? 4.4 is sufficiently different from 4.5/6 that I am closing this as fixed. Paul -- pault at gcc dot gnu dot org changed: What|Removed |Added Status|WAITING |RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40591
[Bug fortran/44582] gfortran generates wrong results due to wrong ABI in function with array return
--- Comment #20 from pault at gcc dot gnu dot org 2010-07-10 17:09 --- Subject: Bug 44582 Author: pault Date: Sat Jul 10 17:08:48 2010 New Revision: 162041 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=162041 Log: 2010-07-10 Paul Thomas pa...@gcc.gnu.org PR fortran/44582 * trans-expr.c (arrayfunc_assign_needs_temporary): New function to determine if a function assignment can be made without a temporary. (gfc_trans_arrayfunc_assign): Move all the conditions that suppress the direct function call to the above new functon and call it. PR fortran/44773 * trans-expr.c (arrayfunc_assign_needs_temporary): No temporary if the lhs has never been host associated, as well as not being use associated, a pointer or a target. * resolve.c (resolve_variable): Mark variables that are host associated. * gfortran.h: Add the host_assoc bit to the symbol_attribute structure. 2010-07-10 Paul Thomas pa...@gcc.gnu.org PR fortran/44582 * gfortran.dg/aliasing_array_result_1.f90 : New test. Added: branches/gcc-4_4-branch/gcc/testsuite/gfortran.dg/aliasing_array_result_1.f90 Modified: branches/gcc-4_4-branch/gcc/fortran/ChangeLog branches/gcc-4_4-branch/gcc/fortran/gfortran.h branches/gcc-4_4-branch/gcc/fortran/resolve.c branches/gcc-4_4-branch/gcc/fortran/trans-expr.c branches/gcc-4_4-branch/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44582
[Bug fortran/44773] [4.6 Regression] Unnecessary temporaries increase the runtime for channel.f90 by ~70%
--- Comment #18 from pault at gcc dot gnu dot org 2010-07-10 17:09 --- Subject: Bug 44773 Author: pault Date: Sat Jul 10 17:08:48 2010 New Revision: 162041 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=162041 Log: 2010-07-10 Paul Thomas pa...@gcc.gnu.org PR fortran/44582 * trans-expr.c (arrayfunc_assign_needs_temporary): New function to determine if a function assignment can be made without a temporary. (gfc_trans_arrayfunc_assign): Move all the conditions that suppress the direct function call to the above new functon and call it. PR fortran/44773 * trans-expr.c (arrayfunc_assign_needs_temporary): No temporary if the lhs has never been host associated, as well as not being use associated, a pointer or a target. * resolve.c (resolve_variable): Mark variables that are host associated. * gfortran.h: Add the host_assoc bit to the symbol_attribute structure. 2010-07-10 Paul Thomas pa...@gcc.gnu.org PR fortran/44582 * gfortran.dg/aliasing_array_result_1.f90 : New test. Added: branches/gcc-4_4-branch/gcc/testsuite/gfortran.dg/aliasing_array_result_1.f90 Modified: branches/gcc-4_4-branch/gcc/fortran/ChangeLog branches/gcc-4_4-branch/gcc/fortran/gfortran.h branches/gcc-4_4-branch/gcc/fortran/resolve.c branches/gcc-4_4-branch/gcc/fortran/trans-expr.c branches/gcc-4_4-branch/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44773
[Bug fortran/44773] [4.6 Regression] Unnecessary temporaries increase the runtime for channel.f90 by ~70%
--- Comment #10 from pault at gcc dot gnu dot org 2010-07-08 12:29 --- Created an attachment (id=21142) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21142action=view) A first step to fix this bug This does the right thing but has not been regtested because my tree is so broken that even hello world does not run. However, I am confident that it can be persuaded to regtest and will do so tonight. Cheers 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|NEW |ASSIGNED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44773
[Bug fortran/24524] Fortran dependency checking should reverse loops
--- Comment #3 from pault at gcc dot gnu dot org 2010-07-06 15:42 --- Created an attachment (id=21113) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21113action=view) Fix for the PR This version fixes the problem with channel.f90 and has cleaned-up/extra comments -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24524
[Bug fortran/44596] [OOP] Dynamic dispatch uses broken types
--- Comment #17 from pault at gcc dot gnu dot org 2010-07-05 19:26 --- Subject: Bug 44596 Author: pault Date: Mon Jul 5 19:26:12 2010 New Revision: 161848 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=161848 Log: 2010-07-05 Paul Thomas pa...@gcc.gnu.org PR fortran/44596 * trans-types.c (gfc_get_derived_type): Derived type fields with the vtype attribute must have TYPE_REF_CAN_ALIAS_ALL set but build_pointer_type_for_mode must be used for this. Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/trans-types.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44596
[Bug fortran/44596] [OOP] Dynamic dispatch uses broken types
--- Comment #11 from pault at gcc dot gnu dot org 2010-07-04 14:40 --- Subject: Bug 44596 Author: pault Date: Sun Jul 4 14:40:34 2010 New Revision: 161801 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=161801 Log: 2010-07-04 Paul Thomas pa...@gcc.gnu.org PR fortran/44596 PR fortran/44745 * trans-types.c (gfc_get_derived_type): Derived type fields with the vtype attribute must have TYPE_REF_CAN_ALIAS_ALL set. Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/trans-types.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44596
[Bug middle-end/44745] [4.6 regression] FAIL: gfortran.dg/dynamic_dispatch_6.f03
--- Comment #2 from pault at gcc dot gnu dot org 2010-07-04 14:40 --- Subject: Bug 44745 Author: pault Date: Sun Jul 4 14:40:34 2010 New Revision: 161801 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=161801 Log: 2010-07-04 Paul Thomas pa...@gcc.gnu.org PR fortran/44596 PR fortran/44745 * trans-types.c (gfc_get_derived_type): Derived type fields with the vtype attribute must have TYPE_REF_CAN_ALIAS_ALL set. Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/trans-types.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44745
[Bug fortran/44596] [OOP] Dynamic dispatch uses broken types
--- Comment #10 from pault at gcc dot gnu dot org 2010-07-01 18:27 --- (In reply to comment #9) (In reply to comment #8) I'm on the road for a few days - I'll update the tree on my laptop and see what I can do :-) Cheers 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 Ever Confirmed|0 |1 Last reconfirmed|-00-00 00:00:00 |2010-07-01 18:27:06 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44596
[Bug fortran/44582] gfortran generates wrong results due to wrong ABI in function with array return
--- Comment #18 from pault at gcc dot gnu dot org 2010-06-29 18:58 --- Subject: Bug 44582 Author: pault Date: Tue Jun 29 18:57:43 2010 New Revision: 161550 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=161550 Log: 2010-06-29 Paul Thomas pa...@gcc.gnu.org PR fortran/44582 * trans-expr.c (arrayfunc_assign_needs_temporary): New function to determine if a function assignment can be made without a temporary. (gfc_trans_arrayfunc_assign): Move all the conditions that suppress the direct function call to the above new functon and call it. 2010-06-29 Paul Thomas pa...@gcc.gnu.org PR fortran/44582 * gfortran.dg/aliasing_array_result_1.f90 : New test. Added: trunk/gcc/testsuite/gfortran.dg/aliasing_array_result_1.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/trans-expr.c trunk/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44582
[Bug fortran/44582] gfortran generates wrong results due to wrong ABI in function with array return
--- Comment #19 from pault at gcc dot gnu dot org 2010-06-29 19:03 --- Subject: Bug 44582 Author: pault Date: Tue Jun 29 19:03:41 2010 New Revision: 161551 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=161551 Log: 2010-06-29 Paul Thomas pa...@gcc.gnu.org PR fortran/44582 * trans-expr.c (arrayfunc_assign_needs_temporary): New function to determine if a function assignment can be made without a temporary. (gfc_trans_arrayfunc_assign): Move all the conditions that suppress the direct function call to the above new functon and call it. 2010-06-29 Paul Thomas pa...@gcc.gnu.org PR fortran/44582 * gfortran.dg/aliasing_array_result_1.f90 : New test. Added: branches/gcc-4_5-branch/gcc/testsuite/gfortran.dg/aliasing_array_result_1.f90 Modified: branches/gcc-4_5-branch/gcc/fortran/ChangeLog branches/gcc-4_5-branch/gcc/fortran/trans-expr.c branches/gcc-4_5-branch/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44582
[Bug fortran/40158] Misleading error message for passing a scalar to an array
--- Comment #4 from pault at gcc dot gnu dot org 2010-06-28 17:16 --- Subject: Bug 40158 Author: pault Date: Mon Jun 28 17:16:06 2010 New Revision: 161504 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=161504 Log: 2010-06-28 Paul Thomas pa...@gcc.gnu.org PR fortran/40158 * interface.c (argument_rank_mismatch): New function. (compare_parameter): Call new function instead of generating the error directly. 2010-06-28 Paul Thomas pa...@gcc.gnu.org PR fortran/40158 * gfortran.dg/actual_rank_check_1.f90: New test. Added: trunk/gcc/testsuite/gfortran.dg/actual_rank_check_1.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/interface.c trunk/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40158
[Bug fortran/43843] Wrong-code due to missing temporary with user-defined operatator
--- Comment #4 from pault at gcc dot gnu dot org 2010-06-27 16:15 --- Subject: Bug 43843 Author: pault Date: Sun Jun 27 16:14:55 2010 New Revision: 161471 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=161471 Log: 2010-06-27 Paul Thomas pa...@gcc.gnu.org PR fortran/43841 PR fortran/43843 * trans-expr.c (gfc_conv_expr): Supply an address expression for GFC_SS_REFERENCE. (gfc_conv_expr_reference): Call gfc_conv_expr and return for GFC_SS_REFERENCE. * trans-array.c (gfc_add_loop_ss_code): Store the value rather than the address of a GFC_SS_REFERENCE. * trans.h : Change comment on GFC_SS_REFERENCE. 2010-06-27 Paul Thomas pa...@gcc.gnu.org PR fortran/43841 PR fortran/43843 * gfortran.dg/elemental_scalar_args_1.f90 : New test. Added: branches/gcc-4_5-branch/gcc/testsuite/gfortran.dg/elemental_scalar_args_1.f90 Modified: branches/gcc-4_5-branch/gcc/fortran/ChangeLog branches/gcc-4_5-branch/gcc/fortran/trans-array.c branches/gcc-4_5-branch/gcc/fortran/trans-expr.c branches/gcc-4_5-branch/gcc/fortran/trans.h branches/gcc-4_5-branch/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43843
[Bug fortran/43841] Missing temporary for ELEMENTAL function call
--- Comment #12 from pault at gcc dot gnu dot org 2010-06-27 16:15 --- Subject: Bug 43841 Author: pault Date: Sun Jun 27 16:14:55 2010 New Revision: 161471 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=161471 Log: 2010-06-27 Paul Thomas pa...@gcc.gnu.org PR fortran/43841 PR fortran/43843 * trans-expr.c (gfc_conv_expr): Supply an address expression for GFC_SS_REFERENCE. (gfc_conv_expr_reference): Call gfc_conv_expr and return for GFC_SS_REFERENCE. * trans-array.c (gfc_add_loop_ss_code): Store the value rather than the address of a GFC_SS_REFERENCE. * trans.h : Change comment on GFC_SS_REFERENCE. 2010-06-27 Paul Thomas pa...@gcc.gnu.org PR fortran/43841 PR fortran/43843 * gfortran.dg/elemental_scalar_args_1.f90 : New test. Added: branches/gcc-4_5-branch/gcc/testsuite/gfortran.dg/elemental_scalar_args_1.f90 Modified: branches/gcc-4_5-branch/gcc/fortran/ChangeLog branches/gcc-4_5-branch/gcc/fortran/trans-array.c branches/gcc-4_5-branch/gcc/fortran/trans-expr.c branches/gcc-4_5-branch/gcc/fortran/trans.h branches/gcc-4_5-branch/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43841
[Bug fortran/44582] gfortran generates wrong results due to wrong ABI in function with array return
--- Comment #15 from pault at gcc dot gnu dot org 2010-06-27 16:17 --- Created an attachment (id=21017) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21017action=view) An improved patch for the PR Tobias, I think that this does it - if anything it is on the conservative side still but it does deal with comment #14 OK for trunk? Paul -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44582
[Bug fortran/43841] Missing temporary for ELEMENTAL function call
--- Comment #13 from pault at gcc dot gnu dot org 2010-06-27 16:22 --- Subject: Bug 43841 Author: pault Date: Sun Jun 27 16:22:27 2010 New Revision: 161472 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=161472 Log: 2010-06-27 Paul Thomas pa...@gcc.gnu.org PR fortran/43841 PR fortran/43843 * trans-expr.c (gfc_conv_expr): Supply an address expression for GFC_SS_REFERENCE. (gfc_conv_expr_reference): Call gfc_conv_expr and return for GFC_SS_REFERENCE. * trans-array.c (gfc_add_loop_ss_code): Store the value rather than the address of a GFC_SS_REFERENCE. * trans.h : Change comment on GFC_SS_REFERENCE. 2010-06-27 Paul Thomas pa...@gcc.gnu.org PR fortran/43841 PR fortran/43843 * gfortran.dg/elemental_scalar_args_1.f90 : New test. Added: branches/gcc-4_4-branch/gcc/testsuite/gfortran.dg/elemental_scalar_args_1.f90 Modified: branches/gcc-4_4-branch/gcc/fortran/ChangeLog branches/gcc-4_4-branch/gcc/fortran/trans-array.c branches/gcc-4_4-branch/gcc/fortran/trans-expr.c branches/gcc-4_4-branch/gcc/fortran/trans.h branches/gcc-4_4-branch/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43841
[Bug fortran/43843] Wrong-code due to missing temporary with user-defined operatator
--- Comment #5 from pault at gcc dot gnu dot org 2010-06-27 16:22 --- Subject: Bug 43843 Author: pault Date: Sun Jun 27 16:22:27 2010 New Revision: 161472 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=161472 Log: 2010-06-27 Paul Thomas pa...@gcc.gnu.org PR fortran/43841 PR fortran/43843 * trans-expr.c (gfc_conv_expr): Supply an address expression for GFC_SS_REFERENCE. (gfc_conv_expr_reference): Call gfc_conv_expr and return for GFC_SS_REFERENCE. * trans-array.c (gfc_add_loop_ss_code): Store the value rather than the address of a GFC_SS_REFERENCE. * trans.h : Change comment on GFC_SS_REFERENCE. 2010-06-27 Paul Thomas pa...@gcc.gnu.org PR fortran/43841 PR fortran/43843 * gfortran.dg/elemental_scalar_args_1.f90 : New test. Added: branches/gcc-4_4-branch/gcc/testsuite/gfortran.dg/elemental_scalar_args_1.f90 Modified: branches/gcc-4_4-branch/gcc/fortran/ChangeLog branches/gcc-4_4-branch/gcc/fortran/trans-array.c branches/gcc-4_4-branch/gcc/fortran/trans-expr.c branches/gcc-4_4-branch/gcc/fortran/trans.h branches/gcc-4_4-branch/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43843
[Bug fortran/43841] Missing temporary for ELEMENTAL function call
--- Comment #14 from pault at gcc dot gnu dot org 2010-06-27 16:24 --- Fixed and backported to 4.4 and 4.5 Thanks for the report 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=43841
[Bug fortran/44582] gfortran generates wrong results due to wrong ABI in function with array return
--- Comment #16 from pault at gcc dot gnu dot org 2010-06-27 16:33 --- (In reply to comment #15) OK for trunk? Sorry, forget this for a moment - its causes regressions. Paul -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44582
[Bug fortran/40158] Misleading error message for passing a scalar to an array
--- Comment #3 from pault at gcc dot gnu dot org 2010-06-24 15:31 --- (In reply to comment #2) Paul, any reason not to commit the patch in comment #1? No! I'll try to get to it on Sunday. Cheers Paul -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40158
[Bug fortran/43179] ICE invalid if accessing array member of non-array
--- Comment #5 from pault at gcc dot gnu dot org 2010-06-24 15:42 --- (In reply to comment #4) (In reply to comment #2) OK for trunk with the usual embellishments of ChangeLogs and testcase? Yes, if you have an example for EXPR_FUNCTION - otherwise I would claim that EXPR_VARIABLE is enough. Paul, any plans to wrap this up? :) Daniel, Another one for Sunday, or thereabouts. Paul -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43179
[Bug fortran/43841] Missing temporary for ELEMENTAL function call
--- Comment #11 from pault at gcc dot gnu dot org 2010-06-24 15:44 --- (In reply to comment #10) Any backport ? Ah yes, thanks, Mikael I have drawn up a list of PRs for which I have fixes but have not made commits. I'll try to get through them next week. Paul -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43841
[Bug fortran/44582] gfortran generates wrong results due to wrong ABI in function with array return
--- Comment #10 from pault at gcc dot gnu dot org 2010-06-20 17:45 --- Created an attachment (id=20948) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20948action=view) A patch for the PR I think this correctly takes account of last night's discussion on #gfortran. Bootstraps and regtests OK on FC9/x86_64. Note that I forgot to add a call to abort in myabort. Clearly, I will do that. The present version allowed me to confirm that trunk fails on all the pertinent tests. Paul -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44582
[Bug fortran/44582] gfortran generates wrong results due to wrong ABI in function with array return
--- Comment #7 from pault at gcc dot gnu dot org 2010-06-19 12:30 --- (In reply to comment #6) The program below should print twice 10 10 10 10 10 but due to the bug, it prints zeros for the first print and the tens only for the second print Yes, indeed. This goes back to gcc-4.3 at least. The check is done in trans-expr.c's gfc_trans_arrayfunc_assign - here an extra check (expr2-value.function.esym expr2-value.function.esym-attr.pure) seems to be needed. I wonder if it is sufficient to test if there are any host associated variables? I have my thinking cap on: (i) Is this standard violating? I guess so, since the result is aliasing the host associated symbol 'a'. (ii) Is this only an issue for host association? (iii) Is it sufficient to check if the lhs is host associated into the function call? Many thanks for flagging this up to us. It's really nice to know that the leader of the Absoft fortran team is helping us out :-) Cheers Paul Thomas -- pault at gcc dot gnu dot org changed: What|Removed |Added CC||pault at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44582
[Bug fortran/44582] gfortran generates wrong results due to wrong ABI in function with array return
--- Comment #8 from pault at gcc dot gnu dot org 2010-06-19 14:55 --- Created an attachment (id=20942) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20942action=view) Fix for PR, with testcase This is less restrictive than requiring pure functions but is still correct, I believe. Bootstraps and regtests on FC9/x86_64 - OK for 4.3 to 4.6? 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=44582
[Bug fortran/44582] gfortran generates wrong results due to wrong ABI in function with array return
--- Comment #9 from pault at gcc dot gnu dot org 2010-06-19 16:42 --- (In reply to comment #8) Created an attachment (id=20942) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20942action=view) [edit] Tobias correctly points out various cases that are still not correct. It looks to me as if his proposal of only allowing PURE is the correct way to go. correct == not so mind boggling as to render implementation impossible. Paul -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44582
[Bug middle-end/41753] [OOP] segfault with -O2 using methods as actual arguments
--- Comment #5 from pault at gcc dot gnu dot org 2010-06-06 12:49 --- (In reply to comment #4) It's fixed for me too. x86_64/FC9 I'll mark it as fixed - thanks for noting that it had gone. Paul -- pault at gcc dot gnu dot org changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41753
[Bug fortran/43895] [OOP] internal compiler error: verify_ssa failed
--- Comment #12 from pault at gcc dot gnu dot org 2010-06-05 10:40 --- (In reply to comment #11) OK, all this has a simple explanation. A revamped version of the original testcase segfaults in runtime, at -O0. ! { dg-do compile } ! Test the fix for PR43895, in which the dummy 'a' was not ! dereferenced for the deallocation of component 'a', as required ! for INTENT(OUT). ! ! Contributed by Salvatore Filippone sfilipp...@uniroma2.it ! module d_mat_mod type :: base_sparse_mat end type base_sparse_mat type, extends(base_sparse_mat) :: d_base_sparse_mat integer :: i end type d_base_sparse_mat type :: d_sparse_mat class(d_base_sparse_mat), allocatable :: a end type d_sparse_mat end module d_mat_mod use d_mat_mod type(d_sparse_mat) :: b allocate (b%a) b%a%i = 42 call bug14 (b) if (allocated (b%a)) call abort contains subroutine bug14(a) implicit none type(d_sparse_mat), intent(out) :: a end subroutine bug14 end ! { dg-final { cleanup-modules d_mat_mod } } The reason is quite clear from the code below: bug14 (struct d_sparse_mat restrict a) { if (a.a.$data != 0B) { __builtin_free ((void *) a.a.$data); } a.a.$data = 0B; } The dummy 'a' needs dereferencing, thus... bug14 (struct d_sparse_mat restrict a) { if (a-a.$data != 0B) { __builtin_free ((void *) a-a.$data); } a-a.$data = 0B; } This patch is regtesting right now: Index: /svn/trunk/gcc/fortran/trans-array.c === *** /svn/trunk/gcc/fortran/trans-array.c(revision 159851) --- /svn/trunk/gcc/fortran/trans-array.c(working copy) *** structure_alloc_comps (gfc_symbol * der_ *** 5951,5957 gfc_init_block (fnblock); ! if (POINTER_TYPE_P (TREE_TYPE (decl)) rank != 0) decl = build_fold_indirect_ref_loc (input_location, decl); --- 5951,5958 gfc_init_block (fnblock); ! if ((POINTER_TYPE_P (TREE_TYPE (decl)) rank != 0) ! || (TREE_CODE (TREE_TYPE (decl)) == REFERENCE_TYPE rank == 0)) decl = build_fold_indirect_ref_loc (input_location, decl); Cheers 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|NEW |ASSIGNED Last reconfirmed|2010-04-26 15:04:01 |2010-06-05 10:40:32 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43895
[Bug fortran/43895] [OOP] internal compiler error: verify_ssa failed
--- Comment #13 from pault at gcc dot gnu dot org 2010-06-05 14:08 --- (In reply to comment #12) This is tiresome - it regtested fine, I update the tree and now I get failures on: alloc_comp_result_1.f90 alloc_comp_scalar_1.f90 alloc_comp_transformational_1.f90 All three segfault at runtime. Happily, if I revert the above patch, they still segfault. Paul -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43895
[Bug fortran/43895] [OOP] internal compiler error: verify_ssa failed
--- Comment #14 from pault at gcc dot gnu dot org 2010-06-05 17:51 --- Subject: Bug 43895 Author: pault Date: Sat Jun 5 17:51:39 2010 New Revision: 160326 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=160326 Log: 2010-06-05 Paul Thomas pa...@gcc.gnu.org PR fortran/43895 * trans-array.c (structure_alloc_comps): Dereference scalar 'decl' if it is a REFERENCE_TYPE. Tidy expressions containing TREE_TYPE (decl). 2010-06-05 Paul Thomas pa...@gcc.gnu.org PR fortran/43895 * gfortran.dg/alloc_comp_class_1.f90 : New test. Added: trunk/gcc/testsuite/gfortran.dg/alloc_comp_class_1.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/trans-array.c trunk/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43895
[Bug fortran/44353] rejects legal fortran
--- Comment #2 from pault at gcc dot gnu dot org 2010-06-02 06:44 --- The fix regtests fine. I will take the PR and apply the fix on friday, when I return from a trip. 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|NEW |ASSIGNED Keywords||rejects-valid Last reconfirmed|2010-06-01 04:51:22 |2010-06-02 06:44:55 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44353
[Bug fortran/44354] incorrect output at run time
--- Comment #17 from pault at gcc dot gnu dot org 2010-06-01 04:31 --- (In reply to comment #13) Due to my confusion over the scope of 'i' and 'I', I posted to c.l.f. As usual Richard Maine pieced through the standard's language. http://groups.google.com/group/comp.lang.fortran/browse_frm/thread/1f88cd2dec855d73# As John Harper did on the above thread, I found: fortcom: Error: pr44354.f90, line 3: It is not permissible to reference the value of an ac-implied-do variable in one of its limit expressions print *,(/(i,i=1,I)/) -^ compilation aborted for pr44354.f90 (code 1) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44354
[Bug fortran/44353] rejects legal fortran
--- Comment #1 from pault at gcc dot gnu dot org 2010-06-01 04:51 --- Other compilers produce the expected result, whereas gfortran gives: pr44353.f90:4.19: data (ii(i),i=1,10) /10*1/ ! here the scope of i is the data statement 1 Error: Loop variable 'i' at (1) cannot be INTENT(IN) Removing the error at match.c:981 makes gfortran behave as the other compilers. In addition, I cannot find any such constraint in the standard. Execution of a data-implied-do is the same as a DO and so the scope of the loop variable is local to the data statement. Given all this, I would say confirmed. I will regtest the fix a bit later on. Paul -- pault at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last reconfirmed|-00-00 00:00:00 |2010-06-01 04:51:22 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44353
[Bug fortran/44348] ICE in build_function_decl
--- Comment #1 from pault at gcc dot gnu dot org 2010-06-01 05:02 --- This is rather easily fixed, I suspect: if (sym-attr.dummy sym-attr.if_source == IFSRC_DECL) { ...error... } in resolve.c should do the job. Just have to find the right place! Confirmed Paul -- pault at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Keywords||ice-on-invalid-code Last reconfirmed|-00-00 00:00:00 |2010-06-01 05:02:32 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44348
[Bug fortran/40011] Problems with -fwhole-file
--- Comment #55 from pault at gcc dot gnu dot org 2010-05-26 05:11 --- Subject: Bug 40011 Author: pault Date: Wed May 26 05:11:04 2010 New Revision: 159852 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=159852 Log: 2010-05-26 Paul Thomas pa...@gcc.gnu.org PR fortran/40011 * resolve.c (resolve_global_procedure): Resolve the gsymbol's namespace before trying to reorder the gsymbols. 2010-05-26 Paul Thomas pa...@gcc.gnu.org PR fortran/40011 * gfortran.dg/whole_file_19.f90 : New test. Added: trunk/gcc/testsuite/gfortran.dg/whole_file_19.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/resolve.c trunk/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40011
[Bug fortran/40873] -fwhole-file -fwhole-program: Wrong decls cause too much to be optimized away
--- Comment #12 from pault at gcc dot gnu dot org 2010-05-24 12:31 --- Created an attachment (id=20734) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20734action=view) Fix for this PR and PR40011 #42 This patch regtests OK apart from some peculiarities in proc_ptr_comp_9.f90 and proc_ptr_23.f90, which fail to link with -g. The problems do not appear to be associated with this patch, however. My belief is that with this patch and corrections of the legacy style testsuite cases, -fwhole-file could be finally made the default. 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|NEW |ASSIGNED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40873
[Bug fortran/40873] -fwhole-file -fwhole-program: Wrong decls cause too much to be optimized away
--- Comment #11 from pault at gcc dot gnu dot org 2010-05-20 13:51 --- (In reply to comment #10) Am I right in thinking that -fwhole-file could be enabled by default, if this PR were to be fixed? (The appropriate changes in the testsuite would have to be mad too.) Paul -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40873
[Bug fortran/43072] unneeded temporary (s=s+f(a))
--- Comment #9 from pault at gcc dot gnu dot org 2010-05-19 04:28 --- Fixed. Thanks, Joost! Paul -- pault at gcc dot gnu dot org changed: What|Removed |Added Status|WAITING |RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43072
[Bug fortran/43266] ICE on invalid: in ensure_not_abstract_walker, at fortran/resolve.c:10290
--- Comment #8 from pault at gcc dot gnu dot org 2010-05-19 04:32 --- Fixed. Thanks, Tobias. 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=43266
[Bug fortran/40598] Some missed optimizations in array assignment
--- Comment #11 from pault at gcc dot gnu dot org 2010-05-08 12:57 --- (In reply to comment #10) (In reply to comment #9) It even works! Paul, any news here? This looks very useful! See also PR41137. Daniel, I totally forgot about this one. I had a first tinker since comment #9 and it looks to be do-able. I'll put it on the list. Paul -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40598
[Bug fortran/37212] TRANSFER: Simplify array argument
--- Comment #4 from pault at gcc dot gnu dot org 2010-05-08 12:59 --- Thanks for noticing this Daniel. Closed - fixed Paul -- pault at gcc dot gnu dot org changed: What|Removed |Added Status|WAITING |RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37212
[Bug fortran/40875] ICE with illegal type conversion
--- Comment #7 from pault at gcc dot gnu dot org 2010-05-08 14:02 --- (In reply to comment #6) Paul, this PR seems to be fixed. Can it be closed? Yes. I said on the list that I would not backport, unless asked, and then waited :-) Thanks for jogging my memory. Pau; -- pault at gcc dot gnu dot org changed: What|Removed |Added Status|WAITING |RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40875
[Bug fortran/40591] Procedure(interface): Rejected if interface is indirectly hostassociated
--- Comment #10 from pault at gcc dot gnu dot org 2010-05-08 14:05 --- (In reply to comment #9) (In reply to comment #8) I guess everything is fixed now. Can we close this PR? Ping? Note that I did not apply the patch to 4.4 as I said that I would. What do you think? Cheers Paul -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40591
[Bug fortran/43945] [OOP] Derived type with GENERIC: resolved to the wrong specific TBP
--- Comment #8 from pault at gcc dot gnu dot org 2010-05-05 21:04 --- Created an attachment (id=20571) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20571action=view) Fix for the PR Boostraps and regtests on RHEL5.4/i686 Will add testcase and ChangeLogs tomorrow. Paul -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43945
[Bug fortran/43829] Scalarization of reductions
--- Comment #9 from pault at gcc dot gnu dot org 2010-05-05 05:07 --- (In reply to comment #8) Created an attachment (id=20558) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20558action=view) [edit] draft patch Mikael, I am pretty much out of the loop for the next two weeks because I am on trips for my day-time work. In order to rush this along, you might have to walk one of the others through your patch or to describe its core function here. As far as I can see from a quick look, most of the patch is consequent on the change to gfc_ss_info and that most of the meat comes at the end. I have not yet studied that in detail but it looks as if it is pretty easily explained. Anyway, welcome back! Paul -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43829
[Bug fortran/43945] [OOP] Derived type with GENERIC: resolved to the wrong specific TBP
--- Comment #7 from pault at gcc dot gnu dot org 2010-05-01 17:16 --- I do not see any reason not to confirm this one. This Index: gcc/fortran/resolve.c === *** gcc/fortran/resolve.c (revision 158958) --- gcc/fortran/resolve.c (working copy) *** resolve_typebound_generic_call (gfc_expr *** 5132,5137 --- 5132,5138 { gfc_typebound_proc* genproc; const char* genname; + gfc_symtree *st; gcc_assert (e-expr_type == EXPR_COMPCALL); genname = e-value.compcall.name; *** resolve_typebound_generic_call (gfc_expr *** 5199,5204 --- 5200,5214 return FAILURE; success: + genname = e-value.compcall.tbp-u.specific-name; + if (*genname == '@') + genname = e-value.compcall.tbp-u.specific-n.sym-name; + + st = gfc_find_typebound_proc (e-symtree-n.sym-ts.u.derived, NULL, + genname, false, e-where); + if (st) + e-value.compcall.tbp = st-n.tb; + return SUCCESS; } is a fix for the first testcase - the only regression is dynamic_dispatch_5.f03, which needs dealing with in the same way as the fix for its PR; ie. the derived type needs to be that of the final reference. I'll have something ready by the end of the weekend. 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 Ever Confirmed|0 |1 Last reconfirmed|-00-00 00:00:00 |2010-05-01 17:16:57 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43945
[Bug fortran/41829] [OOP] Runtime error with dynamic dispatching
--- Comment #7 from pault at gcc dot gnu dot org 2010-04-30 06:51 --- Fixed on trunk. Thanks for the help, Salvatore - I hope that it will continue. Paul and Janus -- pault at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41829
[Bug fortran/43945] [OOP] Derived type with GENERIC: resolved to the wrong specific TBP
--- Comment #6 from pault at gcc dot gnu dot org 2010-04-30 14:33 --- (In reply to comment #0) Another OOP problem found by Salvatore. Jim Xia confirms that NAG f95 gives the correct result, cf. http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/e18d0434c46598e2 The GENERIC is Fortran is designed as such that the invocation is resolved at compile time to a specific binding. In your case, af2%do() and af2%get() both are solved to call binding a2f%doit() and af2%getit(). These two calls are equivalent to af2%doit() and af2%getit(). And based on the dynamic type of af2, routines doit2() and getit2() are both called. This presumably applies to operators? I sincerely hope so because this will make life MUCH easier. Cheers Paul -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43945
[Bug fortran/42680] [fortran-dev, Regression] ICE in gimplify_expr, at gimplify.c:7176
--- Comment #13 from pault at gcc dot gnu dot org 2010-04-29 19:11 --- Subject: Bug 42680 Author: pault Date: Thu Apr 29 19:10:48 2010 New Revision: 158910 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=158910 Log: 2010-04-29 Janus Weil ja...@gcc.gnu.org PR fortran/43896 * symbol.c (add_proc_component,copy_vtab_proc_comps): Remove initializers for PPC members of the vtabs. 2010-04-29 Janus Weil ja...@gcc.gnu.org PR fortran/42274 * symbol.c (add_proc_component,add_proc_comps): Correctly set the 'ppc' attribute for all PPC members of the vtypes. (copy_vtab_proc_comps): Copy the correct interface. * trans.h (gfc_trans_assign_vtab_procs): Modified prototype. * trans-expr.c (gfc_trans_assign_vtab_procs): Pass the derived type as a dummy argument and make sure all PPC members of the vtab are initialized correctly. (gfc_conv_derived_to_class,gfc_trans_class_assign): Additional argument in call to gfc_trans_assign_vtab_procs. * trans-stmt.c (gfc_trans_allocate): Ditto. 2010-04-29 Paul Thomas pa...@gcc.gnu.org PR fortran/43326 * resolve.c (resolve_typebound_function): Renamed resolve_class_compcall.Do all the detection of class references here. (resolve_typebound_subroutine): resolve_class_typebound_call renamed. Otherwise same as resolve_typebound_function. (gfc_resolve_expr): Call resolve_typebound_function. (resolve_code): Call resolve_typebound_subroutine. 2010-04-29 Janus Weil ja...@gcc.gnu.org PR fortran/43492 * resolve.c (resolve_typebound_generic_call): For CLASS methods pass back the specific symtree name, rather than the target name. 2010-04-29 Paul Thomas pa...@gcc.gnu.org PR fortran/42353 * resolve.c (resolve_structure_cons): Make the initializer of the vtab component 'extends' the same type as the component. 2010-04-29 Jerry DeLisle jvdeli...@gcc.gnu.org PR fortran/42680 * interface.c (check_interface1): Pass symbol name rather than NULL to gfc_compare_interfaces.(gfc_compare_interfaces): Add assert to trap MULL. (gfc_compare_derived_types): Revert previous change incorporated incorrectly during merge from trunk, r155778. * resolve.c (check_generic_tbp_ambiguity): Pass symbol name rather than NULL to gfc_compare_interfaces. * symbol.c (add_generic_specifics): Likewise. 2010-02-29 Janus Weil ja...@gcc.gnu.org PR fortran/42353 * interface.c (gfc_compare_derived_types): Add condition for vtype. * symbol.c (gfc_find_derived_vtab): Sey access to private. (gfc_find_derived_vtab): Likewise. * module.c (ab_attribute): Add enumerator AB_VTAB. (mio_symbol_attribute): Use new attribute, AB_VTAB. (check_for_ambiguous): Likewise. 2010-04-29 Paul Thomas pa...@gcc.gnu.org Janus Weil ja...@gcc.gnu.org PR fortran/41829 * trans-expr.c (select_class_proc): Remove function. (conv_function_val): Delete reference to previous. (gfc_conv_derived_to_class): Add second argument to the call to gfc_find_derived_vtab. (gfc_conv_structure): Exclude proc_pointer components when accessing $data field of class objects. (gfc_trans_assign_vtab_procs): New function. (gfc_trans_class_assign): Add second argument to the call to gfc_find_derived_vtab. * symbol.c (gfc_build_class_symbol): Add delayed_vtab arg and implement holding off searching for the vptr derived type. (add_proc_component): New function. (add_proc_comps): New function. (add_procs_to_declared_vtab1): New function. (copy_vtab_proc_comps): New function. (add_procs_to_declared_vtab): New function. (void add_generic_specifics): New function. (add_generics_to_declared_vtab): New function. (gfc_find_derived_vtab): Add second argument to the call to gfc_find_derived_vtab. Add the calls to add_procs_to_declared_vtab and add_generics_to_declared_vtab. * decl.c (build_sym, build_struct): Use new arg in calls to gfc_build_class_symbol. * gfortran.h : Add vtype bitfield to symbol_attr. Remove the definition of struct gfc_class_esym_list. Modify prototypes of gfc_build_class_symbol and gfc_find_derived_vtab. * trans-stmt.c (gfc_trans_allocate): Add second argument to the call to gfc_find_derived_vtab. * module.c : Add the vtype attribute. * trans.h : Add prototype for gfc_trans_assign_vtab_procs. * resolve.c (resolve_typebound_generic_call): Add second arg to pass along the generic name for class methods. (resolve_typebound_call): The same. (resolve_compcall): Use the second arg to carry the generic
[Bug fortran/42274] [fortran-dev Regression] ICE: segmentation fault
--- Comment #38 from pault at gcc dot gnu dot org 2010-04-29 19:11 --- Subject: Bug 42274 Author: pault Date: Thu Apr 29 19:10:48 2010 New Revision: 158910 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=158910 Log: 2010-04-29 Janus Weil ja...@gcc.gnu.org PR fortran/43896 * symbol.c (add_proc_component,copy_vtab_proc_comps): Remove initializers for PPC members of the vtabs. 2010-04-29 Janus Weil ja...@gcc.gnu.org PR fortran/42274 * symbol.c (add_proc_component,add_proc_comps): Correctly set the 'ppc' attribute for all PPC members of the vtypes. (copy_vtab_proc_comps): Copy the correct interface. * trans.h (gfc_trans_assign_vtab_procs): Modified prototype. * trans-expr.c (gfc_trans_assign_vtab_procs): Pass the derived type as a dummy argument and make sure all PPC members of the vtab are initialized correctly. (gfc_conv_derived_to_class,gfc_trans_class_assign): Additional argument in call to gfc_trans_assign_vtab_procs. * trans-stmt.c (gfc_trans_allocate): Ditto. 2010-04-29 Paul Thomas pa...@gcc.gnu.org PR fortran/43326 * resolve.c (resolve_typebound_function): Renamed resolve_class_compcall.Do all the detection of class references here. (resolve_typebound_subroutine): resolve_class_typebound_call renamed. Otherwise same as resolve_typebound_function. (gfc_resolve_expr): Call resolve_typebound_function. (resolve_code): Call resolve_typebound_subroutine. 2010-04-29 Janus Weil ja...@gcc.gnu.org PR fortran/43492 * resolve.c (resolve_typebound_generic_call): For CLASS methods pass back the specific symtree name, rather than the target name. 2010-04-29 Paul Thomas pa...@gcc.gnu.org PR fortran/42353 * resolve.c (resolve_structure_cons): Make the initializer of the vtab component 'extends' the same type as the component. 2010-04-29 Jerry DeLisle jvdeli...@gcc.gnu.org PR fortran/42680 * interface.c (check_interface1): Pass symbol name rather than NULL to gfc_compare_interfaces.(gfc_compare_interfaces): Add assert to trap MULL. (gfc_compare_derived_types): Revert previous change incorporated incorrectly during merge from trunk, r155778. * resolve.c (check_generic_tbp_ambiguity): Pass symbol name rather than NULL to gfc_compare_interfaces. * symbol.c (add_generic_specifics): Likewise. 2010-02-29 Janus Weil ja...@gcc.gnu.org PR fortran/42353 * interface.c (gfc_compare_derived_types): Add condition for vtype. * symbol.c (gfc_find_derived_vtab): Sey access to private. (gfc_find_derived_vtab): Likewise. * module.c (ab_attribute): Add enumerator AB_VTAB. (mio_symbol_attribute): Use new attribute, AB_VTAB. (check_for_ambiguous): Likewise. 2010-04-29 Paul Thomas pa...@gcc.gnu.org Janus Weil ja...@gcc.gnu.org PR fortran/41829 * trans-expr.c (select_class_proc): Remove function. (conv_function_val): Delete reference to previous. (gfc_conv_derived_to_class): Add second argument to the call to gfc_find_derived_vtab. (gfc_conv_structure): Exclude proc_pointer components when accessing $data field of class objects. (gfc_trans_assign_vtab_procs): New function. (gfc_trans_class_assign): Add second argument to the call to gfc_find_derived_vtab. * symbol.c (gfc_build_class_symbol): Add delayed_vtab arg and implement holding off searching for the vptr derived type. (add_proc_component): New function. (add_proc_comps): New function. (add_procs_to_declared_vtab1): New function. (copy_vtab_proc_comps): New function. (add_procs_to_declared_vtab): New function. (void add_generic_specifics): New function. (add_generics_to_declared_vtab): New function. (gfc_find_derived_vtab): Add second argument to the call to gfc_find_derived_vtab. Add the calls to add_procs_to_declared_vtab and add_generics_to_declared_vtab. * decl.c (build_sym, build_struct): Use new arg in calls to gfc_build_class_symbol. * gfortran.h : Add vtype bitfield to symbol_attr. Remove the definition of struct gfc_class_esym_list. Modify prototypes of gfc_build_class_symbol and gfc_find_derived_vtab. * trans-stmt.c (gfc_trans_allocate): Add second argument to the call to gfc_find_derived_vtab. * module.c : Add the vtype attribute. * trans.h : Add prototype for gfc_trans_assign_vtab_procs. * resolve.c (resolve_typebound_generic_call): Add second arg to pass along the generic name for class methods. (resolve_typebound_call): The same. (resolve_compcall): Use the second arg to carry the generic
[Bug fortran/43492] [fortran-dev Regression] ICE in gfc_add_component_ref, at fortran/expr.c:352
--- Comment #8 from pault at gcc dot gnu dot org 2010-04-29 19:11 --- Subject: Bug 43492 Author: pault Date: Thu Apr 29 19:10:48 2010 New Revision: 158910 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=158910 Log: 2010-04-29 Janus Weil ja...@gcc.gnu.org PR fortran/43896 * symbol.c (add_proc_component,copy_vtab_proc_comps): Remove initializers for PPC members of the vtabs. 2010-04-29 Janus Weil ja...@gcc.gnu.org PR fortran/42274 * symbol.c (add_proc_component,add_proc_comps): Correctly set the 'ppc' attribute for all PPC members of the vtypes. (copy_vtab_proc_comps): Copy the correct interface. * trans.h (gfc_trans_assign_vtab_procs): Modified prototype. * trans-expr.c (gfc_trans_assign_vtab_procs): Pass the derived type as a dummy argument and make sure all PPC members of the vtab are initialized correctly. (gfc_conv_derived_to_class,gfc_trans_class_assign): Additional argument in call to gfc_trans_assign_vtab_procs. * trans-stmt.c (gfc_trans_allocate): Ditto. 2010-04-29 Paul Thomas pa...@gcc.gnu.org PR fortran/43326 * resolve.c (resolve_typebound_function): Renamed resolve_class_compcall.Do all the detection of class references here. (resolve_typebound_subroutine): resolve_class_typebound_call renamed. Otherwise same as resolve_typebound_function. (gfc_resolve_expr): Call resolve_typebound_function. (resolve_code): Call resolve_typebound_subroutine. 2010-04-29 Janus Weil ja...@gcc.gnu.org PR fortran/43492 * resolve.c (resolve_typebound_generic_call): For CLASS methods pass back the specific symtree name, rather than the target name. 2010-04-29 Paul Thomas pa...@gcc.gnu.org PR fortran/42353 * resolve.c (resolve_structure_cons): Make the initializer of the vtab component 'extends' the same type as the component. 2010-04-29 Jerry DeLisle jvdeli...@gcc.gnu.org PR fortran/42680 * interface.c (check_interface1): Pass symbol name rather than NULL to gfc_compare_interfaces.(gfc_compare_interfaces): Add assert to trap MULL. (gfc_compare_derived_types): Revert previous change incorporated incorrectly during merge from trunk, r155778. * resolve.c (check_generic_tbp_ambiguity): Pass symbol name rather than NULL to gfc_compare_interfaces. * symbol.c (add_generic_specifics): Likewise. 2010-02-29 Janus Weil ja...@gcc.gnu.org PR fortran/42353 * interface.c (gfc_compare_derived_types): Add condition for vtype. * symbol.c (gfc_find_derived_vtab): Sey access to private. (gfc_find_derived_vtab): Likewise. * module.c (ab_attribute): Add enumerator AB_VTAB. (mio_symbol_attribute): Use new attribute, AB_VTAB. (check_for_ambiguous): Likewise. 2010-04-29 Paul Thomas pa...@gcc.gnu.org Janus Weil ja...@gcc.gnu.org PR fortran/41829 * trans-expr.c (select_class_proc): Remove function. (conv_function_val): Delete reference to previous. (gfc_conv_derived_to_class): Add second argument to the call to gfc_find_derived_vtab. (gfc_conv_structure): Exclude proc_pointer components when accessing $data field of class objects. (gfc_trans_assign_vtab_procs): New function. (gfc_trans_class_assign): Add second argument to the call to gfc_find_derived_vtab. * symbol.c (gfc_build_class_symbol): Add delayed_vtab arg and implement holding off searching for the vptr derived type. (add_proc_component): New function. (add_proc_comps): New function. (add_procs_to_declared_vtab1): New function. (copy_vtab_proc_comps): New function. (add_procs_to_declared_vtab): New function. (void add_generic_specifics): New function. (add_generics_to_declared_vtab): New function. (gfc_find_derived_vtab): Add second argument to the call to gfc_find_derived_vtab. Add the calls to add_procs_to_declared_vtab and add_generics_to_declared_vtab. * decl.c (build_sym, build_struct): Use new arg in calls to gfc_build_class_symbol. * gfortran.h : Add vtype bitfield to symbol_attr. Remove the definition of struct gfc_class_esym_list. Modify prototypes of gfc_build_class_symbol and gfc_find_derived_vtab. * trans-stmt.c (gfc_trans_allocate): Add second argument to the call to gfc_find_derived_vtab. * module.c : Add the vtype attribute. * trans.h : Add prototype for gfc_trans_assign_vtab_procs. * resolve.c (resolve_typebound_generic_call): Add second arg to pass along the generic name for class methods. (resolve_typebound_call): The same. (resolve_compcall): Use the second arg to carry the generic
[Bug fortran/42353] [fortran-dev] Bogus Error: Name 'vtype$...' at (1) is an ambiguous reference ...
--- Comment #33 from pault at gcc dot gnu dot org 2010-04-29 19:11 --- Subject: Bug 42353 Author: pault Date: Thu Apr 29 19:10:48 2010 New Revision: 158910 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=158910 Log: 2010-04-29 Janus Weil ja...@gcc.gnu.org PR fortran/43896 * symbol.c (add_proc_component,copy_vtab_proc_comps): Remove initializers for PPC members of the vtabs. 2010-04-29 Janus Weil ja...@gcc.gnu.org PR fortran/42274 * symbol.c (add_proc_component,add_proc_comps): Correctly set the 'ppc' attribute for all PPC members of the vtypes. (copy_vtab_proc_comps): Copy the correct interface. * trans.h (gfc_trans_assign_vtab_procs): Modified prototype. * trans-expr.c (gfc_trans_assign_vtab_procs): Pass the derived type as a dummy argument and make sure all PPC members of the vtab are initialized correctly. (gfc_conv_derived_to_class,gfc_trans_class_assign): Additional argument in call to gfc_trans_assign_vtab_procs. * trans-stmt.c (gfc_trans_allocate): Ditto. 2010-04-29 Paul Thomas pa...@gcc.gnu.org PR fortran/43326 * resolve.c (resolve_typebound_function): Renamed resolve_class_compcall.Do all the detection of class references here. (resolve_typebound_subroutine): resolve_class_typebound_call renamed. Otherwise same as resolve_typebound_function. (gfc_resolve_expr): Call resolve_typebound_function. (resolve_code): Call resolve_typebound_subroutine. 2010-04-29 Janus Weil ja...@gcc.gnu.org PR fortran/43492 * resolve.c (resolve_typebound_generic_call): For CLASS methods pass back the specific symtree name, rather than the target name. 2010-04-29 Paul Thomas pa...@gcc.gnu.org PR fortran/42353 * resolve.c (resolve_structure_cons): Make the initializer of the vtab component 'extends' the same type as the component. 2010-04-29 Jerry DeLisle jvdeli...@gcc.gnu.org PR fortran/42680 * interface.c (check_interface1): Pass symbol name rather than NULL to gfc_compare_interfaces.(gfc_compare_interfaces): Add assert to trap MULL. (gfc_compare_derived_types): Revert previous change incorporated incorrectly during merge from trunk, r155778. * resolve.c (check_generic_tbp_ambiguity): Pass symbol name rather than NULL to gfc_compare_interfaces. * symbol.c (add_generic_specifics): Likewise. 2010-02-29 Janus Weil ja...@gcc.gnu.org PR fortran/42353 * interface.c (gfc_compare_derived_types): Add condition for vtype. * symbol.c (gfc_find_derived_vtab): Sey access to private. (gfc_find_derived_vtab): Likewise. * module.c (ab_attribute): Add enumerator AB_VTAB. (mio_symbol_attribute): Use new attribute, AB_VTAB. (check_for_ambiguous): Likewise. 2010-04-29 Paul Thomas pa...@gcc.gnu.org Janus Weil ja...@gcc.gnu.org PR fortran/41829 * trans-expr.c (select_class_proc): Remove function. (conv_function_val): Delete reference to previous. (gfc_conv_derived_to_class): Add second argument to the call to gfc_find_derived_vtab. (gfc_conv_structure): Exclude proc_pointer components when accessing $data field of class objects. (gfc_trans_assign_vtab_procs): New function. (gfc_trans_class_assign): Add second argument to the call to gfc_find_derived_vtab. * symbol.c (gfc_build_class_symbol): Add delayed_vtab arg and implement holding off searching for the vptr derived type. (add_proc_component): New function. (add_proc_comps): New function. (add_procs_to_declared_vtab1): New function. (copy_vtab_proc_comps): New function. (add_procs_to_declared_vtab): New function. (void add_generic_specifics): New function. (add_generics_to_declared_vtab): New function. (gfc_find_derived_vtab): Add second argument to the call to gfc_find_derived_vtab. Add the calls to add_procs_to_declared_vtab and add_generics_to_declared_vtab. * decl.c (build_sym, build_struct): Use new arg in calls to gfc_build_class_symbol. * gfortran.h : Add vtype bitfield to symbol_attr. Remove the definition of struct gfc_class_esym_list. Modify prototypes of gfc_build_class_symbol and gfc_find_derived_vtab. * trans-stmt.c (gfc_trans_allocate): Add second argument to the call to gfc_find_derived_vtab. * module.c : Add the vtype attribute. * trans.h : Add prototype for gfc_trans_assign_vtab_procs. * resolve.c (resolve_typebound_generic_call): Add second arg to pass along the generic name for class methods. (resolve_typebound_call): The same. (resolve_compcall): Use the second arg to carry the generic
[Bug fortran/41829] [OOP] Runtime error with dynamic dispatching
--- Comment #6 from pault at gcc dot gnu dot org 2010-04-29 19:11 --- Subject: Bug 41829 Author: pault Date: Thu Apr 29 19:10:48 2010 New Revision: 158910 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=158910 Log: 2010-04-29 Janus Weil ja...@gcc.gnu.org PR fortran/43896 * symbol.c (add_proc_component,copy_vtab_proc_comps): Remove initializers for PPC members of the vtabs. 2010-04-29 Janus Weil ja...@gcc.gnu.org PR fortran/42274 * symbol.c (add_proc_component,add_proc_comps): Correctly set the 'ppc' attribute for all PPC members of the vtypes. (copy_vtab_proc_comps): Copy the correct interface. * trans.h (gfc_trans_assign_vtab_procs): Modified prototype. * trans-expr.c (gfc_trans_assign_vtab_procs): Pass the derived type as a dummy argument and make sure all PPC members of the vtab are initialized correctly. (gfc_conv_derived_to_class,gfc_trans_class_assign): Additional argument in call to gfc_trans_assign_vtab_procs. * trans-stmt.c (gfc_trans_allocate): Ditto. 2010-04-29 Paul Thomas pa...@gcc.gnu.org PR fortran/43326 * resolve.c (resolve_typebound_function): Renamed resolve_class_compcall.Do all the detection of class references here. (resolve_typebound_subroutine): resolve_class_typebound_call renamed. Otherwise same as resolve_typebound_function. (gfc_resolve_expr): Call resolve_typebound_function. (resolve_code): Call resolve_typebound_subroutine. 2010-04-29 Janus Weil ja...@gcc.gnu.org PR fortran/43492 * resolve.c (resolve_typebound_generic_call): For CLASS methods pass back the specific symtree name, rather than the target name. 2010-04-29 Paul Thomas pa...@gcc.gnu.org PR fortran/42353 * resolve.c (resolve_structure_cons): Make the initializer of the vtab component 'extends' the same type as the component. 2010-04-29 Jerry DeLisle jvdeli...@gcc.gnu.org PR fortran/42680 * interface.c (check_interface1): Pass symbol name rather than NULL to gfc_compare_interfaces.(gfc_compare_interfaces): Add assert to trap MULL. (gfc_compare_derived_types): Revert previous change incorporated incorrectly during merge from trunk, r155778. * resolve.c (check_generic_tbp_ambiguity): Pass symbol name rather than NULL to gfc_compare_interfaces. * symbol.c (add_generic_specifics): Likewise. 2010-02-29 Janus Weil ja...@gcc.gnu.org PR fortran/42353 * interface.c (gfc_compare_derived_types): Add condition for vtype. * symbol.c (gfc_find_derived_vtab): Sey access to private. (gfc_find_derived_vtab): Likewise. * module.c (ab_attribute): Add enumerator AB_VTAB. (mio_symbol_attribute): Use new attribute, AB_VTAB. (check_for_ambiguous): Likewise. 2010-04-29 Paul Thomas pa...@gcc.gnu.org Janus Weil ja...@gcc.gnu.org PR fortran/41829 * trans-expr.c (select_class_proc): Remove function. (conv_function_val): Delete reference to previous. (gfc_conv_derived_to_class): Add second argument to the call to gfc_find_derived_vtab. (gfc_conv_structure): Exclude proc_pointer components when accessing $data field of class objects. (gfc_trans_assign_vtab_procs): New function. (gfc_trans_class_assign): Add second argument to the call to gfc_find_derived_vtab. * symbol.c (gfc_build_class_symbol): Add delayed_vtab arg and implement holding off searching for the vptr derived type. (add_proc_component): New function. (add_proc_comps): New function. (add_procs_to_declared_vtab1): New function. (copy_vtab_proc_comps): New function. (add_procs_to_declared_vtab): New function. (void add_generic_specifics): New function. (add_generics_to_declared_vtab): New function. (gfc_find_derived_vtab): Add second argument to the call to gfc_find_derived_vtab. Add the calls to add_procs_to_declared_vtab and add_generics_to_declared_vtab. * decl.c (build_sym, build_struct): Use new arg in calls to gfc_build_class_symbol. * gfortran.h : Add vtype bitfield to symbol_attr. Remove the definition of struct gfc_class_esym_list. Modify prototypes of gfc_build_class_symbol and gfc_find_derived_vtab. * trans-stmt.c (gfc_trans_allocate): Add second argument to the call to gfc_find_derived_vtab. * module.c : Add the vtype attribute. * trans.h : Add prototype for gfc_trans_assign_vtab_procs. * resolve.c (resolve_typebound_generic_call): Add second arg to pass along the generic name for class methods. (resolve_typebound_call): The same. (resolve_compcall): Use the second arg to carry the generic
[Bug fortran/43896] [OOP] ICE in gfc_conv_variable, at fortran/trans-expr.c:551
--- Comment #16 from pault at gcc dot gnu dot org 2010-04-29 19:11 --- Subject: Bug 43896 Author: pault Date: Thu Apr 29 19:10:48 2010 New Revision: 158910 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=158910 Log: 2010-04-29 Janus Weil ja...@gcc.gnu.org PR fortran/43896 * symbol.c (add_proc_component,copy_vtab_proc_comps): Remove initializers for PPC members of the vtabs. 2010-04-29 Janus Weil ja...@gcc.gnu.org PR fortran/42274 * symbol.c (add_proc_component,add_proc_comps): Correctly set the 'ppc' attribute for all PPC members of the vtypes. (copy_vtab_proc_comps): Copy the correct interface. * trans.h (gfc_trans_assign_vtab_procs): Modified prototype. * trans-expr.c (gfc_trans_assign_vtab_procs): Pass the derived type as a dummy argument and make sure all PPC members of the vtab are initialized correctly. (gfc_conv_derived_to_class,gfc_trans_class_assign): Additional argument in call to gfc_trans_assign_vtab_procs. * trans-stmt.c (gfc_trans_allocate): Ditto. 2010-04-29 Paul Thomas pa...@gcc.gnu.org PR fortran/43326 * resolve.c (resolve_typebound_function): Renamed resolve_class_compcall.Do all the detection of class references here. (resolve_typebound_subroutine): resolve_class_typebound_call renamed. Otherwise same as resolve_typebound_function. (gfc_resolve_expr): Call resolve_typebound_function. (resolve_code): Call resolve_typebound_subroutine. 2010-04-29 Janus Weil ja...@gcc.gnu.org PR fortran/43492 * resolve.c (resolve_typebound_generic_call): For CLASS methods pass back the specific symtree name, rather than the target name. 2010-04-29 Paul Thomas pa...@gcc.gnu.org PR fortran/42353 * resolve.c (resolve_structure_cons): Make the initializer of the vtab component 'extends' the same type as the component. 2010-04-29 Jerry DeLisle jvdeli...@gcc.gnu.org PR fortran/42680 * interface.c (check_interface1): Pass symbol name rather than NULL to gfc_compare_interfaces.(gfc_compare_interfaces): Add assert to trap MULL. (gfc_compare_derived_types): Revert previous change incorporated incorrectly during merge from trunk, r155778. * resolve.c (check_generic_tbp_ambiguity): Pass symbol name rather than NULL to gfc_compare_interfaces. * symbol.c (add_generic_specifics): Likewise. 2010-02-29 Janus Weil ja...@gcc.gnu.org PR fortran/42353 * interface.c (gfc_compare_derived_types): Add condition for vtype. * symbol.c (gfc_find_derived_vtab): Sey access to private. (gfc_find_derived_vtab): Likewise. * module.c (ab_attribute): Add enumerator AB_VTAB. (mio_symbol_attribute): Use new attribute, AB_VTAB. (check_for_ambiguous): Likewise. 2010-04-29 Paul Thomas pa...@gcc.gnu.org Janus Weil ja...@gcc.gnu.org PR fortran/41829 * trans-expr.c (select_class_proc): Remove function. (conv_function_val): Delete reference to previous. (gfc_conv_derived_to_class): Add second argument to the call to gfc_find_derived_vtab. (gfc_conv_structure): Exclude proc_pointer components when accessing $data field of class objects. (gfc_trans_assign_vtab_procs): New function. (gfc_trans_class_assign): Add second argument to the call to gfc_find_derived_vtab. * symbol.c (gfc_build_class_symbol): Add delayed_vtab arg and implement holding off searching for the vptr derived type. (add_proc_component): New function. (add_proc_comps): New function. (add_procs_to_declared_vtab1): New function. (copy_vtab_proc_comps): New function. (add_procs_to_declared_vtab): New function. (void add_generic_specifics): New function. (add_generics_to_declared_vtab): New function. (gfc_find_derived_vtab): Add second argument to the call to gfc_find_derived_vtab. Add the calls to add_procs_to_declared_vtab and add_generics_to_declared_vtab. * decl.c (build_sym, build_struct): Use new arg in calls to gfc_build_class_symbol. * gfortran.h : Add vtype bitfield to symbol_attr. Remove the definition of struct gfc_class_esym_list. Modify prototypes of gfc_build_class_symbol and gfc_find_derived_vtab. * trans-stmt.c (gfc_trans_allocate): Add second argument to the call to gfc_find_derived_vtab. * module.c : Add the vtype attribute. * trans.h : Add prototype for gfc_trans_assign_vtab_procs. * resolve.c (resolve_typebound_generic_call): Add second arg to pass along the generic name for class methods. (resolve_typebound_call): The same. (resolve_compcall): Use the second arg to carry the generic
[Bug fortran/43326] [fortran-dev Regression] dynamic dispatch with CLASS components
--- Comment #13 from pault at gcc dot gnu dot org 2010-04-29 19:11 --- Subject: Bug 43326 Author: pault Date: Thu Apr 29 19:10:48 2010 New Revision: 158910 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=158910 Log: 2010-04-29 Janus Weil ja...@gcc.gnu.org PR fortran/43896 * symbol.c (add_proc_component,copy_vtab_proc_comps): Remove initializers for PPC members of the vtabs. 2010-04-29 Janus Weil ja...@gcc.gnu.org PR fortran/42274 * symbol.c (add_proc_component,add_proc_comps): Correctly set the 'ppc' attribute for all PPC members of the vtypes. (copy_vtab_proc_comps): Copy the correct interface. * trans.h (gfc_trans_assign_vtab_procs): Modified prototype. * trans-expr.c (gfc_trans_assign_vtab_procs): Pass the derived type as a dummy argument and make sure all PPC members of the vtab are initialized correctly. (gfc_conv_derived_to_class,gfc_trans_class_assign): Additional argument in call to gfc_trans_assign_vtab_procs. * trans-stmt.c (gfc_trans_allocate): Ditto. 2010-04-29 Paul Thomas pa...@gcc.gnu.org PR fortran/43326 * resolve.c (resolve_typebound_function): Renamed resolve_class_compcall.Do all the detection of class references here. (resolve_typebound_subroutine): resolve_class_typebound_call renamed. Otherwise same as resolve_typebound_function. (gfc_resolve_expr): Call resolve_typebound_function. (resolve_code): Call resolve_typebound_subroutine. 2010-04-29 Janus Weil ja...@gcc.gnu.org PR fortran/43492 * resolve.c (resolve_typebound_generic_call): For CLASS methods pass back the specific symtree name, rather than the target name. 2010-04-29 Paul Thomas pa...@gcc.gnu.org PR fortran/42353 * resolve.c (resolve_structure_cons): Make the initializer of the vtab component 'extends' the same type as the component. 2010-04-29 Jerry DeLisle jvdeli...@gcc.gnu.org PR fortran/42680 * interface.c (check_interface1): Pass symbol name rather than NULL to gfc_compare_interfaces.(gfc_compare_interfaces): Add assert to trap MULL. (gfc_compare_derived_types): Revert previous change incorporated incorrectly during merge from trunk, r155778. * resolve.c (check_generic_tbp_ambiguity): Pass symbol name rather than NULL to gfc_compare_interfaces. * symbol.c (add_generic_specifics): Likewise. 2010-02-29 Janus Weil ja...@gcc.gnu.org PR fortran/42353 * interface.c (gfc_compare_derived_types): Add condition for vtype. * symbol.c (gfc_find_derived_vtab): Sey access to private. (gfc_find_derived_vtab): Likewise. * module.c (ab_attribute): Add enumerator AB_VTAB. (mio_symbol_attribute): Use new attribute, AB_VTAB. (check_for_ambiguous): Likewise. 2010-04-29 Paul Thomas pa...@gcc.gnu.org Janus Weil ja...@gcc.gnu.org PR fortran/41829 * trans-expr.c (select_class_proc): Remove function. (conv_function_val): Delete reference to previous. (gfc_conv_derived_to_class): Add second argument to the call to gfc_find_derived_vtab. (gfc_conv_structure): Exclude proc_pointer components when accessing $data field of class objects. (gfc_trans_assign_vtab_procs): New function. (gfc_trans_class_assign): Add second argument to the call to gfc_find_derived_vtab. * symbol.c (gfc_build_class_symbol): Add delayed_vtab arg and implement holding off searching for the vptr derived type. (add_proc_component): New function. (add_proc_comps): New function. (add_procs_to_declared_vtab1): New function. (copy_vtab_proc_comps): New function. (add_procs_to_declared_vtab): New function. (void add_generic_specifics): New function. (add_generics_to_declared_vtab): New function. (gfc_find_derived_vtab): Add second argument to the call to gfc_find_derived_vtab. Add the calls to add_procs_to_declared_vtab and add_generics_to_declared_vtab. * decl.c (build_sym, build_struct): Use new arg in calls to gfc_build_class_symbol. * gfortran.h : Add vtype bitfield to symbol_attr. Remove the definition of struct gfc_class_esym_list. Modify prototypes of gfc_build_class_symbol and gfc_find_derived_vtab. * trans-stmt.c (gfc_trans_allocate): Add second argument to the call to gfc_find_derived_vtab. * module.c : Add the vtype attribute. * trans.h : Add prototype for gfc_trans_assign_vtab_procs. * resolve.c (resolve_typebound_generic_call): Add second arg to pass along the generic name for class methods. (resolve_typebound_call): The same. (resolve_compcall): Use the second arg to carry the generic
[Bug fortran/42274] [fortran-dev Regression] ICE: segmentation fault
--- Comment #37 from pault at gcc dot gnu dot org 2010-04-26 10:57 --- I think that we can mark this as closed. Thanks, first to Salvatore for the report and second to Janus for the fix. Salvatore, to repeat Janus's request, could you please check that there are no further regressions, relative to trunk? I am aiming to synchronise the two trees later on this week. Thanks again for all the efforts 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=42274
[Bug fortran/42274] [fortran-dev Regression] ICE: segmentation fault
--- Comment #20 from pault at gcc dot gnu dot org 2010-04-25 16:27 --- (In reply to comment #19) Janus, When I got up this morning, I made a start on documenting the fortran-dev version of gfc_find_derived_vtab with a view to understand the code flow and to understand why the original patch was failing. My suspicion, which is strengthened by the remaining regressions for version 3 of your fix, is that the generic components of the vtab should not be marked as ppc. I have been tempted to apply it blind but have been trying to analyse first :-) That does not mean that you should not give it a shot, though! Cheers Paul -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42274
[Bug fortran/43841] Missing temporary for ELEMENTAL function call
--- Comment #8 from pault at gcc dot gnu dot org 2010-04-24 07:44 --- (In reply to comment #7) I posted a fix this morning. ...which gives, { struct polar_t D.1625; D.1625 = b[0]; { integer(kind=8) S.18; S.18 = 1; while (1) { if (S.18 3) goto L.15; b[S.18 + -1] = div_pp (b[S.18 + -1], D.1625); S.18 = S.18 + 1; } L.15:; } } -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43841
[Bug fortran/43843] Wrong-code due to missing temporary with user-defined operatator
--- Comment #3 from pault at gcc dot gnu dot org 2010-04-24 09:28 --- Subject: Bug 43843 Author: pault Date: Sat Apr 24 09:28:32 2010 New Revision: 158683 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=158683 Log: 2010-04-24 Paul Thomas pa...@gcc.gnu.org PR fortran/43841 PR fortran/43843 * trans-expr.c (gfc_conv_expr): Supply an address expression for GFC_SS_REFERENCE. (gfc_conv_expr_reference): Call gfc_conv_expr and return for GFC_SS_REFERENCE. * trans-array.c (gfc_add_loop_ss_code): Store the value rather than the address of a GFC_SS_REFERENCE. * trans.h : Change comment on GFC_SS_REFERENCE. 2010-04-24 Paul Thomas pa...@gcc.gnu.org PR fortran/43841 PR fortran/43843 * gfortran.dg/elemental_scalar_args_1.f90 : New test. Added: trunk/gcc/testsuite/gfortran.dg/elemental_scalar_args_1.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/trans-array.c trunk/gcc/fortran/trans-expr.c trunk/gcc/fortran/trans.h trunk/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43843
[Bug fortran/43841] Missing temporary for ELEMENTAL function call
--- Comment #9 from pault at gcc dot gnu dot org 2010-04-24 09:28 --- Subject: Bug 43841 Author: pault Date: Sat Apr 24 09:28:32 2010 New Revision: 158683 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=158683 Log: 2010-04-24 Paul Thomas pa...@gcc.gnu.org PR fortran/43841 PR fortran/43843 * trans-expr.c (gfc_conv_expr): Supply an address expression for GFC_SS_REFERENCE. (gfc_conv_expr_reference): Call gfc_conv_expr and return for GFC_SS_REFERENCE. * trans-array.c (gfc_add_loop_ss_code): Store the value rather than the address of a GFC_SS_REFERENCE. * trans.h : Change comment on GFC_SS_REFERENCE. 2010-04-24 Paul Thomas pa...@gcc.gnu.org PR fortran/43841 PR fortran/43843 * gfortran.dg/elemental_scalar_args_1.f90 : New test. Added: trunk/gcc/testsuite/gfortran.dg/elemental_scalar_args_1.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/trans-array.c trunk/gcc/fortran/trans-expr.c trunk/gcc/fortran/trans.h trunk/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43841
[Bug fortran/43227] [4.5 Regression] ICE: segmentation fault in mio_expr
--- Comment #28 from pault at gcc dot gnu dot org 2010-04-24 12:29 --- Subject: Bug 43227 Author: pault Date: Sat Apr 24 12:29:23 2010 New Revision: 158687 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=158687 Log: 2010-04-24 Paul Thomas pa...@gcc.gnu.org PR fortran/43227 * resolve.c (resolve_fl_derived): If a component character length has not been resolved, do so now. (resolve_symbol): The same as above for a symbol character length. * trans-decl.c (gfc_create_module_variable): A 'length' decl is not needed for a character valued, procedure pointer. PR fortran/43266 * resolve.c (ensure_not_abstract_walker): If 'overriding' is not found, return FAILURE rather than ICEing. 2010-04-24 Paul Thomas pa...@gcc.gnu.org PR fortran/43227 * gfortran.dg/proc_decl_23.f90: New test. PR fortran/43266 * gfortran.dg/abstract_type_6.f03: New test. Added: branches/gcc-4_5-branch/gcc/testsuite/gfortran.dg/abstract_type_6.f03 branches/gcc-4_5-branch/gcc/testsuite/gfortran.dg/proc_decl_23.f90 Modified: branches/gcc-4_5-branch/gcc/fortran/ChangeLog branches/gcc-4_5-branch/gcc/fortran/resolve.c branches/gcc-4_5-branch/gcc/fortran/trans-decl.c branches/gcc-4_5-branch/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43227
[Bug fortran/43266] ICE on invalid: in ensure_not_abstract_walker, at fortran/resolve.c:10290
--- Comment #6 from pault at gcc dot gnu dot org 2010-04-24 12:29 --- Subject: Bug 43266 Author: pault Date: Sat Apr 24 12:29:23 2010 New Revision: 158687 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=158687 Log: 2010-04-24 Paul Thomas pa...@gcc.gnu.org PR fortran/43227 * resolve.c (resolve_fl_derived): If a component character length has not been resolved, do so now. (resolve_symbol): The same as above for a symbol character length. * trans-decl.c (gfc_create_module_variable): A 'length' decl is not needed for a character valued, procedure pointer. PR fortran/43266 * resolve.c (ensure_not_abstract_walker): If 'overriding' is not found, return FAILURE rather than ICEing. 2010-04-24 Paul Thomas pa...@gcc.gnu.org PR fortran/43227 * gfortran.dg/proc_decl_23.f90: New test. PR fortran/43266 * gfortran.dg/abstract_type_6.f03: New test. Added: branches/gcc-4_5-branch/gcc/testsuite/gfortran.dg/abstract_type_6.f03 branches/gcc-4_5-branch/gcc/testsuite/gfortran.dg/proc_decl_23.f90 Modified: branches/gcc-4_5-branch/gcc/fortran/ChangeLog branches/gcc-4_5-branch/gcc/fortran/resolve.c branches/gcc-4_5-branch/gcc/fortran/trans-decl.c branches/gcc-4_5-branch/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43266
[Bug fortran/43227] [4.5 Regression] ICE: segmentation fault in mio_expr
--- Comment #29 from pault at gcc dot gnu dot org 2010-04-24 12:30 --- Fixed on trunk and 4.5. Thanks, as ever, Dominique! 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=43227
[Bug fortran/43841] Missing temporary for ELEMENTAL function call
--- Comment #7 from pault at gcc dot gnu dot org 2010-04-23 08:12 --- I posted a fix this morning. 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|NEW |ASSIGNED Keywords||wrong-code Last reconfirmed|2010-04-22 08:28:12 |2010-04-23 08:12:46 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43841
[Bug fortran/43841] Missing temporary for ELEMENTAL function call
--- Comment #6 from pault at gcc dot gnu dot org 2010-04-22 20:01 --- (In reply to comment #5) struct polar_t * D.1551; D.1551 = b[0]; S.5 = 1; while (1) { if (S.5 3) goto L.3; b[S.5 + -1] = div_pp (b[S.5 + -1], D.1551); S.5 = S.5 + 1; } L.3:; The temporary is being generated but it needs dereferencing !!! ie. It would be nice if: struct polar_t D.1551; D.1551 = b[0]; S.5 = 1; while (1) { if (S.5 3) goto L.3; b[S.5 + -1] = div_pp (b[S.5 + -1], D.1551); S.5 = S.5 + 1; } L.3:; were happening. Paul I'm looking at it. Paul -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43841
[Bug fortran/43326] [fortran-dev Regression] dynamic dispatch with CLASS components
--- Comment #9 from pault at gcc dot gnu dot org 2010-04-21 14:29 --- Created an attachment (id=20453) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20453action=view) Version of fix for fortran-dev This hasn been fully bootstrapped but runs gfortran.dg/dynamic*, proc* and class* OK. Since this is a cut down version of the trunk fix, I will apply the patch as obvious, after bootstrapping and regtesting. Paul -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43326
[Bug fortran/43326] [fortran-dev Regression] dynamic dispatch with CLASS components
--- Comment #10 from pault at gcc dot gnu dot org 2010-04-21 16:50 --- Subject: Bug 43326 Author: pault Date: Wed Apr 21 16:49:28 2010 New Revision: 158613 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=158613 Log: 2010-04-21 Paul Thomas pa...@gcc.gnu.org PR fortran/43326 * resolve.c (resolve_typebound_function): Renamed resolve_class_compcall.Do all the detection of class references here. (resolve_typebound_subroutine): resolve_class_typebound_call renamed. Otherwise same as resolve_typebound_function. (gfc_resolve_expr): Call resolve_typebound_function. (resolve_code): Call resolve_typebound_subroutine. 2010-04-21 Paul Thomas pa...@gcc.gnu.org PR fortran/43326 * gfortran.dg/dynamic_dispatch_9.f03: New test. Added: branches/fortran-dev/gcc/testsuite/gfortran.dg/dynamic_dispatch_9.f03 Modified: branches/fortran-dev/gcc/fortran/ChangeLog.fortran-dev branches/fortran-dev/gcc/fortran/resolve.c branches/fortran-dev/gcc/testsuite/ChangeLog.fortran-dev -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43326
[Bug fortran/43326] [fortran-dev Regression] dynamic dispatch with CLASS components
--- Comment #11 from pault at gcc dot gnu dot org 2010-04-21 16:51 --- Fixed on fortran-dev. Thanks, as usual, for the report, Janus, and thanks for the reminder, Dominique :-) 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=43326
[Bug fortran/43227] [4.5/4.6 Regression] ICE: segmentation fault in mio_expr
--- Comment #23 from pault at gcc dot gnu dot org 2010-04-20 06:19 --- Created an attachment (id=20433) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20433action=view) fix for this PR and PR43266 The attached is what I intend to submit tonight, unless somebody approves it in the mean time. Obviously, the patch needs ChangeLogs. Also included is the fix for PR43266, which was first posted on March 27 and is very 'obvious'. Bootstrapped and regtested on FC9/x86_64 and RHEL5.4/i686 OK? -- pault at gcc dot gnu dot org changed: What|Removed |Added Attachment #20429|0 |1 is obsolete|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43227
[Bug fortran/43326] [fortran-dev Regression] dynamic dispatch with CLASS components
--- Comment #6 from pault at gcc dot gnu dot org 2010-04-20 18:57 --- (In reply to comment #5) (In reply to comment #4) Technically this PR, fixed on trunk but not on fortran-dev, is now a [fortran-dev Regression]. Could it be marked that way? Yes. Janus and Dominique, Thanks for the heads up on this - I had completely forgotten this PR. Cheers Paul -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43326
[Bug fortran/43266] ICE on invalid: in ensure_not_abstract_walker, at fortran/resolve.c:10290
--- Comment #5 from pault at gcc dot gnu dot org 2010-04-20 19:07 --- Subject: Bug 43266 Author: pault Date: Tue Apr 20 19:07:14 2010 New Revision: 158570 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=158570 Log: 2010-04-20 Paul Thomas pa...@gcc.gnu.org PR fortran/43227 * resolve.c (resolve_fl_derived): If a component character length has not been resolved, do so now. (resolve_symbol): The same as above for a symbol character length. * trans-decl.c (gfc_create_module_variable): A 'length' decl is not needed for a character valued, procedure pointer. PR fortran/43266 * resolve.c (ensure_not_abstract_walker): If 'overriding' is not found, return FAILURE rather than ICEing. 2010-04-20 Paul Thomas pa...@gcc.gnu.org PR fortran/43227 * gfortran.dg/proc_decl_23.f90: New test. PR fortran/43266 * gfortran.dg/abstract_type_6.f03: New test. Added: trunk/gcc/testsuite/gfortran.dg/abstract_type_6.f03 trunk/gcc/testsuite/gfortran.dg/proc_decl_23.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/resolve.c trunk/gcc/fortran/trans-decl.c trunk/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43266
[Bug fortran/43227] [4.5/4.6 Regression] ICE: segmentation fault in mio_expr
--- Comment #26 from pault at gcc dot gnu dot org 2010-04-20 19:07 --- Subject: Bug 43227 Author: pault Date: Tue Apr 20 19:07:14 2010 New Revision: 158570 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=158570 Log: 2010-04-20 Paul Thomas pa...@gcc.gnu.org PR fortran/43227 * resolve.c (resolve_fl_derived): If a component character length has not been resolved, do so now. (resolve_symbol): The same as above for a symbol character length. * trans-decl.c (gfc_create_module_variable): A 'length' decl is not needed for a character valued, procedure pointer. PR fortran/43266 * resolve.c (ensure_not_abstract_walker): If 'overriding' is not found, return FAILURE rather than ICEing. 2010-04-20 Paul Thomas pa...@gcc.gnu.org PR fortran/43227 * gfortran.dg/proc_decl_23.f90: New test. PR fortran/43266 * gfortran.dg/abstract_type_6.f03: New test. Added: trunk/gcc/testsuite/gfortran.dg/abstract_type_6.f03 trunk/gcc/testsuite/gfortran.dg/proc_decl_23.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/resolve.c trunk/gcc/fortran/trans-decl.c trunk/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43227
[Bug fortran/43227] [4.5 Regression] ICE: segmentation fault in mio_expr
--- Comment #27 from pault at gcc dot gnu dot org 2010-04-21 04:27 --- Fixed on trunk - will do 4.5 next week. Paul -- pault at gcc dot gnu dot org changed: What|Removed |Added Summary|[4.5/4.6 Regression] ICE: |[4.5 Regression] ICE: |segmentation fault in |segmentation fault in |mio_expr|mio_expr http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43227
[Bug fortran/43326] [fortran-dev Regression] dynamic dispatch with CLASS components
--- Comment #8 from pault at gcc dot gnu dot org 2010-04-21 04:53 --- I'll do this one next - assigning to self. 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 Ever Confirmed|0 |1 Last reconfirmed|-00-00 00:00:00 |2010-04-21 04:53:17 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43326
[Bug fortran/43492] [fortran-dev Regression] ICE in gfc_add_component_ref, at fortran/expr.c:352
--- Comment #6 from pault at gcc dot gnu dot org 2010-04-21 05:35 --- Subject: Bug 43492 Author: pault Date: Wed Apr 21 05:35:04 2010 New Revision: 158585 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=158585 Log: 2010-04-21 Janus Weil ja...@gcc.gnu.org PR fortran/43492 * resolve.c (resolve_typebound_generic_call): For CLASS methods pass back the specific symtree name, rather than the target name. 2010-04-21 Janus Weil ja...@gcc.gnu.org PR fortran/43492 * gfortran.dg/generic_22.f03 : New test. Added: branches/fortran-dev/gcc/testsuite/gfortran.dg/generic_22.f03 Modified: branches/fortran-dev/gcc/fortran/ChangeLog.fortran-dev branches/fortran-dev/gcc/fortran/resolve.c branches/fortran-dev/gcc/testsuite/ChangeLog.fortran-dev -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43492
[Bug fortran/43492] [fortran-dev Regression] ICE in gfc_add_component_ref, at fortran/expr.c:352
--- Comment #7 from pault at gcc dot gnu dot org 2010-04-21 05:37 --- Not only does it regtest but I had a few minutes to commit it in your name, as obvious! Thanks for the fix, Janus, and thanks for the report, Salvatore. 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=43492
[Bug fortran/43227] [4.5/4.6 Regression] ICE: segmentation fault in mio_expr
--- Comment #9 from pault at gcc dot gnu dot org 2010-04-19 12:12 --- I decided to take a look at this during lunchtime today. The source that I had to hand is the 20091203 4.5.0 snapshot. To my astonishment, this does not show the problem. I have had a quick look at the intervening gcc-cvs postings but cannot identify the source of the regression yet. Janus's patch of 20091211 is NOT the cause. Paul -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43227
[Bug fortran/43227] [4.5/4.6 Regression] ICE: segmentation fault in mio_expr
--- Comment #18 from pault at gcc dot gnu dot org 2010-04-19 18:48 --- (In reply to comment #16) I sort of doubt it. The problem arises because mio_symbol crashes in writing the character length of the procedure symbol: Breakpoint 1, mio_symbol (sym=0x9d02370) at ../../fortran-dev/gcc/fortran/module.c:3560 3560 mio_typespec (sym-ts); (gdb) print sym-name $1 = 0xb7c8c9f0 char1 (gdb) print sym-ts.u.cl $2 = (gfc_charlen *) 0x9d04400 (gdb) print *sym-ts.u.cl $3 = {length = 0x9d04420, next = 0x0, length_from_typespec = 0 '\0', backend_decl = 0x0, passed_length = 0x0, resolved = 0} (gdb) print *sym-ts.interface-ts.u.cl $4 = {length = 0x9d03000, next = 0x9cb6be8, length_from_typespec = 0 '\0', backend_decl = 0x0, passed_length = 0x0, resolved = 1} (gdb) Note that the interface character length has been resolved, whereas the procedure character length has not. This is why my patch of #7 works. I believe that the problem must lie in resolve.c. For some reason, the symbol's own character length expression is not being resolved. Paul -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43227
[Bug fortran/43227] [4.5/4.6 Regression] ICE: segmentation fault in mio_expr
--- Comment #20 from pault at gcc dot gnu dot org 2010-04-19 21:16 --- Created an attachment (id=20429) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20429action=view) A provisional fix for the PR This needs cleaning up and FAILUREs of the gfc_resolve_expr's need dealing with. Once this is done and a testcase fabricated, I will submit it - tomorrow morning, I guess. BTW It bootstraps and regtests on trunk. Paul -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43227