public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/100154] New: [9/10/11 Regression] ICE in gfc_conv_procedure_call, at fortran/trans-expr.c:6131
@ 2021-04-20 17:36 gscfq@t-online.de
  2021-04-20 20:58 ` [Bug fortran/100154] " anlauf at gcc dot gnu.org
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: gscfq@t-online.de @ 2021-04-20 17:36 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 100154
           Summary: [9/10/11 Regression] ICE in gfc_conv_procedure_call,
                    at fortran/trans-expr.c:6131
           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 20180916 and 20180923 :


$ cat z1.f90
program p
   n = fget('c')
end


$ gfortran-9-20180916 -c z1.f90
$
$ gfortran-11-20210418 -c z1.f90
z1.f90:2:16:

    2 |    n = fget('c')
      |                1
internal compiler error: Segmentation fault
0xc0b22f crash_signal
        ../../gcc/toplev.c:327
0x771d0f 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:6131
0x78e23e gfc_conv_intrinsic_funcall
        ../../gcc/fortran/trans-intrinsic.c:4443
0x791467 gfc_conv_intrinsic_function(gfc_se*, gfc_expr*)
        ../../gcc/fortran/trans-intrinsic.c:10170
0x76766a gfc_conv_expr(gfc_se*, gfc_expr*)
        ../../gcc/fortran/trans-expr.c:8967
0x7774a1 gfc_trans_assignment_1
        ../../gcc/fortran/trans-expr.c:11259
0x739707 trans_code
        ../../gcc/fortran/trans.c:1932
0x75fd34 gfc_generate_function_code(gfc_namespace*)
        ../../gcc/fortran/trans-decl.c:6884
0x6e66b6 translate_all_program_units
        ../../gcc/fortran/parse.c:6351
0x6e66b6 gfc_parse_file()
        ../../gcc/fortran/parse.c:6620
0x7329cf gfc_be_parse_file
        ../../gcc/fortran/f95-lang.c:212

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

* [Bug fortran/100154] [9/10/11 Regression] ICE in gfc_conv_procedure_call, at fortran/trans-expr.c:6131
  2021-04-20 17:36 [Bug fortran/100154] New: [9/10/11 Regression] ICE in gfc_conv_procedure_call, at fortran/trans-expr.c:6131 gscfq@t-online.de
@ 2021-04-20 20:58 ` anlauf at gcc dot gnu.org
  2021-04-20 21:21 ` anlauf at gcc dot gnu.org
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: anlauf at gcc dot gnu.org @ 2021-04-20 20:58 UTC (permalink / raw)
  To: gcc-bugs

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

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
                 CC|                            |anlauf at gcc dot gnu.org
   Last reconfirmed|                            |2021-04-20
   Target Milestone|---                         |9.4
             Status|UNCONFIRMED                 |NEW
           Priority|P3                          |P4

--- Comment #1 from anlauf at gcc dot gnu.org ---
Confirmed.

Workaround: add -std=f2018

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

* [Bug fortran/100154] [9/10/11 Regression] ICE in gfc_conv_procedure_call, at fortran/trans-expr.c:6131
  2021-04-20 17:36 [Bug fortran/100154] New: [9/10/11 Regression] ICE in gfc_conv_procedure_call, at fortran/trans-expr.c:6131 gscfq@t-online.de
  2021-04-20 20:58 ` [Bug fortran/100154] " anlauf at gcc dot gnu.org
@ 2021-04-20 21:21 ` anlauf at gcc dot gnu.org
  2021-04-21  6:19 ` marxin at gcc dot gnu.org
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: anlauf at gcc dot gnu.org @ 2021-04-20 21:21 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from anlauf at gcc dot gnu.org ---
Untested patch:

diff --git a/gcc/fortran/check.c b/gcc/fortran/check.c
index 82db8e4e1b2..df4409840d5 100644
--- a/gcc/fortran/check.c
+++ b/gcc/fortran/check.c
@@ -5730,6 +5731,15 @@ gfc_check_fgetput_sub (gfc_expr *c, gfc_expr *status)
   if (!kind_value_check (c, 0, gfc_default_character_kind))
     return false;

