public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/99818] New: [10/11 Regression] ICE in gfc_get_tree_for_caf_expr, at fortran/trans-expr.c:2186
@ 2021-03-29 19:33 gscfq@t-online.de
  2021-03-30 13:08 ` [Bug fortran/99818] " rguenth at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: gscfq@t-online.de @ 2021-03-29 19:33 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99818

            Bug ID: 99818
           Summary: [10/11 Regression] ICE in gfc_get_tree_for_caf_expr,
                    at fortran/trans-expr.c:2186
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gscfq@t-online.de
  Target Milestone: ---

Changed between 20210207 and 20210214 :


$ cat z1.f90
module m
   type t
      integer :: a
   contains
      procedure :: s
   end type
contains
   subroutine s(x)
      class(t) :: x[*]
   end
end
program p
   use m
   associate (y => t(1))
      call y%s
   end associate
end


$ gfortran-11-20210207 -c z1.f90 -fcoarray=single
z1.f90:15:12:

   15 |       call y%s
      |            1
Error: VARIABLE attribute of 'y' conflicts with PROCEDURE attribute at (1)

$ gfortran-11-20210207 -c z1.f90 -fcoarray=lib
z1.f90:15:12:

   15 |       call y%s
      |            1
Error: VARIABLE attribute of 'y' conflicts with PROCEDURE attribute at (1)


$ gfortran-11-20210328 -c z1.f90 -fcoarray=single
$
$ gfortran-11-20210328 -c z1.f90 -fcoarray=lib
z1.f90:15:14:

   15 |       call y%s
      |              1
internal compiler error: in gfc_get_tree_for_caf_expr, at
fortran/trans-expr.c:2186
0x76304b gfc_get_tree_for_caf_expr(gfc_expr*)
        ../../gcc/fortran/trans-expr.c:2186
0x76fb7b gfc_conv_procedure_call(gfc_se*, gfc_symbol*, gfc_actual_arglist*,
gfc_expr*, vec<tree_node*, va_gc, vl_embed>*)
        ../../gcc/fortran/trans-expr.c:6837
0x7a8d28 gfc_trans_call(gfc_code*, bool, tree_node*, tree_node*, bool)
        ../../gcc/fortran/trans-stmt.c:424
0x7391a8 trans_code
        ../../gcc/fortran/trans.c:1990
0x7ad12f gfc_trans_block_construct(gfc_code*)
        ../../gcc/fortran/trans-stmt.c:2304
0x738f67 trans_code
        ../../gcc/fortran/trans.c:2018
0x75f5e4 gfc_generate_function_code(gfc_namespace*)
        ../../gcc/fortran/trans-decl.c:6884
0x6e5de6 translate_all_program_units
        ../../gcc/fortran/parse.c:6351
0x6e5de6 gfc_parse_file()
        ../../gcc/fortran/parse.c:6620
0x7320ef gfc_be_parse_file
        ../../gcc/fortran/f95-lang.c:212

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug fortran/99818] [10/11 Regression] ICE in gfc_get_tree_for_caf_expr, at fortran/trans-expr.c:2186
  2021-03-29 19:33 [Bug fortran/99818] New: [10/11 Regression] ICE in gfc_get_tree_for_caf_expr, at fortran/trans-expr.c:2186 gscfq@t-online.de
@ 2021-03-30 13:08 ` rguenth at gcc dot gnu.org
  2021-03-31 12:49 ` marxin at gcc dot gnu.org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-03-30 13:08 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99818

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |10.3
           Priority|P3                          |P4

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug fortran/99818] [10/11 Regression] ICE in gfc_get_tree_for_caf_expr, at fortran/trans-expr.c:2186
  2021-03-29 19:33 [Bug fortran/99818] New: [10/11 Regression] ICE in gfc_get_tree_for_caf_expr, at fortran/trans-expr.c:2186 gscfq@t-online.de
  2021-03-30 13:08 ` [Bug fortran/99818] " rguenth at gcc dot gnu.org
