[Bug fortran/82923] Automatic allocation of deferred length character using function result
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82923 --- Comment #13 from Paul Thomas --- > > Added: > trunk/gcc/testsuite/gfortran.dg/select_type_42.f90 > Modified: > trunk/gcc/fortran/ChangeLog > trunk/gcc/fortran/match.c > trunk/gcc/testsuite/ChangeLog Sorry, this last was the patch for PR80657 Paul.
[Bug fortran/82923] Automatic allocation of deferred length character using function result
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82923 --- Comment #12 from Paul Thomas --- Author: pault Date: Sun May 20 09:59:54 2018 New Revision: 260413 URL: https://gcc.gnu.org/viewcvs?rev=260413=gcc=rev Log: 2018-05-19 Paul ThomasPR fortran/82923 PR fortran/66694 PR fortran/82617 * trans-array.c (gfc_alloc_allocatable_for_assignment): Set the charlen backend_decl of the rhs expr to ss->info->string_length so that the value in the current scope is used. 2018-05-19 Paul Thomas PR fortran/82923 * gfortran.dg/allocate_assumed_charlen_4.f90: New test. Note that the patch fixes PR66694 & PR82617, although the testcases are not explicitly included. Added: trunk/gcc/testsuite/gfortran.dg/select_type_42.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/match.c trunk/gcc/testsuite/ChangeLog
[Bug fortran/82923] Automatic allocation of deferred length character using function result
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82923 Paul Thomas changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #11 from Paul Thomas --- I suppose that I have to mark it as resolved :-)
[Bug fortran/82923] Automatic allocation of deferred length character using function result
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82923 --- Comment #10 from Paul Thomas --- Fixed on 7-branch through to trunk. Thanks for the report and sorry that it took so long. Paul
[Bug fortran/82923] Automatic allocation of deferred length character using function result
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82923 --- Comment #9 from Paul Thomas --- Author: pault Date: Sat May 19 14:53:58 2018 New Revision: 260399 URL: https://gcc.gnu.org/viewcvs?rev=260399=gcc=rev Log: 2018-05-19 Paul ThomasPR fortran/82923 PR fortran/66694 PR fortran/82617 * trans-array.c (gfc_alloc_allocatable_for_assignment): Set the charlen backend_decl of the rhs expr to ss->info->string_length so that the value in the current scope is used. 2018-05-19 Paul Thomas PR fortran/82923 * gfortran.dg/allocate_assumed_charlen_4.f90: New test. Note that the patch fixes PR66694 & PR82617, although the testcases are not explicitly included. Added: branches/gcc-7-branch/gcc/testsuite/gfortran.dg/allocate_assumed_charlen_4.f90 Modified: branches/gcc-7-branch/gcc/fortran/ChangeLog branches/gcc-7-branch/gcc/fortran/trans-array.c branches/gcc-7-branch/gcc/testsuite/ChangeLog
[Bug fortran/82923] Automatic allocation of deferred length character using function result
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82923 --- Comment #8 from Paul Thomas --- Author: pault Date: Sat May 19 11:32:30 2018 New Revision: 260395 URL: https://gcc.gnu.org/viewcvs?rev=260395=gcc=rev Log: 2018-05-19 Paul ThomasPR fortran/82923 PR fortran/66694 PR fortran/82617 * trans-array.c (gfc_alloc_allocatable_for_assignment): Set the charlen backend_decl of the rhs expr to ss->info->string_length so that the value in the current scope is used. 2018-05-19 Paul Thomas PR fortran/82923 * gfortran.dg/allocate_assumed_charlen_4.f90: New test. Note that the patch fixes PR66694 & PR82617, although the testcases are not explicitly included. Added: branches/gcc-8-branch/gcc/testsuite/gfortran.dg/allocate_assumed_charlen_4.f90 Modified: branches/gcc-8-branch/gcc/fortran/ChangeLog branches/gcc-8-branch/gcc/fortran/trans-array.c branches/gcc-8-branch/gcc/testsuite/ChangeLog
[Bug fortran/82923] Automatic allocation of deferred length character using function result
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82923 --- Comment #7 from Paul Thomas --- Author: pault Date: Sat May 19 10:49:50 2018 New Revision: 260392 URL: https://gcc.gnu.org/viewcvs?rev=260392=gcc=rev Log: 2018-05-19 Paul ThomasPR fortran/82923 PR fortran/66694 PR fortran/82617 * trans-array.c (gfc_alloc_allocatable_for_assignment): Set the charlen backend_decl of the rhs expr to ss->info->string_length so that the value in the current scope is used. 2018-05-19 Paul Thomas PR fortran/82923 * gfortran.dg/allocate_assumed_charlen_4.f90: New test. Note that the patch fixes PR66694 & PR82617, although the testcases are not explicitly included. Added: trunk/gcc/testsuite/gfortran.dg/allocate_assumed_charlen_4.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/trans-array.c trunk/gcc/testsuite/ChangeLog
[Bug fortran/82923] Automatic allocation of deferred length character using function result
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82923 --- Comment #6 from Dominique d'Humieres --- > I can't believe that this isn't a duplicate although I can't find it. ... PRs 66694 and 82617 are "fixed" by the patch at https://gcc.gnu.org/ml/fortran/2018-05/msg00046.html.
[Bug fortran/82923] Automatic allocation of deferred length character using function result
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82923 Dominique d'Humieres changed: What|Removed |Added Status|NEW |ASSIGNED
[Bug fortran/82923] Automatic allocation of deferred length character using function result
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82923 --- Comment #5 from Dominique d'Humieres --- > Confirmed, however I see an ICE when compiling the "type" variant of pr65381. I have forgotten to say that the ICE is similar to the one in comment 1 pr65381_red.f90:15:0: pure function fixedStringTable(this) result(fixed) Error: Local declaration from a different function D.3828 pr65381_red.f90:15:0: pure function fixedStringTable(this) result(fixed) note: in statement D.3828 = MAX_EXPR <_8, 0>; pr65381_red.f90:15:0: pure function fixedStringTable(this) result(fixed) Error: Local declaration from a different function D.3828 pr65381_red.f90:15:0: pure function fixedStringTable(this) result(fixed) note: in statement _11 = (sizetype) D.3828; pr65381_red.f90:15:0: pure function fixedStringTable(this) result(fixed) Error: Local declaration from a different function D.3828 pr65381_red.f90:15:0: pure function fixedStringTable(this) result(fixed) note: in statement D.3894 = (sizetype) D.3828; pr65381_red.f90:15:0: pure function fixedStringTable(this) result(fixed) Error: Local declaration from a different function D.3828 pr65381_red.f90:26:0: fixed(k) = this(i)%list(j)%chars note: in statement D.3883 = D.3828; during GIMPLE pass: cfg pr65381_red.f90:15:0: pure function fixedStringTable(this) result(fixed) internal compiler error: verify_gimple failed
[Bug fortran/82923] Automatic allocation of deferred length character using function result
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82923 --- Comment #4 from Dominique d'Humieres --- > Created attachment 42637 [details] > Fix for the bug > > This one does the job and it regtests OK. Confirmed, however I see an ICE when compiling the "type" variant of pr65381.
[Bug fortran/82923] Automatic allocation of deferred length character using function result
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82923 --- Comment #3 from Paul Thomas --- Created attachment 42637 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42637=edit Fix for the bug This one does the job and it regtests OK. However, I'll wait until I get PR78990 out of the way before submitting. Paul
[Bug fortran/82923] Automatic allocation of deferred length character using function result
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82923 Paul Thomas changed: What|Removed |Added CC||pault at gcc dot gnu.org Assignee|unassigned at gcc dot gnu.org |pault at gcc dot gnu.org --- Comment #2 from Paul Thomas --- Ha! That's an 'amusing' one. I too am surprised that there is no duplicate. I'll take it. Paul
[Bug fortran/82923] Automatic allocation of deferred length character using function result
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82923 Dominique d'Humieres changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2017-11-09 Ever confirmed|0 |1 --- Comment #1 from Dominique d'Humieres --- Confirmed from 4.8 up to trunk (8.0). Note that if the compiler is configured with --enable-checking=yes, I get pr82923.f90:11:0: program testca Error: Local declaration from a different function ..__result pr82923.f90:27:0: mine = getchars(2,4) note: in statement .mine = ..__result; pr82923.f90:11:0: program testca Error: Local declaration from a different function ..__result pr82923.f90:27:0: mine = getchars(2,4) note: in statement _101 = (integer(kind=8)) ..__result; pr82923.f90:11:0: program testca Error: Local declaration from a different function ..__result pr82923.f90:27:0: mine = getchars(2,4) note: in statement D.3753 = (sizetype) ..__result; during GIMPLE pass: cfg pr82923.f90:11:0: program testca internal compiler error: verify_gimple failed instead of during RTL pass: expand pr82923.f90:27:0: mine = getchars(2,4) internal compiler error: in expand_expr_real_1, at expr.c:9865 for 5.5.0 to 8.0 and pr82923.f90:27:0: internal compiler error: in gimplify_var_or_parm_decl, at gimplify.c:1741 mine = getchars(2,4) ^ for 4.8 and 4.9. No duplicate in store.