public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/104332] New: [9/10/11/12 Regression] ICE in resolve_symbol, at fortran/resolve.cc:15815
@ 2022-02-01 17:41 gscfq@t-online.de
  2022-02-01 17:42 ` [Bug fortran/104332] " gscfq@t-online.de
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: gscfq@t-online.de @ 2022-02-01 17:41 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 104332
           Summary: [9/10/11/12 Regression] ICE in resolve_symbol, at
                    fortran/resolve.cc:15815
           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: ---

Affects versions down to r8 (ifort/ifx rejects it) :


$ cat z1.f90
block data
   bind(c) a
end


$ gfortran-7 -c z1.f90
$
$ gfortran-12-20220130 -c z1.f90
f951: internal compiler error: Segmentation fault
0xcc655f crash_signal
        ../../gcc/toplev.cc:322
0x76b037 resolve_symbol
        ../../gcc/fortran/resolve.cc:15815
0x789ca2 do_traverse_symtree
        ../../gcc/fortran/symbol.cc:4174
0x76e024 resolve_types
        ../../gcc/fortran/resolve.cc:17455
0x7694bc gfc_resolve(gfc_namespace*)
        ../../gcc/fortran/resolve.cc:17570
0x7515f2 gfc_parse_file()
        ../../gcc/fortran/parse.cc:6792
0x79eecf gfc_be_parse_file
        ../../gcc/fortran/f95-lang.cc:216

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

* [Bug fortran/104332] [9/10/11/12 Regression] ICE in resolve_symbol, at fortran/resolve.cc:15815
  2022-02-01 17:41 [Bug fortran/104332] New: [9/10/11/12 Regression] ICE in resolve_symbol, at fortran/resolve.cc:15815 gscfq@t-online.de
@ 2022-02-01 17:42 ` gscfq@t-online.de
  2022-02-01 19:14 ` kargl at gcc dot gnu.org
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: gscfq@t-online.de @ 2022-02-01 17:42 UTC (permalink / raw)
  To: gcc-bugs

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

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

Note that this addition gives an ICE down to at least r5 for some reasons :

$ cat z3.f90
block data
   real, bind(c) :: a
end block data

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

* [Bug fortran/104332] [9/10/11/12 Regression] ICE in resolve_symbol, at fortran/resolve.cc:15815
  2022-02-01 17:41 [Bug fortran/104332] New: [9/10/11/12 Regression] ICE in resolve_symbol, at fortran/resolve.cc:15815 gscfq@t-online.de
  2022-02-01 17:42 ` [Bug fortran/104332] " gscfq@t-online.de
@ 2022-02-01 19:14 ` kargl at gcc dot gnu.org
  2022-02-01 20:04 ` kargl at gcc dot gnu.org
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: kargl at gcc dot gnu.org @ 2022-02-01 19:14 UTC (permalink / raw)
  To: gcc-bugs

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

kargl at gcc dot gnu.org changed:

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