+  if (c->expr_type != EXPR_VARIABLE
+      && strcmp (gfc_current_intrinsic, "fget") == 0)
+    {
+      gfc_error ("%qs argument of %qs intrinsic at %L must be a variable",
+                gfc_current_intrinsic_arg[0]->name,
+                gfc_current_intrinsic, &c->where);
+      return false;
+    }
+
   if (status == NULL)
     return true;

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

* [Bug fortran/100154] [9/10/11 Regression] ICE in gfc_conv_procedure_call, at fortran/trans-expr.c:6131
  2021-04-20 17:36 [Bug fortran/100154] New: [9/10/11 Regression] ICE in gfc_conv_procedure_call, at fortran/trans-expr.c:6131 gscfq@t-online.de
  2021-04-20 20:58 ` [Bug fortran/100154] " anlauf at gcc dot gnu.org
  2021-04-20 21:21 ` anlauf at gcc dot gnu.org
@ 2021-04-21  6:19 ` marxin at gcc dot gnu.org
  2021-04-21  8:51 ` burnus at gcc dot gnu.org
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-04-21  6:19 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marxin at gcc dot gnu.org,
                   |                            |tkoenig at gcc dot gnu.org

--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r9-3030-g056e6860b3a3f915.

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

* [Bug fortran/100154] [9/10/11 Regression] ICE in gfc_conv_procedure_call, at fortran/trans-expr.c:6131
  2021-04-20 17:36 [Bug fortran/100154] New: [9/10/11 Regression] ICE in gfc_conv_procedure_call, at fortran/trans-expr.c:6131 gscfq@t-online.de
                   ` (2 preceding siblings ...)
  2021-04-21  6:19 ` marxin at gcc dot gnu.org
