* [Bug fortran/96012] [9/10/11 Regression] ICE in fold_convert_loc, at fold-const.c:2558
2020-06-30 20:10 [Bug fortran/96012] New: [9/10/11 Regression] ICE in fold_convert_loc, at fold-const.c:2558 gscfq@t-online.de
@ 2020-07-01 6:51 ` rguenth at gcc dot gnu.org
2020-07-01 7:06 ` marxin at gcc dot gnu.org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-07-01 6:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96012
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P4
Target Milestone|--- |9.4
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/96012] [9/10/11 Regression] ICE in fold_convert_loc, at fold-const.c:2558
2020-06-30 20:10 [Bug fortran/96012] New: [9/10/11 Regression] ICE in fold_convert_loc, at fold-const.c:2558 gscfq@t-online.de
2020-07-01 6:51 ` [Bug fortran/96012] " rguenth at gcc dot gnu.org
@ 2020-07-01 7:06 ` marxin at gcc dot gnu.org
2020-12-18 14:00 ` cvs-commit at gcc dot gnu.org
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-07-01 7:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96012
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burnus at gcc dot gnu.org,
| |marxin at gcc dot gnu.org
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
Last reconfirmed| |2020-07-01
--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r9-3522-gd0477233215e37de.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/96012] [9/10/11 Regression] ICE in fold_convert_loc, at fold-const.c:2558
2020-06-30 20:10 [Bug fortran/96012] New: [9/10/11 Regression] ICE in fold_convert_loc, at fold-const.c:2558 gscfq@t-online.de
2020-07-01 6:51 ` [Bug fortran/96012] " rguenth at gcc dot gnu.org
2020-07-01 7:06 ` marxin at gcc dot gnu.org
@ 2020-12-18 14:00 ` cvs-commit at gcc dot gnu.org
2020-12-20 10:16 ` drikosev at gmail dot com
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-12-18 14:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96012
--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Paul Thomas <pault@gcc.gnu.org>:
https://gcc.gnu.org/g:ce8dcc9105cbd4043d575d8b2c91309a423951a9
commit r11-6253-gce8dcc9105cbd4043d575d8b2c91309a423951a9
Author: Paul Thomas <pault@gcc.gnu.org>
Date: Fri Dec 18 14:00:11 2020 +0000
As well as the PR this patch fixes problems in handling class objects
2020-12-18 Paul Thomas <pault@gcc.gnu.org>
gcc/fortran
PR fortran/83118
PR fortran/96012
* resolve.c (resolve_ordinary_assign): Generate a vtable if
necessary for scalar non-polymorphic rhs's to unlimited lhs's.
* trans-array.c (get_class_info_from_ss): New function.
(gfc_trans_allocate_array_storage): Defer obtaining class
element type until all sources of class exprs are tried. Use
class API rather than TREE_OPERAND. Look for class expressions
in ss->info by calling get_class_info_from_ss. After, obtain
the element size for class descriptors. Where the element type
is unknown, cast the data as character(len=size) to overcome
unlimited polymorphic problems.
(gfc_conv_ss_descriptor): Do not fix class variable refs.
(build_class_array_ref, structure_alloc_comps): Replace code
replicating the new function gfc_resize_class_size_with_len.
(gfc_alloc_allocatable_for_assignment): Obtain element size
for lhs in cases of deferred characters and class enitities.
Move code for the element size of rhs to start of block. Clean
up extraction of class parameters throughout this function.
After the shape check test whether or not the lhs and rhs
element sizes are the same. Use earlier evaluation of
'cond_null'. Reallocation of lhs only to happen if size changes
or element size changes.
* trans-expr.c (gfc_resize_class_size_with_len): New function.
(gfc_get_class_from_expr): If a constant expression is
encountered, return NULL_TREE;
(trans_scalar_class_assign): New function.
(gfc_conv_procedure_call): Ensure the vtable is present for
passing a non-class actual to an unlimited formal.
(trans_class_vptr_len_assignment): For expressions of type
BT_CLASS, extract the class expression if necessary. Use a
statement block outside the loop body. Ensure that 'rhs' is
of the correct type. Obtain rhs vptr in all circumstances.
(gfc_trans_scalar_assign): Call trans_scalar_class_assign to
make maximum use of the vptr copy in place of assignment.
(trans_class_assignment): Actually do reallocation if needed.
(gfc_trans_assignment_1): Simplify some of the logic with
'realloc_flag'. Set 'vptr_copy' for all array assignments to
unlimited polymorphic lhs.
* trans.c (gfc_build_array_ref): Call gfc_resize_class_size_
with_len to correct span for unlimited polymorphic decls.
* trans.h : Add prototype for gfc_resize_class_size_with_len.
gcc/testsuite/
PR fortran/83118
PR fortran/96012
* gfortran.dg/dependency_60.f90: New test.
* gfortran.dg/class_allocate_25.f90: New test.
* gfortran.dg/class_assign_4.f90: New test.
* gfortran.dg/unlimited_polymorphic_32.f03: New test.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/96012] [9/10/11 Regression] ICE in fold_convert_loc, at fold-const.c:2558
2020-06-30 20:10 [Bug fortran/96012] New: [9/10/11 Regression] ICE in fold_convert_loc, at fold-const.c:2558 gscfq@t-online.de
` (2 preceding siblings ...)
2020-12-18 14:00 ` cvs-commit at gcc dot gnu.org
@ 2020-12-20 10:16 ` drikosev at gmail dot com
2021-01-07 11:19 ` cvs-commit at gcc dot gnu.org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: drikosev at gmail dot com @ 2020-12-20 10:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96012
Ev Drikos <drikosev at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |drikosev at gmail dot com
--- Comment #3 from Ev Drikos <drikosev at gmail dot com> ---
Created attachment 49809
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49809&action=edit
deferred length character array
Hello P. Thomas,
At first, this is obviously a complex patch, which as
it seems should normally have no regressions, so far.
It's my impression that the attachment is relevant,
ie due to variable realloc_flag in trans-expr.c, but
currently I can't rebuild the code from trunk. So,
I can't be sure if the test case would fail or pass.
Note that this example have been submitted to c.l.f
by a third person, I haven't written it.
Hope this helps,
Ev. Drikos
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/96012] [9/10/11 Regression] ICE in fold_convert_loc, at fold-const.c:2558
2020-06-30 20:10 [Bug fortran/96012] New: [9/10/11 Regression] ICE in fold_convert_loc, at fold-const.c:2558 gscfq@t-online.de
` (3 preceding siblings ...)
2020-12-20 10:16 ` drikosev at gmail dot com
@ 2021-01-07 11:19 ` cvs-commit at gcc dot gnu.org
2021-01-07 11:34 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-01-07 11:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96012
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Paul Thomas <pault@gcc.gnu.org>:
https://gcc.gnu.org/g:10dde773d2d6866cbca3f7323a64130339e36007
commit r10-9229-g10dde773d2d6866cbca3f7323a64130339e36007
Author: Paul Thomas <pault@gcc.gnu.org>
Date: Fri Dec 18 14:00:11 2020 +0000
As well as the PR this patch fixes problems in handling class objects
2020-12-18 Paul Thomas <pault@gcc.gnu.org>
gcc/fortran
PR fortran/83118
PR fortran/96012
* resolve.c (resolve_ordinary_assign): Generate a vtable if
necessary for scalar non-polymorphic rhs's to unlimited lhs's.
* trans-array.c (get_class_info_from_ss): New function.
(gfc_trans_allocate_array_storage): Defer obtaining class
element type until all sources of class exprs are tried. Use
class API rather than TREE_OPERAND. Look for class expressions
in ss->info by calling get_class_info_from_ss. After, obtain
the element size for class descriptors. Where the element type
is unknown, cast the data as character(len=size) to overcome
unlimited polymorphic problems.
(gfc_conv_ss_descriptor): Do not fix class variable refs.
(build_class_array_ref, structure_alloc_comps): Replace code
replicating the new function gfc_resize_class_size_with_len.
(gfc_alloc_allocatable_for_assignment): Obtain element size
for lhs in cases of deferred characters and class enitities.
Move code for the element size of rhs to start of block. Clean
up extraction of class parameters throughout this function.
After the shape check test whether or not the lhs and rhs
element sizes are the same. Use earlier evaluation of
'cond_null'. Reallocation of lhs only to happen if size changes
or element size changes.
* trans-expr.c (gfc_resize_class_size_with_len): New function.
(gfc_get_class_from_expr): If a constant expression is
encountered, return NULL_TREE;
(trans_scalar_class_assign): New function.
(gfc_conv_procedure_call): Ensure the vtable is present for
passing a non-class actual to an unlimited formal.
(trans_class_vptr_len_assignment): For expressions of type
BT_CLASS, extract the class expression if necessary. Use a
statement block outside the loop body. Ensure that 'rhs' is
of the correct type. Obtain rhs vptr in all circumstances.
(gfc_trans_scalar_assign): Call trans_scalar_class_assign to
make maximum use of the vptr copy in place of assignment.
(trans_class_assignment): Actually do reallocation if needed.
(gfc_trans_assignment_1): Simplify some of the logic with
'realloc_flag'. Set 'vptr_copy' for all array assignments to
unlimited polymorphic lhs.
* trans.c (gfc_build_array_ref): Call gfc_resize_class_size_
with_len to correct span for unlimited polymorphic decls.
* trans.h : Add prototype for gfc_resize_class_size_with_len.
gcc/testsuite/
PR fortran/83118
PR fortran/96012
* gfortran.dg/dependency_60.f90: New test.
* gfortran.dg/class_allocate_25.f90: New test.
* gfortran.dg/class_assign_4.f90: New test.
* gfortran.dg/unlimited_polymorphic_32.f03: New test.
(cherry picked from commit ce8dcc9105cbd4043d575d8b2c91309a423951a9)
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/96012] [9/10/11 Regression] ICE in fold_convert_loc, at fold-const.c:2558
2020-06-30 20:10 [Bug fortran/96012] New: [9/10/11 Regression] ICE in fold_convert_loc, at fold-const.c:2558 gscfq@t-online.de
` (4 preceding siblings ...)
2021-01-07 11:19 ` cvs-commit at gcc dot gnu.org
@ 2021-01-07 11:34 ` cvs-commit at gcc dot gnu.org
2021-03-26 19:44 ` anlauf at gcc dot gnu.org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-01-07 11:34 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96012
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-9 branch has been updated by Paul Thomas <pault@gcc.gnu.org>:
https://gcc.gnu.org/g:e780e940a9f53b93bdf6bd70fdb3ec2b287a52e3
commit r9-9158-ge780e940a9f53b93bdf6bd70fdb3ec2b287a52e3
Author: Paul Thomas <pault@gcc.gnu.org>
Date: Fri Dec 18 14:00:11 2020 +0000
As well as the PR this patch fixes problems in handling class objects
2020-12-18 Paul Thomas <pault@gcc.gnu.org>
gcc/fortran
PR fortran/83118
PR fortran/96012
* resolve.c (resolve_ordinary_assign): Generate a vtable if
necessary for scalar non-polymorphic rhs's to unlimited lhs's.
* trans-array.c (get_class_info_from_ss): New function.
(gfc_trans_allocate_array_storage): Defer obtaining class
element type until all sources of class exprs are tried. Use
class API rather than TREE_OPERAND. Look for class expressions
in ss->info by calling get_class_info_from_ss. After, obtain
the element size for class descriptors. Where the element type
is unknown, cast the data as character(len=size) to overcome
unlimited polymorphic problems.
(gfc_conv_ss_descriptor): Do not fix class variable refs.
(build_class_array_ref, structure_alloc_comps): Replace code
replicating the new function gfc_resize_class_size_with_len.
(gfc_alloc_allocatable_for_assignment): Obtain element size
for lhs in cases of deferred characters and class enitities.
Move code for the element size of rhs to start of block. Clean
up extraction of class parameters throughout this function.
After the shape check test whether or not the lhs and rhs
element sizes are the same. Use earlier evaluation of
'cond_null'. Reallocation of lhs only to happen if size changes
or element size changes.
* trans-expr.c (gfc_resize_class_size_with_len): New function.
(gfc_get_class_from_expr): If a constant expression is
encountered, return NULL_TREE;
(trans_scalar_class_assign): New function.
(gfc_conv_procedure_call): Ensure the vtable is present for
passing a non-class actual to an unlimited formal.
(trans_class_vptr_len_assignment): For expressions of type
BT_CLASS, extract the class expression if necessary. Use a
statement block outside the loop body. Ensure that 'rhs' is
of the correct type. Obtain rhs vptr in all circumstances.
(gfc_trans_scalar_assign): Call trans_scalar_class_assign to
make maximum use of the vptr copy in place of assignment.
(trans_class_assignment): Actually do reallocation if needed.
(gfc_trans_assignment_1): Simplify some of the logic with
'realloc_flag'. Set 'vptr_copy' for all array assignments to
unlimited polymorphic lhs.
* trans.c (gfc_build_array_ref): Call gfc_resize_class_size_
with_len to correct span for unlimited polymorphic decls.
* trans.h : Add prototype for gfc_resize_class_size_with_len.
gcc/testsuite/
PR fortran/83118
PR fortran/96012
* gfortran.dg/dependency_60.f90: New test.
* gfortran.dg/class_allocate_25.f90: New test.
* gfortran.dg/class_assign_4.f90: New test.
* gfortran.dg/unlimited_polymorphic_32.f03: New test.
(cherry picked from commit ce8dcc9105cbd4043d575d8b2c91309a423951a9)
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/96012] [9/10/11 Regression] ICE in fold_convert_loc, at fold-const.c:2558
2020-06-30 20:10 [Bug fortran/96012] New: [9/10/11 Regression] ICE in fold_convert_loc, at fold-const.c:2558 gscfq@t-online.de
` (5 preceding siblings ...)
2021-01-07 11:34 ` cvs-commit at gcc dot gnu.org
@ 2021-03-26 19:44 ` anlauf at gcc dot gnu.org
2021-06-01 8:17 ` [Bug fortran/96012] [9/10/11/12 " rguenth at gcc dot gnu.org
2021-06-01 12:18 ` dominiq at lps dot ens.fr
8 siblings, 0 replies; 10+ messages in thread
From: anlauf at gcc dot gnu.org @ 2021-03-26 19:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96012
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |WAITING
--- Comment #6 from anlauf at gcc dot gnu.org ---
This PR appears to remain an 8-only regression, as the testcases in comment#0
do compile now.
Shall this PR be closed?
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/96012] [9/10/11/12 Regression] ICE in fold_convert_loc, at fold-const.c:2558
2020-06-30 20:10 [Bug fortran/96012] New: [9/10/11 Regression] ICE in fold_convert_loc, at fold-const.c:2558 gscfq@t-online.de
` (6 preceding siblings ...)
2021-03-26 19:44 ` anlauf at gcc dot gnu.org
@ 2021-06-01 8:17 ` rguenth at gcc dot gnu.org
2021-06-01 12:18 ` dominiq at lps dot ens.fr
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-06-01 8:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96012
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|9.4 |9.5
--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 9.4 is being released, retargeting bugs to GCC 9.5.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/96012] [9/10/11/12 Regression] ICE in fold_convert_loc, at fold-const.c:2558
2020-06-30 20:10 [Bug fortran/96012] New: [9/10/11 Regression] ICE in fold_convert_loc, at fold-const.c:2558 gscfq@t-online.de
` (7 preceding siblings ...)
2021-06-01 8:17 ` [Bug fortran/96012] [9/10/11/12 " rguenth at gcc dot gnu.org
@ 2021-06-01 12:18 ` dominiq at lps dot ens.fr
8 siblings, 0 replies; 10+ messages in thread
From: dominiq at lps dot ens.fr @ 2021-06-01 12:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96012
Dominique d'Humieres <dominiq at lps dot ens.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution|--- |FIXED
--- Comment #8 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
> This PR appears to remain an 8-only regression, as the testcases in comment#0
> do compile now.
GCC8 is closed, so closing.
^ permalink raw reply [flat|nested] 10+ messages in thread