@ 2021-03-31 12:49 ` marxin at gcc dot gnu.org
  2021-03-31 13:24 ` pault at gcc dot gnu.org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-03-31 12:49 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99818

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
                 CC|                            |marxin at gcc dot gnu.org,
                   |                            |pault at gcc dot gnu.org
   Last reconfirmed|                            |2021-03-31

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r11-7188-gff6903288d96aa1d.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug fortran/99818] [10/11 Regression] ICE in gfc_get_tree_for_caf_expr, at fortran/trans-expr.c:2186
  2021-03-29 19:33 [Bug fortran/99818] New: [10/11 Regression] ICE in gfc_get_tree_for_caf_expr, at fortran/trans-expr.c:2186 gscfq@t-online.de
  2021-03-30 13:08 ` [Bug fortran/99818] " rguenth at gcc dot gnu.org
  2021-03-31 12:49 ` marxin at gcc dot gnu.org
@ 2021-03-31 13:24 ` pault at gcc dot gnu.org
  2021-04-01 13:34 ` pault at gcc dot gnu.org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pault at gcc dot gnu.org @ 2021-03-31 13:24 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99818

--- Comment #2 from Paul Thomas <pault at gcc dot gnu.org> ---
(In reply to Martin Liška from comment #1)
> Started with r11-7188-gff6903288d96aa1d.

Thanks, Gerhard and Martin.

Have you ever tried to put a tent up in a storm? Sometimes maintaining gfortran
feels just like that :-)

Paul

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug fortran/99818] [10/11 Regression] ICE in gfc_get_tree_for_caf_expr, at fortran/trans-expr.c:2186
  2021-03-29 19:33 [Bug fortran/99818] New: [10/11 Regression] ICE in gfc_get_tree_for_caf_expr, at fortran/trans-expr.c:2186 gscfq@t-online.de
                   ` (2 preceding siblings ...)
  2021-03-31 13:24 ` pault at gcc dot gnu.org
@ 2021-04-01 13:34 ` pault at gcc dot gnu.org
  2021-04-03  9:19 ` gscfq@t-online.de
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pault at gcc dot gnu.org @ 2021-04-01 13:34 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99818

Paul Thomas <pault at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |pault at gcc dot gnu.org

--- Comment #3 from Paul Thomas <pault at gcc dot gnu.org> ---
Created attachment 50494
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50494&action=edit
Fix for the PR

The fix is trivial - gfortran now gives the correct error.
   15 |       call y%s
      |            1
Error: Actual argument to ‘x’ at (1) must be a coarray

Paul

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug fortran/99818] [10/11 Regression] ICE in gfc_get_tree_for_caf_expr, at fortran/trans-expr.c:2186
  2021-03-29 19:33 [Bug fortran/99818] New: [10/11 Regression] ICE in gfc_get_tree_for_caf_expr, at fortran/trans-expr.c:2186 gscfq@t-online.de
                   ` (3 preceding siblings ...)
  2021-04-01 13:34 ` pault at gcc dot gnu.org
@ 2021-04-03  9:19 ` gscfq@t-online.de
  2021-04-03 11:50 ` cvs-commit at gcc dot gnu.org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: gscfq@t-online.de @ 2021-04-03  9:19 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99818

--- Comment #4 from G. Steinmetz <gscfq@t-online.de> ---

> Have you ever tried to put a tent up in a storm?
... geez, how difficult and lengthy ...

The number of bug reports is admittedly increasing,
but the number of still unknown bugs is decreasing, isn't it?

And my impression is indeed that the number of
unfixed/unknown bugs in gfortran is now roughly limited
to huge(1_alpha), with alpha=~1.5 ;-)