@ 2021-04-21  8:51 ` burnus at gcc dot gnu.org
  2021-04-21 20:00 ` [Bug fortran/100154] [9/10/11/12 " anlauf at gcc dot gnu.org
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: burnus at gcc dot gnu.org @ 2021-04-21  8:51 UTC (permalink / raw)
  To: gcc-bugs

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

Tobias Burnus <burnus at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |burnus at gcc dot gnu.org

--- Comment #4 from Tobias Burnus <burnus at gcc dot gnu.org> ---
(In reply to anlauf from comment #2)
> Untested patch:
...
> +  if (c->expr_type != EXPR_VARIABLE

Will this also work with:

  character, target :: c
  n = fget(ptr_returning_func())
contains
  function ptr_returning_func() result(res)
    character, ptr :: res
    res => c
  end
end

as ptr_returning_func() (a function reference with data pointer result) is a
variable in the sense of the Fortran standard (F2018:R902)?

  * * *

  add_sym_1_intent ("fget", GFC_ISYM_FGET, CLASS_IMPURE, ACTUAL_NO, BT_INTEGER,
             di, GFC_STD_GNU, gfc_check_fgetput, NULL, gfc_resolve_fget,
             c, BT_CHARACTER, dc, REQUIRED, INTENT_OUT);

Do we need some generic check for INTENT_OUT to get passed something definable?

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

* [Bug fortran/100154] [9/10/11/12 Regression] ICE in gfc_conv_procedure_call, at fortran/trans-expr.c:6131
  2021-04-20 17:36 [Bug fortran/100154] New: [9/10/11 Regression] ICE in gfc_conv_procedure_call, at fortran/trans-expr.c:6131 gscfq@t-online.de
                   ` (3 preceding siblings ...)
  2021-04-21  8:51 ` burnus at gcc dot gnu.org
@ 2021-04-21 20:00 ` anlauf at gcc dot gnu.org
  2021-04-21 20:09 ` anlauf at gcc dot gnu.org
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: anlauf at gcc dot gnu.org @ 2021-04-21 20:00 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from anlauf at gcc dot gnu.org ---
Created attachment 50651
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50651&action=edit
WIP patch

This patch reuses variable_check() and as a bonus fixes the declarations
of the subroutine versions.  It also checks the length of the character
argument if known at compile time - it must not be 0.

It does not accept the testcase in comment#4.  This is possibly something
that could be handled in variable_check().

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

* [Bug fortran/100154] [9/10/11/12 Regression] ICE in gfc_conv_procedure_call, at fortran/trans-expr.c:6131
  2021-04-20 17:36 [Bug fortran/100154] New: [9/10/11 Regression] ICE in gfc_conv_procedure_call, at fortran/trans-expr.c:6131 gscfq@t-online.de
                   ` (4 preceding siblings ...)
  2021-04-21 20:00 ` [Bug fortran/100154] [9/10/11/12 " anlauf at gcc dot gnu.org
@ 2021-04-21 20:09 ` anlauf at gcc dot gnu.org
  2021-04-21 20:36 ` anlauf at gcc dot gnu.org
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: anlauf at gcc dot gnu.org @ 2021-04-21 20:09 UTC (permalink / raw)
  To: gcc-bugs

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

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #50651|0                           |1
        is obsolete|                            |

--- Comment #6 from anlauf at gcc dot gnu.org ---
Created attachment 50652
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50652&action=edit
WIP patch (corrected)

Oops, I attached the pre-WIP version...  Fixed now.

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

* [Bug fortran/100154] [9/10/11/12 Regression] ICE in gfc_conv_procedure_call, at fortran/trans-expr.c:6131
  2021-04-20 17:36 [Bug fortran/100154] New: [9/10/11 Regression] ICE in gfc_conv_procedure_call, at fortran/trans-expr.c:6131 gscfq@t-online.de
                   ` (5 preceding siblings ...)
  2021-04-21 20:09 ` anlauf at gcc dot gnu.org
@ 2021-04-21 20:36 ` anlauf at gcc dot gnu.org
  2021-04-21 20:55 ` anlauf at gcc dot gnu.org
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: anlauf at gcc dot gnu.org @ 2021-04-21 20:36 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from anlauf at gcc dot gnu.org ---
(In reply to Tobias Burnus from comment #4)
> as ptr_returning_func() (a function reference with data pointer result) is a
> variable in the sense of the Fortran standard (F2018:R902)?

Do you think the following is the right thing?

diff --git a/gcc/fortran/check.c b/gcc/fortran/check.c
index 82db8e4e1b2..2c34c2b6786 100644
--- a/gcc/fortran/check.c
+++ b/gcc/fortran/check.c
@@ -1055,6 +1055,12 @@ variable_check (gfc_expr *e, int n, bool allow_proc)
          return true;
     }

+  /* F2018:R902: function pointer having a data pointer result.  */
+  if (e->expr_type == EXPR_FUNCTION
+      && e->symtree->n.sym->attr.flavor == FL_PROCEDURE
+      && e->symtree->n.sym->attr.pointer)
+    return true;
+
   gfc_error ("%qs argument of %qs intrinsic at %L must be a variable",
             gfc_current_intrinsic_arg[n]->name, gfc_current_intrinsic,
&e->where);


That is sort of independent of the other parts of the patch, but would be
needed for a full fix.

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

* [Bug fortran/100154] [9/10/11/12 Regression] ICE in gfc_conv_procedure_call, at fortran/trans-expr.c:6131
  2021-04-20 17:36 [Bug fortran/100154] New: [9/10/11 Regression] ICE in gfc_conv_procedure_call, at fortran/trans-expr.c:6131 gscfq@t-online.de
                   ` (6 preceding siblings ...)
  2021-04-21 20:36 ` anlauf at gcc dot gnu.org
@ 2021-04-21 20:55 ` anlauf at gcc dot gnu.org
  2021-04-22 21:06 ` anlauf at gcc dot gnu.org
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: anlauf at gcc dot gnu.org @ 2021-04-21 20:55 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from anlauf at gcc dot gnu.org ---
(In reply to anlauf from comment #7)
> Do you think the following is the right thing?

Correction:

diff --git a/gcc/fortran/check.c b/gcc/fortran/check.c
index 82db8e4e1b2..e1ec1c610e8 100644
--- a/gcc/fortran/check.c
+++ b/gcc/fortran/check.c
@@ -1055,6 +1055,13 @@ variable_check (gfc_expr *e, int n, bool allow_proc)
          return true;
     }

+  /* F2018:R902: function reference having a data pointer result.  */
+  if (e->expr_type == EXPR_FUNCTION
+      && e->symtree->n.sym->attr.flavor == FL_PROCEDURE
+      && e->symtree->n.sym->attr.function
+      && e->symtree->n.sym->attr.pointer)
+    return true;
+
   gfc_error ("%qs argument of %qs intrinsic at %L must be a variable",
             gfc_current_intrinsic_arg[n]->name, gfc_current_intrinsic,
&e->where);

It's getting late...

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

* [Bug fortran/100154] [9/10/11/12 Regression] ICE in gfc_conv_procedure_call, at fortran/trans-expr.c:6131
  2021-04-20 17:36 [Bug fortran/100154] New: [9/10/11 Regression] ICE in gfc_conv_procedure_call, at fortran/trans-expr.c:6131 gscfq@t-online.de
                   ` (7 preceding siblings ...)
  2021-04-21 20:55 ` anlauf at gcc dot gnu.org
@ 2021-04-22 21:06 ` anlauf at gcc dot gnu.org
  2021-04-24 18:52 ` cvs-commit at gcc dot gnu.org
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: anlauf at gcc dot gnu.org @ 2021-04-22 21:06 UTC (permalink / raw)
  To: gcc-bugs

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

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |rejects-valid

--- Comment #9 from anlauf at gcc dot gnu.org ---
Submitted: https://gcc.gnu.org/pipermail/fortran/2021-April/055977.html

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

* [Bug fortran/100154] [9/10/11/12 Regression] ICE in gfc_conv_procedure_call, at fortran/trans-expr.c:6131
  2021-04-20 17:36 [Bug fortran/100154] New: [9/10/11 Regression] ICE in gfc_conv_procedure_call, at fortran/trans-expr.c:6131 gscfq@t-online.de
                   ` (8 preceding siblings ...)
  2021-04-22 21:06 ` anlauf at gcc dot gnu.org
@ 2021-04-24 18:52 ` cvs-commit at gcc dot gnu.org
  2021-04-24 19:48 ` anlauf at gcc dot gnu.org
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-04-24 18:52 UTC (permalink / raw)
  To: gcc-bugs

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

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

https://gcc.gnu.org/g:d0e7833b94953ba6b4a915150666969ad9fc66af

commit r12-107-gd0e7833b94953ba6b4a915150666969ad9fc66af
Author: Harald Anlauf <anlauf@gmx.de>
Date:   Sat Apr 24 20:51:41 2021 +0200

    PR fortran/100154 - ICE in gfc_conv_procedure_call, at
fortran/trans-expr.c:6131

    Add appropriate static checks for the character and status arguments to
    the GNU Fortran intrinsic extensions fget[c], fput[c].  Extend variable
    check to allow a function reference having a data pointer result.

    gcc/fortran/ChangeLog:

            PR fortran/100154
            * check.c (variable_check): Allow function reference having a data
            pointer result.
            (arg_strlen_is_zero): New function.
            (gfc_check_fgetputc_sub): Add static check of character and status
            arguments.
            (gfc_check_fgetput_sub): Likewise.
            * intrinsic.c (add_subroutines): Fix argument name for the
            character argument to intrinsic subroutines fget[c], fput[c].

    gcc/testsuite/ChangeLog:

            PR fortran/100154
            * gfortran.dg/pr100154.f90: New test.

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

* [Bug fortran/100154] [9/10/11/12 Regression] ICE in gfc_conv_procedure_call, at fortran/trans-expr.c:6131
  2021-04-20 17:36 [Bug fortran/100154] New: [9/10/11 Regression] ICE in gfc_conv_procedure_call, at fortran/trans-expr.c:6131 gscfq@t-online.de
                   ` (9 preceding siblings ...)
  2021-04-24 18:52 ` cvs-commit at gcc dot gnu.org
@ 2021-04-24 19:48 ` anlauf at gcc dot gnu.org
  2021-04-27 21:13 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: anlauf at gcc dot gnu.org @ 2021-04-24 19:48 UTC (permalink / raw)
  To: gcc-bugs

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

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |anlauf at gcc dot gnu.org

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

* [Bug fortran/100154] [9/10/11/12 Regression] ICE in gfc_conv_procedure_call, at fortran/trans-expr.c:6131
  2021-04-20 17:36 [Bug fortran/100154] New: [9/10/11 Regression] ICE in gfc_conv_procedure_call, at fortran/trans-expr.c:6131 gscfq@t-online.de
                   ` (10 preceding siblings ...)
  2021-04-24 19:48 ` anlauf at gcc dot gnu.org
@ 2021-04-27 21:13 ` cvs-commit at gcc dot gnu.org
  2021-04-27 21:29 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-04-27 21:13 UTC (permalink / raw)
  To: gcc-bugs

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

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

https://gcc.gnu.org/g:3efd52599ae47e8084f9485cd4c84b17419273ba

commit r11-8307-g3efd52599ae47e8084f9485cd4c84b17419273ba
Author: Harald Anlauf <anlauf@gmx.de>
Date:   Sat Apr 24 20:51:41 2021 +0200

    PR fortran/100154 - ICE in gfc_conv_procedure_call, at
fortran/trans-expr.c:6131

    Add appropriate static checks for the character and status arguments to
    the GNU Fortran intrinsic extensions fget[c], fput[c].  Extend variable
    check to allow a function reference having a data pointer result.

    gcc/fortran/ChangeLog:

            PR fortran/100154
            * check.c (variable_check): Allow function reference having a data
            pointer result.
            (arg_strlen_is_zero): New function.
            (gfc_check_fgetputc_sub): Add static check of character and status
            arguments.
            (gfc_check_fgetput_sub): Likewise.
            * intrinsic.c (add_subroutines): Fix argument name for the
            character argument to intrinsic subroutines fget[c], fput[c].

    gcc/testsuite/ChangeLog:

            PR fortran/100154
            * gfortran.dg/pr100154.f90: New test.

    (cherry picked from commit d0e7833b94953ba6b4a915150666969ad9fc66af)

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

* [Bug fortran/100154] [9/10/11/12 Regression] ICE in gfc_conv_procedure_call, at fortran/trans-expr.c:6131
  2021-04-20 17:36 [Bug fortran/100154] New: [9/10/11 Regression] ICE in gfc_conv_procedure_call, at fortran/trans-expr.c:6131 gscfq@t-online.de
                   ` (11 preceding siblings ...)
  2021-04-27 21:13 ` cvs-commit at gcc dot gnu.org
@ 2021-04-27 21:29 ` cvs-commit at gcc dot gnu.org
  2021-04-27 21:41 ` cvs-commit at gcc dot gnu.org
  2021-04-27 21:42 ` anlauf at gcc dot gnu.org
  14 siblings, 0 replies; 16+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-04-27 21:29 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 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:e06c76270de946c56e9b38a7a87532d7eb72298a

commit r10-9773-ge06c76270de946c56e9b38a7a87532d7eb72298a
Author: Harald Anlauf <anlauf@gmx.de>
Date:   Sat Apr 24 20:51:41 2021 +0200

    PR fortran/100154 - ICE in gfc_conv_procedure_call, at
fortran/trans-expr.c:6131

    Add appropriate static checks for the character and status arguments to
    the GNU Fortran intrinsic extensions fget[c], fput[c].  Extend variable
    check to allow a function reference having a data pointer result.

    gcc/fortran/ChangeLog:

            PR fortran/100154
            * check.c (variable_check): Allow function reference having a data
            pointer result.
            (arg_strlen_is_zero): New function.
            (gfc_check_fgetputc_sub): Add static check of character and status
            arguments.
            (gfc_check_fgetput_sub): Likewise.
            * intrinsic.c (add_subroutines): Fix argument name for the
            character argument to intrinsic subroutines fget[c], fput[c].

    gcc/testsuite/ChangeLog:

            PR fortran/100154
            * gfortran.dg/pr100154.f90: New test.

    (cherry picked from commit d0e7833b94953ba6b4a915150666969ad9fc66af)

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

* [Bug fortran/100154] [9/10/11/12 Regression] ICE in gfc_conv_procedure_call, at fortran/trans-expr.c:6131
  2021-04-20 17:36 [Bug fortran/100154] New: [9/10/11 Regression] ICE in gfc_conv_procedure_call, at fortran/trans-expr.c:6131 gscfq@t-online.de
                   ` (12 preceding siblings ...)
  2021-04-27 21:29 ` cvs-commit at gcc dot gnu.org
@ 2021-04-27 21:41 ` cvs-commit at gcc dot gnu.org
  2021-04-27 21:42 ` anlauf at gcc dot gnu.org
  14 siblings, 0 replies; 16+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-04-27 21:41 UTC (permalink / raw)
  To: gcc-bugs

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

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

https://gcc.gnu.org/g:21992a791aded6d818da39079546c067f3362e8b

commit r9-9469-g21992a791aded6d818da39079546c067f3362e8b
Author: Harald Anlauf <anlauf@gmx.de>
Date:   Sat Apr 24 20:51:41 2021 +0200

    PR fortran/100154 - ICE in gfc_conv_procedure_call, at
fortran/trans-expr.c:6131

    Add appropriate static checks for the character and status arguments to
    the GNU Fortran intrinsic extensions fget[c], fput[c].  Extend variable
    check to allow a function reference having a data pointer result.

    gcc/fortran/ChangeLog:

            PR fortran/100154
            * check.c (variable_check): Allow function reference having a data
            pointer result.
            (arg_strlen_is_zero): New function.
            (gfc_check_fgetputc_sub): Add static check of character and status
            arguments.
            (gfc_check_fgetput_sub): Likewise.
            * intrinsic.c (add_subroutines): Fix argument name for the
            character argument to intrinsic subroutines fget[c], fput[c].

    gcc/testsuite/ChangeLog:

            PR fortran/100154
            * gfortran.dg/pr100154.f90: New test.

    (cherry picked from commit d0e7833b94953ba6b4a915150666969ad9fc66af)

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

* [Bug fortran/100154] [9/10/11/12 Regression] ICE in gfc_conv_procedure_call, at fortran/trans-expr.c:6131
  2021-04-20 17:36 [Bug fortran/100154] New: [9/10/11 Regression] ICE in gfc_conv_procedure_call, at fortran/trans-expr.c:6131 gscfq@t-online.de
                   ` (13 preceding siblings ...)
  2021-04-27 21:41 ` cvs-commit at gcc dot gnu.org
@ 2021-04-27 21:42 ` anlauf at gcc dot gnu.org
  14 siblings, 0 replies; 16+ messages in thread
From: anlauf at gcc dot gnu.org @ 2021-04-27 21:42 UTC (permalink / raw)
  To: gcc-bugs

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

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #14 from anlauf at gcc dot gnu.org ---
Fixed on mainline for gcc-12, and on all affected branches (9/10/11).  Closing.

Thanks for the report!

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

end of thread, other threads:[~2021-04-27 21:42 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-20 17:36 [Bug fortran/100154] New: [9/10/11 Regression] ICE in gfc_conv_procedure_call, at fortran/trans-expr.c:6131 gscfq@t-online.de
2021-04-20 20:58 ` [Bug fortran/100154] " anlauf at gcc dot gnu.org
2021-04-20 21:21 ` anlauf at gcc dot gnu.org
2021-04-21  6:19 ` marxin at gcc dot gnu.org
2021-04-21  8:51 ` burnus at gcc dot gnu.org
2021-04-21 20:00 ` [Bug fortran/100154] [9/10/11/12 " anlauf at gcc dot gnu.org
2021-04-21 20:09 ` anlauf at gcc dot gnu.org
2021-04-21 20:36 ` anlauf at gcc dot gnu.org
2021-04-21 20:55 ` anlauf at gcc dot gnu.org
2021-04-22 21:06 ` anlauf at gcc dot gnu.org
2021-04-24 18:52 ` cvs-commit at gcc dot gnu.org
2021-04-24 19:48 ` anlauf at gcc dot gnu.org
2021-04-27 21:13 ` cvs-commit at gcc dot gnu.org
2021-04-27 21:29 ` cvs-commit at gcc dot gnu.org
2021-04-27 21:41 ` cvs-commit at gcc dot gnu.org
2021-04-27 21:42 ` 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).