[Bug fortran/78300] Failure to compile a Fortran-2003 code with an optional dummy procedure argument.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78300 janus at gcc dot gnu.org changed: What|Removed |Added CC||janus at gcc dot gnu.org --- Comment #13 from janus at gcc dot gnu.org --- Further reduced/modified testcase: module gfc_base implicit none type gfc_cont_elem_t end type contains function gfc_copy_i() result(clone) class(gfc_cont_elem_t), pointer:: clone end function subroutine ContElemConstruct(copy_constr_func) procedure(gfc_copy_i) :: copy_constr_func end subroutine end module
[Bug fortran/78300] Failure to compile a Fortran-2003 code with an optional dummy procedure argument.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78300 --- Comment #12 from DIL --- Indeed, thanks again.
[Bug fortran/78300] Failure to compile a Fortran-2003 code with an optional dummy procedure argument.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78300 --- Comment #11 from Dominique d'Humieres --- > Not yet. I won't have time to apply the patch until > tomorrow or Saturday. I posted the patch to bugzilla > so it does not get lost. Once it is in the source tree, > you can use svn to pull the source down. You can also pull the source down and apply the patch yourself.
[Bug fortran/78300] Failure to compile a Fortran-2003 code with an optional dummy procedure argument.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78300 --- Comment #10 from DIL --- Thanks!
[Bug fortran/78300] Failure to compile a Fortran-2003 code with an optional dummy procedure argument.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78300 --- Comment #9 from Steve Kargl --- On Thu, Nov 10, 2016 at 10:40:15PM +, liakhdi at ornl dot gov wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78300 > > --- Comment #8 from DIL --- > Is there a way to download the GCC source with this patch applied? > Not yet. I won't have time to apply the patch until tomorrow or Saturday. I posted the patch to bugzilla so it does not get lost. Once it is in the source tree, you can use svn to pull the source down.
[Bug fortran/78300] Failure to compile a Fortran-2003 code with an optional dummy procedure argument.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78300 --- Comment #8 from DIL --- Is there a way to download the GCC source with this patch applied?
[Bug fortran/78300] Failure to compile a Fortran-2003 code with an optional dummy procedure argument.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78300 --- Comment #7 from Steve Kargl --- Here's a patch that allows the reduced testcase compile. Index: gcc/fortran/resolve.c === --- gcc/fortran/resolve.c (revision 241667) +++ gcc/fortran/resolve.c (working copy) @@ -11719,7 +11719,8 @@ resolve_fl_var_and_proc (gfc_symbol *sym /* Assume that use associated symbols were checked in the module ns. Class-variables that are associate-names are also something special and excepted from the test. */ - if (!sym->attr.class_ok && !sym->attr.use_assoc && !sym->assoc) + if (!sym->attr.class_ok && !sym->attr.use_assoc && !sym->attr.dummy + && !sym->assoc) { gfc_error ("CLASS variable %qs at %L must be dummy, allocatable " "or pointer", sym->name, >declared_at);
[Bug fortran/78300] Failure to compile a Fortran-2003 code with an optional dummy procedure argument.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78300 --- Comment #6 from Steve Kargl --- On Thu, Nov 10, 2016 at 09:06:15PM +, dominiq at lps dot ens.fr wrote: > > Confirmed from 4.8 up to trunk (7.0). It would be nice to have a reduced > reproducer. > I certainly agree with! It took a bit to get this. module gfc_base implicit none integer, parameter:: INTD=4 integer, parameter:: INTL=8 integer(INTD), parameter :: GFC_TRUE=1, GFC_FALSE=0 type gfc_cont_elem_t class(*), pointer, private:: value_p=>NULL() integer(INTD), private:: alloc=GFC_FALSE contains procedure, public:: construct=>ContElemConstruct end type gfc_cont_elem_t abstract interface function gfc_copy_i(obj,ierr) result(clone) import:: INTD class(*), pointer:: clone class(*), intent(in):: obj integer(INTD), intent(out), optional:: ierr end function gfc_copy_i end interface private ContElemConstruct contains subroutine ContElemConstruct(this,obj,ierr,assoc_only,copy_constr_func) class(gfc_cont_elem_t), intent(inout):: this class(*), target, intent(in):: obj integer(INTD), intent(out), optional:: ierr logical, intent(in), optional:: assoc_only procedure(gfc_copy_i), optional:: copy_constr_func end subroutine ContElemConstruct end module gfc_base
[Bug fortran/78300] Failure to compile a Fortran-2003 code with an optional dummy procedure argument.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78300 Dominique d'Humieres changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2016-11-10 Ever confirmed|0 |1 --- Comment #5 from Dominique d'Humieres --- Confirmed from 4.8 up to trunk (7.0). It would be nice to have a reduced reproducer.
[Bug fortran/78300] Failure to compile a Fortran-2003 code with an optional dummy procedure argument.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78300 --- Comment #4 from DIL --- Created attachment 40019 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40019=edit Source file
[Bug fortran/78300] Failure to compile a Fortran-2003 code with an optional dummy procedure argument.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78300 --- Comment #3 from DIL --- Created attachment 40018 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40018=edit Source file
[Bug fortran/78300] Failure to compile a Fortran-2003 code with an optional dummy procedure argument.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78300 --- Comment #2 from DIL --- Created attachment 40017 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40017=edit Source file
[Bug fortran/78300] Failure to compile a Fortran-2003 code with an optional dummy procedure argument.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78300 kargl at gcc dot gnu.org changed: What|Removed |Added CC||kargl at gcc dot gnu.org --- Comment #1 from kargl at gcc dot gnu.org --- (In reply to DIL from comment #0) > Source code: https://gitlab.com/DmitryLyakh/GFC.git > Please attach the source to the PR.