The bug reproduction rate is likely less than one :-)

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug fortran/99818] [10/11 Regression] ICE in gfc_get_tree_for_caf_expr, at fortran/trans-expr.c:2186
  2021-03-29 19:33 [Bug fortran/99818] New: [10/11 Regression] ICE in gfc_get_tree_for_caf_expr, at fortran/trans-expr.c:2186 gscfq@t-online.de
                   ` (4 preceding siblings ...)
  2021-04-03  9:19 ` gscfq@t-online.de
@ 2021-04-03 11:50 ` cvs-commit at gcc dot gnu.org
  2021-04-05  6:21 ` pault at gcc dot gnu.org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-04-03 11:50 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99818

--- 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:fc27115d6107f219e6f3dc610c99210005fe9dc5

commit r11-7972-gfc27115d6107f219e6f3dc610c99210005fe9dc5
Author: Paul Thomas <pault@gcc.gnu.org>
Date:   Sat Apr 3 12:49:50 2021 +0100

    Fortran: Fix ICE on wrong code [PR99818].

    2021-04-03  Paul Thomas  <pault@gcc.gnu.org>

    gcc/fortran/ChangeLog

            PR fortran/99818
            * interface.c (compare_parameter): The codimension attribute is
            applied to the _data field of class formal arguments.

    gcc/testsuite/ChangeLog

            PR fortran/99818
            * gfortran.dg/coarray_48.f90: New test.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug fortran/99818] [10/11 Regression] ICE in gfc_get_tree_for_caf_expr, at fortran/trans-expr.c:2186
  2021-03-29 19:33 [Bug fortran/99818] New: [10/11 Regression] ICE in gfc_get_tree_for_caf_expr, at fortran/trans-expr.c:2186 gscfq@t-online.de
                   ` (5 preceding siblings ...)
  2021-04-03 11:50 ` cvs-commit at gcc dot gnu.org
