public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/105054] New: Using one kind of pointer functions causes the compiler to hang
@ 2022-03-25 13:02 arjen.markus895 at gmail dot com
  2022-03-25 13:45 ` [Bug fortran/105054] " mscfd at gmx dot net
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: arjen.markus895 at gmail dot com @ 2022-03-25 13:02 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 105054
           Summary: Using one kind of pointer functions causes the
                    compiler to hang
           Product: gcc
           Version: 11.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: arjen.markus895 at gmail dot com
  Target Milestone: ---

Created attachment 52686
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52686&action=edit
Program that demonstrates the bug

The attached program causes the gfortran, version 11.2.0, to hang whereas
version 10.2.0 produces a program that works correctly. (Note: Intel Fortran
oneAPI produces strange error messsages)

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

* [Bug fortran/105054] Using one kind of pointer functions causes the compiler to hang
  2022-03-25 13:02 [Bug fortran/105054] New: Using one kind of pointer functions causes the compiler to hang arjen.markus895 at gmail dot com
@ 2022-03-25 13:45 ` mscfd at gmx dot net
  2022-03-25 14:26 ` [Bug fortran/105054] [11/12 Regression] Using one kind of pointer functions causes the compiler to hang since r11-3029-g2b0df0a6ac79b34f marxin at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: mscfd at gmx dot net @ 2022-03-25 13:45 UTC (permalink / raw)
  To: gcc-bugs

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

martin <mscfd at gmx dot net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mscfd at gmx dot net

--- Comment #1 from martin <mscfd at gmx dot net> ---
Confirmed with the current development branch for gfortran-12.
Moreover, if I comment out the program beginning from line

 pointer_to_string(2) = '12345678901234567890'

to the end, (hence "pointer_to_string(1) = '1234567890'" is the last
uncommented line), then I get an ICE:

during RTL pass: expand
pointer_to_string.f90:20:26:

   20 | program chk_string_pointer
      |                          ^
internal compiler error: in expand_expr_real_1, at expr.cc:10585
0x68336a expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
        ../../gcc/expr.cc:10585
0x908991 expand_normal
        ../../gcc/expr.h:307
0x908991 do_compare_and_jump
        ../../gcc/dojump.cc:1253
0x90999a do_jump_1
        ../../gcc/dojump.cc:253
0x89f6c1 expand_gimple_cond
        ../../gcc/cfgexpand.cc:2645
0x89f6c1 expand_gimple_basic_block
        ../../gcc/cfgexpand.cc:5933
0x8a0536 execute
        ../../gcc/cfgexpand.cc:6806

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

* [Bug fortran/105054] [11/12 Regression] Using one kind of pointer functions causes the compiler to hang since r11-3029-g2b0df0a6ac79b34f
  2022-03-25 13:02 [Bug fortran/105054] New: Using one kind of pointer functions causes the compiler to hang arjen.markus895 at gmail dot com
  2022-03-25 13:45 ` [Bug fortran/105054] " mscfd at gmx dot net
