public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/95708] New: [9/10/11 Regression] ICE in resolve_fl_procedure, at fortran/resolve.c:13002
@ 2020-06-16 18:52 gscfq@t-online.de
  2020-06-16 23:33 ` [Bug fortran/95708] " kargl at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: gscfq@t-online.de @ 2020-06-16 18:52 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 95708
           Summary: [9/10/11 Regression] ICE in resolve_fl_procedure, at
                    fortran/resolve.c:13002
           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: ---

Special case "team_number" gives an ICE down to r8, r7 rejects it :


$ cat z0.f90
program p
   procedure(num_images) :: g
end


$ cat z1.f90
program p
   procedure(team_number) :: g
end


$ gfortran-11-20200614 -c z0.f90
z0.f90:2:29:

    2 |    procedure(num_images) :: g
      |                             1
Error: Intrinsic procedure 'num_images' not allowed in PROCEDURE statement at
(1)


$ gfortran-11-20200614 -c z1.f90
f951: internal compiler error: Segmentation fault
0xbcdd2f crash_signal
        ../../gcc/toplev.c:328
0x6cf9fb resolve_fl_procedure
        ../../gcc/fortran/resolve.c:13002
0x6cf9fb resolve_symbol
        ../../gcc/fortran/resolve.c:15855
0x6cfeca resolve_procedure_interface
        ../../gcc/fortran/resolve.c:210
0x6cd526 resolve_symbol
        ../../gcc/fortran/resolve.c:15235
0x6eb7d2 do_traverse_symtree
        ../../gcc/fortran/symbol.c:4162
0x6d0a84 resolve_types
        ../../gcc/fortran/resolve.c:17175
0x6cc19c gfc_resolve(gfc_namespace*)
        ../../gcc/fortran/resolve.c:17290
0x6b42ec resolve_all_program_units
        ../../gcc/fortran/parse.c:6245
0x6b42ec gfc_parse_file()
        ../../gcc/fortran/parse.c:6492
0x70036f gfc_be_parse_file
        ../../gcc/fortran/f95-lang.c:212

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

* [Bug fortran/95708] [9/10/11 Regression] ICE in resolve_fl_procedure, at fortran/resolve.c:13002
  2020-06-16 18:52 [Bug fortran/95708] New: [9/10/11 Regression] ICE in resolve_fl_procedure, at fortran/resolve.c:13002 gscfq@t-online.de
@ 2020-06-16 23:33 ` kargl at gcc dot gnu.org
  2020-06-17  6:24 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: kargl at gcc dot gnu.org @ 2020-06-16 23:33 UTC (permalink / raw)
  To: gcc-bugs

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

kargl at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P4
                 CC|                            |kargl at gcc dot gnu.org
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2020-06-16
             Status|UNCONFIRMED                 |NEW

--- Comment #1 from kargl at gcc dot gnu.org ---
Built and tested against submitted code.   Not regression tested.

Index: gcc/fortran/intrinsic.c
===================================================================
--- gcc/fortran/intrinsic.c     (revision 280157)
+++ gcc/fortran/intrinsic.c     (working copy)
@@ -2733,7 +2733,8 @@ add_functions (void)

   make_generic ("null", GFC_ISYM_NULL, GFC_STD_F95);

