public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/104429] New: [9/10/11/12 Regression] ICE in gfc_conv_variable, at fortran/trans-expr.cc:3056
@ 2022-02-07 18:48 gscfq@t-online.de
2022-02-08 9:04 ` [Bug fortran/104429] " rguenth at gcc dot gnu.org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: gscfq@t-online.de @ 2022-02-07 18:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104429
Bug ID: 104429
Summary: [9/10/11/12 Regression] ICE in gfc_conv_variable, at
fortran/trans-expr.cc:3056
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: gscfq@t-online.de
Target Milestone: ---
Started between 20180826 and 20180902 :
$ cat z1.f90
module m
type t
contains
procedure :: op
procedure :: assign
generic :: operator(*) => op
generic :: assignment(=) => assign
end type
contains
function op (x, y)
class(t), allocatable :: op
class(t), intent(in) :: x
real, intent(in) :: y
end
subroutine assign (z, x)
type(t), intent(in) :: x
class(t), intent(out) :: z
end
end
program p
use m
class(t), allocatable :: x
x = x * y
end
$ gfortran-8 -c z1.f90
$
$ gfortran-12-20220206 -c z1.f90
z1.f90:23:12:
23 | x = x * y
| 1
interner Compiler-Fehler: in gfc_conv_variable, at fortran/trans-expr.cc:3056
0x7dc07f gfc_conv_variable
../../gcc/fortran/trans-expr.cc:3056
0x7d7fba gfc_conv_expr(gfc_se*, gfc_expr*)
../../gcc/fortran/trans-expr.cc:9406
0x7e5102 get_proc_ptr_comp
../../gcc/fortran/trans-expr.cc:4176
0x7e5102 conv_function_val
../../gcc/fortran/trans-expr.cc:4215
0x7e5102 gfc_conv_procedure_call(gfc_se*, gfc_symbol*, gfc_actual_arglist*,
gfc_expr*, vec<tree_node*, va_gc, vl_embed>*)
../../gcc/fortran/trans-expr.cc:7650
0x81f040 gfc_trans_call(gfc_code*, bool, tree_node*, tree_node*, bool)
../../gcc/fortran/trans-stmt.cc:422
0x7a7043 trans_code
../../gcc/fortran/trans.cc:1995
0x7d037e gfc_generate_function_code(gfc_namespace*)
../../gcc/fortran/trans-decl.cc:7654
0x7530ae translate_all_program_units
../../gcc/fortran/parse.cc:6651
0x7530ae gfc_parse_file()
../../gcc/fortran/parse.cc:6938
0x7a00af gfc_be_parse_file
../../gcc/fortran/f95-lang.cc:216
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/104429] [9/10/11/12 Regression] ICE in gfc_conv_variable, at fortran/trans-expr.cc:3056
2022-02-07 18:48 [Bug fortran/104429] New: [9/10/11/12 Regression] ICE in gfc_conv_variable, at fortran/trans-expr.cc:3056 gscfq@t-online.de
@ 2022-02-08 9:04 ` rguenth at gcc dot gnu.org
2022-02-24 10:40 ` [Bug fortran/104429] [9/10/11/12 Regression] ICE in gfc_conv_variable, at fortran/trans-expr.cc:3056 since r9-2664-g1312bb902382cb48 marxin at gcc dot gnu.org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-02-08 9:04 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104429
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P4
Target Milestone|--- |9.5
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/104429] [9/10/11/12 Regression] ICE in gfc_conv_variable, at fortran/trans-expr.cc:3056 since r9-2664-g1312bb902382cb48
2022-02-07 18:48 [Bug fortran/104429] New: [9/10/11/12 Regression] ICE in gfc_conv_variable, at fortran/trans-expr.cc:3056 gscfq@t-online.de
2022-02-08 9:04 ` [Bug fortran/104429] " rguenth at gcc dot gnu.org
@ 2022-02-24 10:40 ` marxin at gcc dot gnu.org
2022-03-09 8:47 ` burnus at gcc dot gnu.org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-02-24 10:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104429
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2022-02-24
CC| |marxin at gcc dot gnu.org,
| |pault at gcc dot gnu.org
Status|UNCONFIRMED |NEW
Summary|[9/10/11/12 Regression] ICE |[9/10/11/12 Regression] ICE
|in gfc_conv_variable, at |in gfc_conv_variable, at
|fortran/trans-expr.cc:3056 |fortran/trans-expr.cc:3056
| |since
| |r9-2664-g1312bb902382cb48
Ever confirmed|0 |1
--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r9-2664-g1312bb902382cb48.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/104429] [9/10/11/12 Regression] ICE in gfc_conv_variable, at fortran/trans-expr.cc:3056 since r9-2664-g1312bb902382cb48
2022-02-07 18:48 [Bug fortran/104429] New: [9/10/11/12 Regression] ICE in gfc_conv_variable, at fortran/trans-expr.cc:3056 gscfq@t-online.de
2022-02-08 9:04 ` [Bug fortran/104429] " rguenth at gcc dot gnu.org
2022-02-24 10:40 ` [Bug fortran/104429] [9/10/11/12 Regression] ICE in gfc_conv_variable, at fortran/trans-expr.cc:3056 since r9-2664-g1312bb902382cb48 marxin at gcc dot gnu.org
@ 2022-03-09 8:47 ` burnus at gcc dot gnu.org
2022-05-27 9:47 ` [Bug fortran/104429] [10/11/12/13 " rguenth at gcc dot gnu.org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: burnus at gcc dot gnu.org @ 2022-03-09 8:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104429
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burnus at gcc dot gnu.org
--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> ---
The problem is that the following code works fine for:
f(...)
where f returns a CLASS but it does not work for:
x % _vptr % op[[((p:x) (p:y))]]
trans-expr.cc's gfc_conv_procedure_call
if (fsym && (fsym->ts.type == BT_DERIVED
|| fsym->ts.type == BT_ASSUMED)
&& e->ts.type == BT_CLASS
&& !CLASS_DATA (e)->attr.dimension
&& !CLASS_DATA (e)->attr.codimension)
{
...
if (e->expr_type == EXPR_FUNCTION
&& CLASS_DATA (e)->attr.allocatable)
{
...
e->symtree->n.sym->attr.flavor = FL_PROCEDURE;
That works kind of fine – until:
x % _vptr % assign ( ... )
Namely: get_proc_ptr_comp calls first gfc_conv_variable for 'x' but that ends
up at:
else if (!sym->attr.temporary
&& sym->attr.flavor == FL_PROCEDURE
&& se->expr != current_function_decl)
{
if (!sym->attr.dummy && !sym->attr.proc_pointer)
{
gcc_assert (TREE_CODE (se->expr) == FUNCTION_DECL);
as 'x' as the FL_PROCEDURE – but it not a procedure but just a CLASS variable.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/104429] [10/11/12/13 Regression] ICE in gfc_conv_variable, at fortran/trans-expr.cc:3056 since r9-2664-g1312bb902382cb48
2022-02-07 18:48 [Bug fortran/104429] New: [9/10/11/12 Regression] ICE in gfc_conv_variable, at fortran/trans-expr.cc:3056 gscfq@t-online.de
` (2 preceding siblings ...)
2022-03-09 8:47 ` burnus at gcc dot gnu.org
@ 2022-05-27 9:47 ` rguenth at gcc dot gnu.org
2022-06-28 10:48 ` jakub at gcc dot gnu.org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-05-27 9:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104429
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|9.5 |10.4
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 9 branch is being closed
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/104429] [10/11/12/13 Regression] ICE in gfc_conv_variable, at fortran/trans-expr.cc:3056 since r9-2664-g1312bb902382cb48
2022-02-07 18:48 [Bug fortran/104429] New: [9/10/11/12 Regression] ICE in gfc_conv_variable, at fortran/trans-expr.cc:3056 gscfq@t-online.de
` (3 preceding siblings ...)
2022-05-27 9:47 ` [Bug fortran/104429] [10/11/12/13 " rguenth at gcc dot gnu.org
@ 2022-06-28 10:48 ` jakub at gcc dot gnu.org
2023-05-16 5:37 ` [Bug fortran/104429] [10/11/12/13/14 " cvs-commit at gcc dot gnu.org
2023-05-16 5:50 ` pault at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-06-28 10:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104429
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|10.4 |10.5
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 10.4 is being released, retargeting bugs to GCC 10.5.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/104429] [10/11/12/13/14 Regression] ICE in gfc_conv_variable, at fortran/trans-expr.cc:3056 since r9-2664-g1312bb902382cb48
2022-02-07 18:48 [Bug fortran/104429] New: [9/10/11/12 Regression] ICE in gfc_conv_variable, at fortran/trans-expr.cc:3056 gscfq@t-online.de
` (4 preceding siblings ...)
2022-06-28 10:48 ` jakub at gcc dot gnu.org
@ 2023-05-16 5:37 ` cvs-commit at gcc dot gnu.org
2023-05-16 5:50 ` pault at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-05-16 5:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104429
--- Comment #5 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:6c95fe9bc0553743098eeaa739f14b885050fa42
commit r14-870-g6c95fe9bc0553743098eeaa739f14b885050fa42
Author: Paul Thomas <pault@gcc.gnu.org>
Date: Tue May 16 06:35:40 2023 +0100
Fortran: Fix an assortment of bugs
2023-05-16 Paul Thomas <pault@gcc.gnu.org>
gcc/fortran
PR fortran/105152
* interface.cc (gfc_compare_actual_formal): Emit an error if an
unlimited polymorphic actual is not matched either to an
unlimited or assumed type formal argument.
PR fortran/100193
* resolve.cc (resolve_ordinary_assign): Emit an error if the
var expression of an ordinary assignment is a proc pointer
component.
PR fortran/87496
* trans-array.cc (gfc_walk_array_ref): Provide assumed shape
arrays coming from interface mapping with a viable arrayspec.
PR fortran/103389
* trans-expr.cc (gfc_conv_intrinsic_to_class): Tidy up flagging
of unlimited polymorphic 'class_ts'.
(gfc_conv_gfc_desc_to_cfi_desc): Assumed type is unlimited
polymorphic and should accept any actual type.
PR fortran/104429
(gfc_conv_procedure_call): Replace dreadful kludge with a call
to gfc_finalize_tree_expr. Avoid dereferencing a void pointer
by giving it the pointer type of the actual argument.
PR fortran/82774
(alloc_scalar_allocatable_subcomponent): Shorten the function
name and replace the symbol argument with the se string length.
If a deferred length character length is either not present or
is not a variable, give the typespec a variable and assign the
string length to that. Use gfc_deferred_strlen to find the
hidden string length component.
(gfc_trans_subcomponent_assign): Convert the expression before
the call to alloc_scalar_allocatable_subcomponent so that a
good string length is provided.
(gfc_trans_structure_assign): Remove the unneeded derived type
symbol from calls to gfc_trans_subcomponent_assign.
gcc/testsuite/
PR fortran/105152
* gfortran.dg/pr105152.f90 : New test
PR fortran/100193
* gfortran.dg/pr100193.f90 : New test
PR fortran/87946
* gfortran.dg/pr87946.f90 : New test
PR fortran/103389
* gfortran.dg/pr103389.f90 : New test
PR fortran/104429
* gfortran.dg/pr104429.f90 : New test
PR fortran/82774
* gfortran.dg/pr82774.f90 : New test
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug fortran/104429] [10/11/12/13/14 Regression] ICE in gfc_conv_variable, at fortran/trans-expr.cc:3056 since r9-2664-g1312bb902382cb48
2022-02-07 18:48 [Bug fortran/104429] New: [9/10/11/12 Regression] ICE in gfc_conv_variable, at fortran/trans-expr.cc:3056 gscfq@t-online.de
` (5 preceding siblings ...)
2023-05-16 5:37 ` [Bug fortran/104429] [10/11/12/13/14 " cvs-commit at gcc dot gnu.org
@ 2023-05-16 5:50 ` pault at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: pault at gcc dot gnu.org @ 2023-05-16 5:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104429
Paul Thomas <pault at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEW |RESOLVED
--- Comment #6 from Paul Thomas <pault at gcc dot gnu.org> ---
Fixed on trunk. I will back port to 13-branch in 2-3 weeks time.
Thanks for the report
Paul
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-05-16 5:50 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-07 18:48 [Bug fortran/104429] New: [9/10/11/12 Regression] ICE in gfc_conv_variable, at fortran/trans-expr.cc:3056 gscfq@t-online.de
2022-02-08 9:04 ` [Bug fortran/104429] " rguenth at gcc dot gnu.org
2022-02-24 10:40 ` [Bug fortran/104429] [9/10/11/12 Regression] ICE in gfc_conv_variable, at fortran/trans-expr.cc:3056 since r9-2664-g1312bb902382cb48 marxin at gcc dot gnu.org
2022-03-09 8:47 ` burnus at gcc dot gnu.org
2022-05-27 9:47 ` [Bug fortran/104429] [10/11/12/13 " rguenth at gcc dot gnu.org
2022-06-28 10:48 ` jakub at gcc dot gnu.org
2023-05-16 5:37 ` [Bug fortran/104429] [10/11/12/13/14 " cvs-commit at gcc dot gnu.org
2023-05-16 5:50 ` pault at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).