@ 2021-04-05  6:21 ` pault at gcc dot gnu.org
  2021-04-08 12:02 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pault at gcc dot gnu.org @ 2021-04-05  6:21 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99818

--- Comment #6 from Paul Thomas <pault at gcc dot gnu.org> ---
(In reply to G. Steinmetz from comment #4)
> > Have you ever tried to put a tent up in a storm?
> ... geez, how difficult and lengthy ...
> 
> The number of bug reports is admittedly increasing,
> but the number of still unknown bugs is decreasing, isn't it?
> 
> And my impression is indeed that the number of
> unfixed/unknown bugs in gfortran is now roughly limited
> to huge(1_alpha), with alpha=~1.5 ;-)
> 
> The bug reproduction rate is likely less than one :-)

The only way to deal with it is a complete lockdown of gfortran for six months.
If nobody uses it, the number of bugs will surely drop. Then the roadmap out of
lockdown should start with only F95 being allowed, then six months later F2003
and so on. If at any stage the R number goes above unity, we revert one step in
the roadmap.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug fortran/99818] [10/11 Regression] ICE in gfc_get_tree_for_caf_expr, at fortran/trans-expr.c:2186
  2021-03-29 19:33 [Bug fortran/99818] New: [10/11 Regression] ICE in gfc_get_tree_for_caf_expr, at fortran/trans-expr.c:2186 gscfq@t-online.de
                   ` (6 preceding siblings ...)
  2021-04-05  6:21 ` pault at gcc dot gnu.org
@ 2021-04-08 12:02 ` rguenth at gcc dot gnu.org
  2021-05-04 12:31 ` [Bug fortran/99818] [10/11/12 " rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-04-08 12:02 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99818

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|10.3                        |10.4

--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 10.3 is being released, retargeting bugs to GCC 10.4.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug fortran/99818] [10/11/12 Regression] ICE in gfc_get_tree_for_caf_expr, at fortran/trans-expr.c:2186
  2021-03-29 19:33 [Bug fortran/99818] New: [10/11 Regression] ICE in gfc_get_tree_for_caf_expr, at fortran/trans-expr.c:2186 gscfq@t-online.de
                   ` (7 preceding siblings ...)
  2021-04-08 12:02 ` rguenth at gcc dot gnu.org
@ 2021-05-04 12:31 ` rguenth at gcc dot gnu.org
  2021-08-28 20:05 ` cvs-commit at gcc dot gnu.org
  2021-08-28 20:06 ` anlauf at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-05-04 12:31 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99818

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug fortran/99818] [10/11/12 Regression] ICE in gfc_get_tree_for_caf_expr, at fortran/trans-expr.c:2186
  2021-03-29 19:33 [Bug fortran/99818] New: [10/11 Regression] ICE in gfc_get_tree_for_caf_expr, at fortran/trans-expr.c:2186 gscfq@t-online.de
                   ` (8 preceding siblings ...)
  2021-05-04 12:31 ` [Bug fortran/99818] [10/11/12 " rguenth at gcc dot gnu.org
@ 2021-08-28 20:05 ` cvs-commit at gcc dot gnu.org
  2021-08-28 20:06 ` anlauf at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-08-28 20:05 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99818

--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Harald Anlauf
<anlauf@gcc.gnu.org>:

https://gcc.gnu.org/g:4a573574b17caf0391ee7f7febdaa82a9ff1094e

commit r10-10078-g4a573574b17caf0391ee7f7febdaa82a9ff1094e
Author: Paul Thomas <pault@gcc.gnu.org>
Date:   Sat Apr 3 12:49:50 2021 +0100

    Fortran: Fix ICE on wrong code [PR99818].

    2021-04-03  Paul Thomas  <pault@gcc.gnu.org>

    gcc/fortran/ChangeLog

            PR fortran/99818
            * interface.c (compare_parameter): The codimension attribute is
            applied to the _data field of class formal arguments.

    gcc/testsuite/ChangeLog

            PR fortran/99818
            * gfortran.dg/coarray_48.f90: New test.

    (cherry picked from commit fc27115d6107f219e6f3dc610c99210005fe9dc5)

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [Bug fortran/99818] [10/11/12 Regression] ICE in gfc_get_tree_for_caf_expr, at fortran/trans-expr.c:2186
  2021-03-29 19:33 [Bug fortran/99818] New: [10/11 Regression] ICE in gfc_get_tree_for_caf_expr, at fortran/trans-expr.c:2186 gscfq@t-online.de
                   ` (9 preceding siblings ...)
  2021-08-28 20:05 ` cvs-commit at gcc dot gnu.org
@ 2021-08-28 20:06 ` anlauf at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: anlauf at gcc dot gnu.org @ 2021-08-28 20:06 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99818

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
                 CC|                            |anlauf at gcc dot gnu.org
         Resolution|---                         |FIXED

--- Comment #9 from anlauf at gcc dot gnu.org ---
Cherry-picked to 10-branch for Paul after verifying that the issue is fixed.
Closing.

Thanks to Gerhard for the report, and to Paul for the fix!

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2021-08-28 20:06 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-29 19:33 [Bug fortran/99818] New: [10/11 Regression] ICE in gfc_get_tree_for_caf_expr, at fortran/trans-expr.c:2186 gscfq@t-online.de
2021-03-30 13:08 ` [Bug fortran/99818] " rguenth at gcc dot gnu.org
2021-03-31 12:49 ` marxin at gcc dot gnu.org
2021-03-31 13:24 ` pault at gcc dot gnu.org
2021-04-01 13:34 ` pault at gcc dot gnu.org
2021-04-03  9:19 ` gscfq@t-online.de
2021-04-03 11:50 ` cvs-commit at gcc dot gnu.org
2021-04-05  6:21 ` pault at gcc dot gnu.org
2021-04-08 12:02 ` rguenth at gcc dot gnu.org
2021-05-04 12:31 ` [Bug fortran/99818] [10/11/12 " rguenth at gcc dot gnu.org
2021-08-28 20:05 ` cvs-commit at gcc dot gnu.org
2021-08-28 20:06 ` anlauf 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).