-  add_sym_2 ("num_images", GFC_ISYM_NUM_IMAGES, CLASS_INQUIRY, ACTUAL_NO,
+  add_sym_2 ("num_images", GFC_ISYM_NUM_IMAGES, CLASS_TRANSFORMATIONAL,
+            ACTUAL_NO,
             BT_INTEGER, di, GFC_STD_F2008,
             gfc_check_num_images, gfc_simplify_num_images, NULL,
             dist, BT_INTEGER, di, OPTIONAL,
@@ -3174,7 +3175,7 @@ add_functions (void)
   make_generic ("tanh", GFC_ISYM_TANH, GFC_STD_F77);

   add_sym_1 ("team_number", GFC_ISYM_TEAM_NUMBER, CLASS_TRANSFORMATIONAL,
-            ACTUAL_YES, BT_INTEGER, di, GFC_STD_F2018,
+            ACTUAL_NO, BT_INTEGER, di, GFC_STD_F2018,
             gfc_check_team_number, NULL, gfc_resolve_team_number,
             team, BT_DERIVED, di, OPTIONAL);

Index: gcc/fortran/resolve.c
===================================================================
--- gcc/fortran/resolve.c       (revision 280157)
+++ gcc/fortran/resolve.c       (working copy)
@@ -12937,6 +12937,7 @@ resolve_fl_procedure (gfc_symbol *sym, int mp_flag)
        {
          if (arg->sym
              && arg->sym->ts.type == BT_DERIVED
+             && arg->sym->ts.u.derived
              && !arg->sym->ts.u.derived->attr.use_assoc
              && !gfc_check_symbol_access (arg->sym->ts.u.derived)
              && !gfc_notify_std (GFC_STD_F2003, "%qs is of a PRIVATE type "

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

* [Bug fortran/95708] [9/10/11 Regression] ICE in resolve_fl_procedure, at fortran/resolve.c:13002
  2020-06-16 18:52 [Bug fortran/95708] New: [9/10/11 Regression] ICE in resolve_fl_procedure, at fortran/resolve.c:13002 gscfq@t-online.de
  2020-06-16 23:33 ` [Bug fortran/95708] " kargl at gcc dot gnu.org
@ 2020-06-17  6:24 ` rguenth at gcc dot gnu.org
  2020-06-22 15:31 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-06-17  6:24 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |9.4

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

* [Bug fortran/95708] [9/10/11 Regression] ICE in resolve_fl_procedure, at fortran/resolve.c:13002
  2020-06-16 18:52 [Bug fortran/95708] New: [9/10/11 Regression] ICE in resolve_fl_procedure, at fortran/resolve.c:13002 gscfq@t-online.de
  2020-06-16 23:33 ` [Bug fortran/95708] " kargl at gcc dot gnu.org
  2020-06-17  6:24 ` rguenth at gcc dot gnu.org
@ 2020-06-22 15:31 ` cvs-commit at gcc dot gnu.org
  2020-06-23  6:36 ` markeggleston at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-06-22 15:31 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Mark Eggleston
<markeggleston@gcc.gnu.org>:

https://gcc.gnu.org/g:647340c92a042e8e6f7d004637f07060dbde49c0

commit r11-1586-g647340c92a042e8e6f7d004637f07060dbde49c0
Author: Mark Eggleston <markeggleston@gcc.gnu.org>
Date:   Mon Jun 22 13:35:01 2020 +0100

    Fortran  : ICE in resolve_fl_procedure PR95708

    Now issues an error "Intrinsic procedure 'num_images' not
    allowed in PROCEDURE" instead of an ICE.

    2020-06-22  Steven G. Kargl  <kargl@gcc.gnu.org>

    gcc/fortran/

            PR fortran/95708
            * intrinsic.c (add_functions): Replace CLASS_INQUIRY with
            CLASS_TRANSFORMATIONAL for intrinsic num_images.
            (make_generic): Replace ACTUAL_NO with ACTUAL_YES for
            intrinsic team_number.
            * resolve.c (resolve_fl_procedure): Check pointer ts.u.derived
            exists before using it.

    2020-06-22  Mark Eggleston  <markeggleston@gcc.gnu.org>

    gcc/testsuite/

            PR fortran/95708
            * gfortran.dg/pr95708.f90: New test.

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

* [Bug fortran/95708] [9/10/11 Regression] ICE in resolve_fl_procedure, at fortran/resolve.c:13002
  2020-06-16 18:52 [Bug fortran/95708] New: [9/10/11 Regression] ICE in resolve_fl_procedure, at fortran/resolve.c:13002 gscfq@t-online.de
                   ` (2 preceding siblings ...)
  2020-06-22 15:31 ` cvs-commit at gcc dot gnu.org
@ 2020-06-23  6:36 ` markeggleston at gcc dot gnu.org
  2020-06-23  7:38 ` cvs-commit at gcc dot gnu.org
  2020-06-23  8:45 ` cvs-commit at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: markeggleston at gcc dot gnu.org @ 2020-06-23  6:36 UTC (permalink / raw)
  To: gcc-bugs

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

markeggleston at gcc dot gnu.org changed:

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

--- Comment #3 from markeggleston at gcc dot gnu.org ---
Committed to master.

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

* [Bug fortran/95708] [9/10/11 Regression] ICE in resolve_fl_procedure, at fortran/resolve.c:13002
  2020-06-16 18:52 [Bug fortran/95708] New: [9/10/11 Regression] ICE in resolve_fl_procedure, at fortran/resolve.c:13002 gscfq@t-online.de
                   ` (3 preceding siblings ...)
  2020-06-23  6:36 ` markeggleston at gcc dot gnu.org
@ 2020-06-23  7:38 ` cvs-commit at gcc dot gnu.org
  2020-06-23  8:45 ` cvs-commit at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-06-23  7:38 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Mark Eggleston
<markeggleston@gcc.gnu.org>:

https://gcc.gnu.org/g:56dfd92cc3b43a97b7e50f7de6f417a87e43aaa9

commit r10-8346-g56dfd92cc3b43a97b7e50f7de6f417a87e43aaa9
Author: Mark Eggleston <markeggleston@gcc.gnu.org>
Date:   Mon Jun 22 13:35:01 2020 +0100

    Fortran  : ICE in resolve_fl_procedure PR95708

    Now issues an error "Intrinsic procedure 'num_images' not
    allowed in PROCEDURE" instead of an ICE.

    2020-06-22  Steven G. Kargl  <kargl@gcc.gnu.org>

    gcc/fortran/

            PR fortran/95708
            * intrinsic.c (add_functions): Replace CLASS_INQUIRY with
            CLASS_TRANSFORMATIONAL for intrinsic num_images.
            (make_generic): Replace ACTUAL_NO with ACTUAL_YES for
            intrinsic team_number.
            * resolve.c (resolve_fl_procedure): Check pointer ts.u.derived
            exists before using it.

    2020-06-22  Mark Eggleston  <markeggleston@gcc.gnu.org>

    gcc/testsuite/

            PR fortran/95708
            * gfortran.dg/pr95708.f90: New test.

    (cherry picked from commit 647340c92a042e8e6f7d004637f07060dbde49c0)

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

* [Bug fortran/95708] [9/10/11 Regression] ICE in resolve_fl_procedure, at fortran/resolve.c:13002
  2020-06-16 18:52 [Bug fortran/95708] New: [9/10/11 Regression] ICE in resolve_fl_procedure, at fortran/resolve.c:13002 gscfq@t-online.de
                   ` (4 preceding siblings ...)
  2020-06-23  7:38 ` cvs-commit at gcc dot gnu.org
@ 2020-06-23  8:45 ` cvs-commit at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-06-23  8:45 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-9 branch has been updated by Mark Eggleston
<markeggleston@gcc.gnu.org>:

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

commit r9-8690-geb9a24a6b6b2a020824b835e3a6ac0e52a5bdbd2
Author: Mark Eggleston <markeggleston@gcc.gnu.org>
Date:   Mon Jun 22 13:35:01 2020 +0100

    Fortran  : ICE in resolve_fl_procedure PR95708

    Now issues an error "Intrinsic procedure 'num_images' not
    allowed in PROCEDURE" instead of an ICE.

    2020-06-22  Steven G. Kargl  <kargl@gcc.gnu.org>

    gcc/fortran/

            PR fortran/95708
            * intrinsic.c (add_functions): Replace CLASS_INQUIRY with
            CLASS_TRANSFORMATIONAL for intrinsic num_images.
            (make_generic): Replace ACTUAL_NO with ACTUAL_YES for
            intrinsic team_number.
            * resolve.c (resolve_fl_procedure): Check pointer ts.u.derived
            exists before using it.

    2020-06-22  Mark Eggleston  <markeggleston@gcc.gnu.org>

    gcc/testsuite/

            PR fortran/95708
            * gfortran.dg/pr95708.f90: New test.

    (cherry picked from commit 647340c92a042e8e6f7d004637f07060dbde49c0)

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

end of thread, other threads:[~2020-06-23  8:45 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-16 18:52 [Bug fortran/95708] New: [9/10/11 Regression] ICE in resolve_fl_procedure, at fortran/resolve.c:13002 gscfq@t-online.de
2020-06-16 23:33 ` [Bug fortran/95708] " kargl at gcc dot gnu.org
2020-06-17  6:24 ` rguenth at gcc dot gnu.org
2020-06-22 15:31 ` cvs-commit at gcc dot gnu.org
2020-06-23  6:36 ` markeggleston at gcc dot gnu.org
2020-06-23  7:38 ` cvs-commit at gcc dot gnu.org
2020-06-23  8:45 ` cvs-commit 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).