--- Comment #2 from kargl at gcc dot gnu.org ---
(In reply to G. Steinmetz from comment #1)
> Note that this addition gives an ICE down to at least r5 for some reasons :
> 
> $ cat z3.f90
> block data
>    real, bind(c) :: a
> end block data

This is fixed by

diff --git a/gcc/fortran/symbol.cc b/gcc/fortran/symbol.cc
index 7a80dfd063b..8f9a2bb4d95 100644
--- a/gcc/fortran/symbol.cc
+++ b/gcc/fortran/symbol.cc
@@ -481,6 +481,9 @@ gfc_check_conflict (symbol_attribute *attr, const char
*name, locus *where)
        a1 = publik;
       if (attr->intent != INTENT_UNKNOWN)
        a1 = intent;
+      /* F2018:C1416. */
+      if (attr->is_bind_c != INTENT_UNKNOWN)
+       a1 = is_bind_c;

       if (a1 != NULL)
        {

But, I think that there are conflicts in the Fortran standard.
Are these code snippets equivalent?

BLOCK DATA
   BIND(C) :: A
END BLOCK DATA

BLOCK DATA
   REAL :: A
   BIND(C) :: A
END BLOCK DATA

BLOCK DATA
   REAL, BIND(C) :: A
END BLOCK DATA

If yes, do C1415 and C1416 conflict?

C1415 (R1420) A block-data specification-part shall contain
      only derived-type definitions and ..., BIND, ..., and
      type declaration statements.

C1416 (R1420) A type declaration statement in a block-data
      specification-part shall not contain ALLOCATABLE, EXTERNAL,
      or BIND attribute specifiers.

In fact, does C1415 conflict with C819?

C819 A variable with the BIND attribute shall be declared in
     the specification part of a module.

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

* [Bug fortran/104332] [9/10/11/12 Regression] ICE in resolve_symbol, at fortran/resolve.cc:15815
  2022-02-01 17:41 [Bug fortran/104332] New: [9/10/11/12 Regression] ICE in resolve_symbol, at fortran/resolve.cc:15815 gscfq@t-online.de
  2022-02-01 17:42 ` [Bug fortran/104332] " gscfq@t-online.de
  2022-02-01 19:14 ` kargl at gcc dot gnu.org
@ 2022-02-01 20:04 ` kargl at gcc dot gnu.org
  2022-02-01 20:04 ` kargl at gcc dot gnu.org
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: kargl at gcc dot gnu.org @ 2022-02-01 20:04 UTC (permalink / raw)
  To: gcc-bugs

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

kargl at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2022-02-01

--- Comment #3 from kargl at gcc dot gnu.org ---
(In reply to G. Steinmetz from comment #0)
> Affects versions down to r8 (ifort/ifx rejects it) :
> 
> 
> $ cat z1.f90
> block data
>    bind(c) a
> end
> 

This fixes the ICE by avoiding a NULL pointer dereference.

diff --git a/gcc/fortran/resolve.cc b/gcc/fortran/resolve.cc
index 835a4783718..0ea68c707a0 100644
--- a/gcc/fortran/resolve.cc
+++ b/gcc/fortran/resolve.cc 
@@ -15812,8 +15815,9 @@ resolve_symbol (gfc_symbol *sym)

       /* First, make sure the variable is declared at the
         module-level scope (J3/04-007, Section 15.3).  */
-      if (sym->ns->proc_name->attr.flavor != FL_MODULE &&
-          sym->attr.in_common == 0)
+      if (sym->ns->proc_name
+         && sym->ns->proc_name->attr.flavor != FL_MODULE
+         && sym->attr.in_common == 0)
        {
          gfc_error ("Variable %qs at %L cannot be BIND(C) because it "
                     "is neither a COMMON block nor declared at the "

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

* [Bug fortran/104332] [9/10/11/12 Regression] ICE in resolve_symbol, at fortran/resolve.cc:15815
  2022-02-01 17:41 [Bug fortran/104332] New: [9/10/11/12 Regression] ICE in resolve_symbol, at fortran/resolve.cc:15815 gscfq@t-online.de
                   ` (2 preceding siblings ...)
  2022-02-01 20:04 ` kargl at gcc dot gnu.org
@ 2022-02-01 20:04 ` kargl at gcc dot gnu.org
  2022-02-01 20:53 ` sgk at troutmask dot apl.washington.edu
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: kargl at gcc dot gnu.org @ 2022-02-01 20:04 UTC (permalink / raw)
  To: gcc-bugs

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

kargl at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P4

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

* [Bug fortran/104332] [9/10/11/12 Regression] ICE in resolve_symbol, at fortran/resolve.cc:15815
  2022-02-01 17:41 [Bug fortran/104332] New: [9/10/11/12 Regression] ICE in resolve_symbol, at fortran/resolve.cc:15815 gscfq@t-online.de
                   ` (3 preceding siblings ...)
  2022-02-01 20:04 ` kargl at gcc dot gnu.org
@ 2022-02-01 20:53 ` sgk at troutmask dot apl.washington.edu
  2022-02-02  7:12 ` rguenth at gcc dot gnu.org
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: sgk at troutmask dot apl.washington.edu @ 2022-02-01 20:53 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Steve Kargl <sgk at troutmask dot apl.washington.edu> ---
On Tue, Feb 01, 2022 at 08:04:45PM +0000, kargl at gcc dot gnu.org wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104332
> 
> kargl at gcc dot gnu.org changed:
> 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>      Ever confirmed|0                           |1
>              Status|UNCONFIRMED                 |NEW
>    Last reconfirmed|                            |2022-02-01
> 
> --- Comment #3 from kargl at gcc dot gnu.org ---
> (In reply to G. Steinmetz from comment #0)
> > Affects versions down to r8 (ifort/ifx rejects it) :
> > 
> > 
> > $ cat z1.f90
> > block data
> >    bind(c) a
> > end
> > 
> 
> This fixes the ICE by avoiding a NULL pointer dereference.
> 
> diff --git a/gcc/fortran/resolve.cc b/gcc/fortran/resolve.cc
> index 835a4783718..0ea68c707a0 100644
> --- a/gcc/fortran/resolve.cc
> +++ b/gcc/fortran/resolve.cc 
> @@ -15812,8 +15815,9 @@ resolve_symbol (gfc_symbol *sym)
> 
>        /* First, make sure the variable is declared at the
>          module-level scope (J3/04-007, Section 15.3).  */
> -      if (sym->ns->proc_name->attr.flavor != FL_MODULE &&
> -          sym->attr.in_common == 0)
> +      if (sym->ns->proc_name
> +         && sym->ns->proc_name->attr.flavor != FL_MODULE
> +         && sym->attr.in_common == 0)
>         {
>           gfc_error ("Variable %qs at %L cannot be BIND(C) because it "
>                      "is neither a COMMON block nor declared at the "

OK. So, the above stops the ICE, but allows the code to compile,
which is bad.  The code is invalid by C819.  From C1415, the 
BIND statement would apply to a common block.  Thus, the following
is valid code

block data
   common /a/x
   bind(c) :: /a/
end block data

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

* [Bug fortran/104332] [9/10/11/12 Regression] ICE in resolve_symbol, at fortran/resolve.cc:15815
  2022-02-01 17:41 [Bug fortran/104332] New: [9/10/11/12 Regression] ICE in resolve_symbol, at fortran/resolve.cc:15815 gscfq@t-online.de
                   ` (4 preceding siblings ...)
  2022-02-01 20:53 ` sgk at troutmask dot apl.washington.edu
@ 2022-02-02  7:12 ` rguenth at gcc dot gnu.org
  2022-05-27  9:47 ` [Bug fortran/104332] [10/11/12/13 " rguenth at gcc dot gnu.org
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-02-02  7:12 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |9.5

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

* [Bug fortran/104332] [10/11/12/13 Regression] ICE in resolve_symbol,  at fortran/resolve.cc:15815
  2022-02-01 17:41 [Bug fortran/104332] New: [9/10/11/12 Regression] ICE in resolve_symbol, at fortran/resolve.cc:15815 gscfq@t-online.de
                   ` (5 preceding siblings ...)
  2022-02-02  7:12 ` rguenth at gcc dot gnu.org
@ 2022-05-27  9:47 ` rguenth at gcc dot gnu.org
  2022-06-28 10:47 ` jakub at gcc dot gnu.org
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 16+ 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=104332

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

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

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 9 branch is being closed

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

* [Bug fortran/104332] [10/11/12/13 Regression] ICE in resolve_symbol,  at fortran/resolve.cc:15815
  2022-02-01 17:41 [Bug fortran/104332] New: [9/10/11/12 Regression] ICE in resolve_symbol, at fortran/resolve.cc:15815 gscfq@t-online.de
                   ` (6 preceding siblings ...)
  2022-05-27  9:47 ` [Bug fortran/104332] [10/11/12/13 " rguenth at gcc dot gnu.org
@ 2022-06-28 10:47 ` jakub at gcc dot gnu.org
  2023-03-08 21:59 ` anlauf at gcc dot gnu.org
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-06-28 10:47 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

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

--- Comment #6 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] 16+ messages in thread

* [Bug fortran/104332] [10/11/12/13 Regression] ICE in resolve_symbol, at fortran/resolve.cc:15815
  2022-02-01 17:41 [Bug fortran/104332] New: [9/10/11/12 Regression] ICE in resolve_symbol, at fortran/resolve.cc:15815 gscfq@t-online.de
                   ` (7 preceding siblings ...)
  2022-06-28 10:47 ` jakub at gcc dot gnu.org
@ 2023-03-08 21:59 ` anlauf at gcc dot gnu.org
  2023-03-09 18:08 ` anlauf at gcc dot gnu.org
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: anlauf at gcc dot gnu.org @ 2023-03-08 21:59 UTC (permalink / raw)
  To: gcc-bugs

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

anlauf at gcc dot gnu.org changed:

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

--- Comment #7 from anlauf at gcc dot gnu.org ---
This adjustment of the logic also fixes the ICE and the accepts-invalid:

diff --git a/gcc/fortran/resolve.cc b/gcc/fortran/resolve.cc
index 2780c82c798..c7f42dd2a4d 100644
--- a/gcc/fortran/resolve.cc
+++ b/gcc/fortran/resolve.cc
@@ -15933,8 +15942,8 @@ resolve_symbol (gfc_symbol *sym)

       /* First, make sure the variable is declared at the
         module-level scope (J3/04-007, Section 15.3).  */
-      if (sym->ns->proc_name->attr.flavor != FL_MODULE &&
-          sym->attr.in_common == 0)
+      if (!(sym->ns->proc_name && sym->ns->proc_name->attr.flavor ==
FL_MODULE)
+         && sym->attr.in_common == 0)
        {
          gfc_error ("Variable %qs at %L cannot be BIND(C) because it "
                     "is neither a COMMON block nor declared at the "

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

* [Bug fortran/104332] [10/11/12/13 Regression] ICE in resolve_symbol, at fortran/resolve.cc:15815
  2022-02-01 17:41 [Bug fortran/104332] New: [9/10/11/12 Regression] ICE in resolve_symbol, at fortran/resolve.cc:15815 gscfq@t-online.de
                   ` (8 preceding siblings ...)
  2023-03-08 21:59 ` anlauf at gcc dot gnu.org
@ 2023-03-09 18:08 ` anlauf at gcc dot gnu.org
  2023-03-10 17:56 ` cvs-commit at gcc dot gnu.org
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: anlauf at gcc dot gnu.org @ 2023-03-09 18:08 UTC (permalink / raw)
  To: gcc-bugs

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

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

--- Comment #8 from anlauf at gcc dot gnu.org ---
Submitted: https://gcc.gnu.org/pipermail/fortran/2023-March/059067.html

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

* [Bug fortran/104332] [10/11/12/13 Regression] ICE in resolve_symbol, at fortran/resolve.cc:15815
  2022-02-01 17:41 [Bug fortran/104332] New: [9/10/11/12 Regression] ICE in resolve_symbol, at fortran/resolve.cc:15815 gscfq@t-online.de
                   ` (9 preceding siblings ...)
  2023-03-09 18:08 ` anlauf at gcc dot gnu.org
@ 2023-03-10 17:56 ` cvs-commit at gcc dot gnu.org
  2023-03-15 20:46 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-03-10 17:56 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 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:e20e5d9dc11b64e8eabce6803c91cb5768207083

commit r13-6592-ge20e5d9dc11b64e8eabce6803c91cb5768207083
Author: Harald Anlauf <anlauf@gmx.de>
Date:   Thu Mar 9 18:59:08 2023 +0100

    Fortran: fix ICE with bind(c) in block data [PR104332]

    gcc/fortran/ChangeLog:

            PR fortran/104332
            * resolve.cc (resolve_symbol): Avoid NULL pointer dereference while
            checking a symbol with the BIND(C) attribute.

    gcc/testsuite/ChangeLog:

            PR fortran/104332
            * gfortran.dg/bind_c_usage_34.f90: New test.

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

* [Bug fortran/104332] [10/11/12/13 Regression] ICE in resolve_symbol, at fortran/resolve.cc:15815
  2022-02-01 17:41 [Bug fortran/104332] New: [9/10/11/12 Regression] ICE in resolve_symbol, at fortran/resolve.cc:15815 gscfq@t-online.de
                   ` (10 preceding siblings ...)
  2023-03-10 17:56 ` cvs-commit at gcc dot gnu.org
@ 2023-03-15 20:46 ` cvs-commit at gcc dot gnu.org
  2023-03-17 20:40 ` 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 @ 2023-03-15 20:46 UTC (permalink / raw)
  To: gcc-bugs

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

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

https://gcc.gnu.org/g:21139744aff3a9cb751f046755abb02ece5b3dcf

commit r12-9265-g21139744aff3a9cb751f046755abb02ece5b3dcf
Author: Harald Anlauf <anlauf@gmx.de>
Date:   Thu Mar 9 18:59:08 2023 +0100

    Fortran: fix ICE with bind(c) in block data [PR104332]

    gcc/fortran/ChangeLog:

            PR fortran/104332
            * resolve.cc (resolve_symbol): Avoid NULL pointer dereference while
            checking a symbol with the BIND(C) attribute.

    gcc/testsuite/ChangeLog:

            PR fortran/104332
            * gfortran.dg/bind_c_usage_34.f90: New test.

    (cherry picked from commit e20e5d9dc11b64e8eabce6803c91cb5768207083)

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

* [Bug fortran/104332] [10/11/12/13 Regression] ICE in resolve_symbol, at fortran/resolve.cc:15815
  2022-02-01 17:41 [Bug fortran/104332] New: [9/10/11/12 Regression] ICE in resolve_symbol, at fortran/resolve.cc:15815 gscfq@t-online.de
                   ` (11 preceding siblings ...)
  2023-03-15 20:46 ` cvs-commit at gcc dot gnu.org
@ 2023-03-17 20:40 ` cvs-commit at gcc dot gnu.org
  2023-03-17 20:41 ` cvs-commit at gcc dot gnu.org
  2023-03-17 20:42 ` anlauf at gcc dot gnu.org
  14 siblings, 0 replies; 16+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-03-17 20:40 UTC (permalink / raw)
  To: gcc-bugs

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

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

commit r11-10583-g7ce83edf8ebbbc21b20aeed3a3ab06bb2e9e02cb
Author: Harald Anlauf <anlauf@gmx.de>
Date:   Thu Mar 9 18:59:08 2023 +0100

    Fortran: fix ICE with bind(c) in block data [PR104332]

    gcc/fortran/ChangeLog:

            PR fortran/104332
            * resolve.c (resolve_symbol): Avoid NULL pointer dereference while
            checking a symbol with the BIND(C) attribute.

    gcc/testsuite/ChangeLog:

            PR fortran/104332
            * gfortran.dg/bind_c_usage_34.f90: New test.

    (cherry picked from commit e20e5d9dc11b64e8eabce6803c91cb5768207083)

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

* [Bug fortran/104332] [10/11/12/13 Regression] ICE in resolve_symbol, at fortran/resolve.cc:15815
  2022-02-01 17:41 [Bug fortran/104332] New: [9/10/11/12 Regression] ICE in resolve_symbol, at fortran/resolve.cc:15815 gscfq@t-online.de
                   ` (12 preceding siblings ...)
  2023-03-17 20:40 ` cvs-commit at gcc dot gnu.org
@ 2023-03-17 20:41 ` cvs-commit at gcc dot gnu.org
  2023-03-17 20:42 ` anlauf at gcc dot gnu.org
  14 siblings, 0 replies; 16+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-03-17 20:41 UTC (permalink / raw)
  To: gcc-bugs

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

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

commit r10-11255-gc5cb9d8819eb9551d23f77e63cb3399115f0aab8
Author: Harald Anlauf <anlauf@gmx.de>
Date:   Thu Mar 9 18:59:08 2023 +0100

    Fortran: fix ICE with bind(c) in block data [PR104332]

    gcc/fortran/ChangeLog:

            PR fortran/104332
            * resolve.c (resolve_symbol): Avoid NULL pointer dereference while
            checking a symbol with the BIND(C) attribute.

    gcc/testsuite/ChangeLog:

            PR fortran/104332
            * gfortran.dg/bind_c_usage_34.f90: New test.

    (cherry picked from commit e20e5d9dc11b64e8eabce6803c91cb5768207083)

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

* [Bug fortran/104332] [10/11/12/13 Regression] ICE in resolve_symbol, at fortran/resolve.cc:15815
  2022-02-01 17:41 [Bug fortran/104332] New: [9/10/11/12 Regression] ICE in resolve_symbol, at fortran/resolve.cc:15815 gscfq@t-online.de
                   ` (13 preceding siblings ...)
  2023-03-17 20:41 ` cvs-commit at gcc dot gnu.org
@ 2023-03-17 20:42 ` anlauf at gcc dot gnu.org
  14 siblings, 0 replies; 16+ messages in thread
From: anlauf at gcc dot gnu.org @ 2023-03-17 20:42 UTC (permalink / raw)
  To: gcc-bugs

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

anlauf at gcc dot gnu.org changed:

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

--- Comment #13 from anlauf at gcc dot gnu.org ---
Fixed on all open branches.  Closing.

Thanks for the report!

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

end of thread, other threads:[~2023-03-17 20:42 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-01 17:41 [Bug fortran/104332] New: [9/10/11/12 Regression] ICE in resolve_symbol, at fortran/resolve.cc:15815 gscfq@t-online.de
2022-02-01 17:42 ` [Bug fortran/104332] " gscfq@t-online.de
2022-02-01 19:14 ` kargl at gcc dot gnu.org
2022-02-01 20:04 ` kargl at gcc dot gnu.org
2022-02-01 20:04 ` kargl at gcc dot gnu.org
2022-02-01 20:53 ` sgk at troutmask dot apl.washington.edu
2022-02-02  7:12 ` rguenth at gcc dot gnu.org
2022-05-27  9:47 ` [Bug fortran/104332] [10/11/12/13 " rguenth at gcc dot gnu.org
2022-06-28 10:47 ` jakub at gcc dot gnu.org
2023-03-08 21:59 ` anlauf at gcc dot gnu.org
2023-03-09 18:08 ` anlauf at gcc dot gnu.org
2023-03-10 17:56 ` cvs-commit at gcc dot gnu.org
2023-03-15 20:46 ` cvs-commit at gcc dot gnu.org
2023-03-17 20:40 ` cvs-commit at gcc dot gnu.org
2023-03-17 20:41 ` cvs-commit at gcc dot gnu.org
2023-03-17 20: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).