@ 2022-03-25 14:26 ` marxin at gcc dot gnu.org
  2022-04-04 11:32 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-03-25 14:26 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
                 CC|                            |burnus at gcc dot gnu.org,
                   |                            |marxin at gcc dot gnu.org
   Last reconfirmed|                            |2022-03-25
     Ever confirmed|0                           |1
            Summary|Using one kind of pointer   |[11/12 Regression] Using
                   |functions causes the        |one kind of pointer
                   |compiler to hang            |functions causes the
                   |                            |compiler to hang since
                   |                            |r11-3029-g2b0df0a6ac79b34f

--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r11-3029-g2b0df0a6ac79b34f.

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

* [Bug fortran/105054] [11/12 Regression] Using one kind of pointer functions causes the compiler to hang since r11-3029-g2b0df0a6ac79b34f
  2022-03-25 13:02 [Bug fortran/105054] New: Using one kind of pointer functions causes the compiler to hang arjen.markus895 at gmail dot com
  2022-03-25 13:45 ` [Bug fortran/105054] " mscfd at gmx dot net
  2022-03-25 14:26 ` [Bug fortran/105054] [11/12 Regression] Using one kind of pointer functions causes the compiler to hang since r11-3029-g2b0df0a6ac79b34f marxin at gcc dot gnu.org
@ 2022-04-04 11:32 ` rguenth at gcc dot gnu.org
  2022-04-21  7:51 ` rguenth at gcc dot gnu.org
  2023-05-29 10:06 ` [Bug fortran/105054] [11/12/13/14 " jakub at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-04-04 11:32 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed for the hang.  It hangs in f95-lang.cc:poplevel which does

391       /* Clear out the meanings of the local variables of this level.  */
392
393       for (subblock_node = decl_chain; subblock_node;
394            subblock_node = DECL_CHAIN (subblock_node))
395         if (DECL_NAME (subblock_node) != 0)
396           /* If the identifier was used or addressed via a local extern
decl,
397              don't forget that fact.  */
398           if (DECL_EXTERNAL (subblock_node))
399             {
400               if (TREE_USED (subblock_node))
401                 TREE_USED (DECL_NAME (subblock_node)) = 1;
402               if (TREE_ADDRESSABLE (subblock_node))
403                 TREE_ADDRESSABLE (DECL_ASSEMBLER_NAME (subblock_node)) = 1;
404             }

and this loop never terminates.

(gdb) p decl_chain
$1 = <var_decl 0x7ffff6523d80 _F.DA1>
(gdb) p decl_chain->common.chain
$2 = <var_decl 0x7ffff6523c60 ._F.DA0>
(gdb) p decl_chain->common.chain->common.chain
$3 = <var_decl 0x7ffff6523cf0 _F.DA0>
(gdb) p decl_chain->common.chain->common.chain->common.chain 
$4 = <var_decl 0x7ffff6523c60 ._F.DA0>

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

* [Bug fortran/105054] [11/12 Regression] Using one kind of pointer functions causes the compiler to hang since r11-3029-g2b0df0a6ac79b34f
  2022-03-25 13:02 [Bug fortran/105054] New: Using one kind of pointer functions causes the compiler to hang arjen.markus895 at gmail dot com
                   ` (2 preceding siblings ...)
  2022-04-04 11:32 ` rguenth at gcc dot gnu.org
@ 2022-04-21  7:51 ` rguenth at gcc dot gnu.org
  2023-05-29 10:06 ` [Bug fortran/105054] [11/12/13/14 " jakub at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-04-21  7:51 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|11.3                        |11.4

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 11.3 is being released, retargeting bugs to GCC 11.4.

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

* [Bug fortran/105054] [11/12/13/14 Regression] Using one kind of pointer functions causes the compiler to hang since r11-3029-g2b0df0a6ac79b34f
  2022-03-25 13:02 [Bug fortran/105054] New: Using one kind of pointer functions causes the compiler to hang arjen.markus895 at gmail dot com
                   ` (3 preceding siblings ...)
  2022-04-21  7:51 ` rguenth at gcc dot gnu.org
@ 2023-05-29 10:06 ` jakub at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-05-29 10:06 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|11.4                        |11.5

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 11.4 is being released, retargeting bugs to GCC 11.5.

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

end of thread, other threads:[~2023-05-29 10:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-25 13:02 [Bug fortran/105054] New: Using one kind of pointer functions causes the compiler to hang arjen.markus895 at gmail dot com
2022-03-25 13:45 ` [Bug fortran/105054] " mscfd at gmx dot net
2022-03-25 14:26 ` [Bug fortran/105054] [11/12 Regression] Using one kind of pointer functions causes the compiler to hang since r11-3029-g2b0df0a6ac79b34f marxin at gcc dot gnu.org
2022-04-04 11:32 ` rguenth at gcc dot gnu.org
2022-04-21  7:51 ` rguenth at gcc dot gnu.org
2023-05-29 10:06 ` [Bug fortran/105054] [11/12/13/14 " jakub 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).