public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/96101] New: [9/10/11 Regression] ICE in fold_convert_loc, at fold-const.c:2398
@ 2020-07-07 17:18 gscfq@t-online.de
  2020-07-08  7:11 ` [Bug fortran/96101] " rguenth at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: gscfq@t-online.de @ 2020-07-07 17:18 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 96101
           Summary: [9/10/11 Regression] ICE in fold_convert_loc, at
                    fold-const.c:2398
           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: ---

Started with early r8 (before 20180525), r7 compiles it :


$ cat z1.f90
program p
   character(:), allocatable :: x
   x = 'abc'
   associate (y => ([x(:)]))
      print *, y
   end associate
end


$ gfortran-7 -c z1.f90
$
$ gfortran-11-20200705 -c z1.f90
z1.f90:5:0:

    5 |       print *, y
      |
internal compiler error: Segmentation fault
0xd6980f crash_signal
        ../../gcc/toplev.c:328
0x9d1760 contains_struct_check(tree_node*, tree_node_structure_enum, char
const*, int, char const*)
        ../../gcc/tree.h:3416
0x9d1760 fold_convert_loc(unsigned int, tree_node*, tree_node*)
        ../../gcc/fold-const.c:2398
0x750120 gfc_trans_create_temp_array(stmtblock_t*, stmtblock_t*, gfc_ss*,
tree_node*, tree_node*, bool, bool, bool, locus*)
        ../../gcc/fortran/trans-array.c:1415
0x75d797 gfc_conv_loop_setup(gfc_loopinfo*, locus*)
        ../../gcc/fortran/trans-array.c:5246
0x75dae2 gfc_conv_expr_descriptor(gfc_se*, gfc_expr*)
        ../../gcc/fortran/trans-array.c:7447
0x7de401 trans_associate_var
        ../../gcc/fortran/trans-stmt.c:1890
0x7e4af9 gfc_trans_block_construct(gfc_code*)
        ../../gcc/fortran/trans-stmt.c:2283
0x7463a7 trans_code
        ../../gcc/fortran/trans.c:1960
0x77d745 gfc_generate_function_code(gfc_namespace*)
        ../../gcc/fortran/trans-decl.c:6840
0x6f6026 translate_all_program_units
        ../../gcc/fortran/parse.c:6307
0x6f6026 gfc_parse_file()
        ../../gcc/fortran/parse.c:6546
0x74269f gfc_be_parse_file
        ../../gcc/fortran/f95-lang.c:212

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

* [Bug fortran/96101] [9/10/11 Regression] ICE in fold_convert_loc, at fold-const.c:2398
  2020-07-07 17:18 [Bug fortran/96101] New: [9/10/11 Regression] ICE in fold_convert_loc, at fold-const.c:2398 gscfq@t-online.de
@ 2020-07-08  7:11 ` rguenth at gcc dot gnu.org
  2020-07-08  7:30 ` marxin at gcc dot gnu.org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-07-08  7:11 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

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

* [Bug fortran/96101] [9/10/11 Regression] ICE in fold_convert_loc, at fold-const.c:2398
  2020-07-07 17:18 [Bug fortran/96101] New: [9/10/11 Regression] ICE in fold_convert_loc, at fold-const.c:2398 gscfq@t-online.de
  2020-07-08  7:11 ` [Bug fortran/96101] " rguenth at gcc dot gnu.org
@ 2020-07-08  7:30 ` marxin at gcc dot gnu.org
  2020-08-08 15:28 ` pault at gcc dot gnu.org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-07-08  7:30 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r6-3986-g38217d3ee7c6e1fe.

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

* [Bug fortran/96101] [9/10/11 Regression] ICE in fold_convert_loc, at fold-const.c:2398
  2020-07-07 17:18 [Bug fortran/96101] New: [9/10/11 Regression] ICE in fold_convert_loc, at fold-const.c:2398 gscfq@t-online.de
  2020-07-08  7:11 ` [Bug fortran/96101] " rguenth at gcc dot gnu.org
  2020-07-08  7:30 ` marxin at gcc dot gnu.org
@ 2020-08-08 15:28 ` pault at gcc dot gnu.org
  2020-08-09 17:18 ` pault at gcc dot gnu.org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pault at gcc dot gnu.org @ 2020-08-08 15:28 UTC (permalink / raw)
  To: gcc-bugs

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

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

Hi Martin,

As Gerhardt says, it compiles OK with version 7.4.1 20191027.

The patch you reference is dated 2015-10-18!

Cheers

Paul

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

* [Bug fortran/96101] [9/10/11 Regression] ICE in fold_convert_loc, at fold-const.c:2398
  2020-07-07 17:18 [Bug fortran/96101] New: [9/10/11 Regression] ICE in fold_convert_loc, at fold-const.c:2398 gscfq@t-online.de
                   ` (2 preceding siblings ...)
  2020-08-08 15:28 ` pault at gcc dot gnu.org
@ 2020-08-09 17:18 ` pault at gcc dot gnu.org
  2020-08-10 16:29 ` dominiq at lps dot ens.fr
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pault at gcc dot gnu.org @ 2020-08-09 17:18 UTC (permalink / raw)
  To: gcc-bugs

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

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 49032
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49032&action=edit
Patch for the PR

Regtests OK and is about as simple as it can get :-)

Paul

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

* [Bug fortran/96101] [9/10/11 Regression] ICE in fold_convert_loc, at fold-const.c:2398
  2020-07-07 17:18 [Bug fortran/96101] New: [9/10/11 Regression] ICE in fold_convert_loc, at fold-const.c:2398 gscfq@t-online.de
                   ` (3 preceding siblings ...)
  2020-08-09 17:18 ` pault at gcc dot gnu.org
@ 2020-08-10 16:29 ` dominiq at lps dot ens.fr
  2020-08-20 17:18 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: dominiq at lps dot ens.fr @ 2020-08-10 16:29 UTC (permalink / raw)
  To: gcc-bugs

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

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

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

--- Comment #4 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
The patch works as expected and even fixes pr91862.

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

* [Bug fortran/96101] [9/10/11 Regression] ICE in fold_convert_loc, at fold-const.c:2398
  2020-07-07 17:18 [Bug fortran/96101] New: [9/10/11 Regression] ICE in fold_convert_loc, at fold-const.c:2398 gscfq@t-online.de
                   ` (4 preceding siblings ...)
  2020-08-10 16:29 ` dominiq at lps dot ens.fr
@ 2020-08-20 17:18 ` cvs-commit at gcc dot gnu.org
  2020-12-28 14:56 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-08-20 17:18 UTC (permalink / raw)
  To: gcc-bugs

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

--- 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:300ef2fcc10e98359d14654be23bbb84a5d141e1

commit r11-2785-g300ef2fcc10e98359d14654be23bbb84a5d141e1
Author: Paul Thomas <pault@gcc.gnu.org>
Date:   Thu Aug 20 18:17:59 2020 +0100

    This patch fixes PRs 96100 and 96101.

    2020-08-20  Paul Thomas  <pault@gcc.gnu.org>

    gcc/fortran
            PR fortran/96100
            PR fortran/96101
            * trans-array.c (get_array_charlen): Tidy up the evaluation of
            the string length for array constructors. Avoid trailing array
            references. Ensure string lengths of deferred length components
            are set. For parentheses operator apply string  length to both
            the primary expression and the enclosed expression.

    gcc/testsuite/
            PR fortran/96100
            PR fortran/96101
            * gfortran.dg/char_length_23.f90: New test.

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

* [Bug fortran/96101] [9/10/11 Regression] ICE in fold_convert_loc, at fold-const.c:2398
  2020-07-07 17:18 [Bug fortran/96101] New: [9/10/11 Regression] ICE in fold_convert_loc, at fold-const.c:2398 gscfq@t-online.de
                   ` (5 preceding siblings ...)
  2020-08-20 17:18 ` cvs-commit at gcc dot gnu.org
@ 2020-12-28 14:56 ` cvs-commit at gcc dot gnu.org
  2020-12-28 15:16 ` cvs-commit at gcc dot gnu.org
  2020-12-28 16:53 ` pault at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-12-28 14:56 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Paul Thomas <pault@gcc.gnu.org>:

https://gcc.gnu.org/g:47c1d976146913fad43688d45727d0038de174c7

commit r10-9181-g47c1d976146913fad43688d45727d0038de174c7
Author: Paul Thomas <pault@gcc.gnu.org>
Date:   Thu Aug 20 18:17:59 2020 +0100

    This patch fixes PRs 96100 and 96101.

    2020-08-20  Paul Thomas  <pault@gcc.gnu.org>

    gcc/fortran
            PR fortran/96100
            PR fortran/96101
            * trans-array.c (get_array_charlen): Tidy up the evaluation of
            the string length for array constructors. Avoid trailing array
            references. Ensure string lengths of deferred length components
            are set. For parentheses operator apply string  length to both
            the primary expression and the enclosed expression.

    gcc/testsuite/
            PR fortran/96100
            PR fortran/96101
            * gfortran.dg/char_length_23.f90: New test.

    (cherry picked from commit 300ef2fcc10e98359d14654be23bbb84a5d141e1)

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

* [Bug fortran/96101] [9/10/11 Regression] ICE in fold_convert_loc, at fold-const.c:2398
  2020-07-07 17:18 [Bug fortran/96101] New: [9/10/11 Regression] ICE in fold_convert_loc, at fold-const.c:2398 gscfq@t-online.de
                   ` (6 preceding siblings ...)
  2020-12-28 14:56 ` cvs-commit at gcc dot gnu.org
@ 2020-12-28 15:16 ` cvs-commit at gcc dot gnu.org
  2020-12-28 16:53 ` pault at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-12-28 15:16 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-9 branch has been updated by Paul Thomas <pault@gcc.gnu.org>:

https://gcc.gnu.org/g:9db58db5b3986531475968dd383f13a3f925d7ae

commit r9-9136-g9db58db5b3986531475968dd383f13a3f925d7ae
Author: Paul Thomas <pault@gcc.gnu.org>
Date:   Thu Aug 20 18:17:59 2020 +0100

    This patch fixes PRs 96100 and 96101.

    2020-08-20  Paul Thomas  <pault@gcc.gnu.org>

    gcc/fortran
            PR fortran/96100
            PR fortran/96101
            * trans-array.c (get_array_charlen): Tidy up the evaluation of
            the string length for array constructors. Avoid trailing array
            references. Ensure string lengths of deferred length components
            are set. For parentheses operator apply string  length to both
            the primary expression and the enclosed expression.

    gcc/testsuite/
            PR fortran/96100
            PR fortran/96101
            * gfortran.dg/char_length_23.f90: New test.

    (cherry picked from commit 300ef2fcc10e98359d14654be23bbb84a5d141e1)

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

* [Bug fortran/96101] [9/10/11 Regression] ICE in fold_convert_loc, at fold-const.c:2398
  2020-07-07 17:18 [Bug fortran/96101] New: [9/10/11 Regression] ICE in fold_convert_loc, at fold-const.c:2398 gscfq@t-online.de
                   ` (7 preceding siblings ...)
  2020-12-28 15:16 ` cvs-commit at gcc dot gnu.org
@ 2020-12-28 16:53 ` pault at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: pault at gcc dot gnu.org @ 2020-12-28 16:53 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #8 from Paul Thomas <pault at gcc dot gnu.org> ---
Fixed on 9-11 branches.

Thanks for the report

Paul

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

end of thread, other threads:[~2020-12-28 16:53 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-07 17:18 [Bug fortran/96101] New: [9/10/11 Regression] ICE in fold_convert_loc, at fold-const.c:2398 gscfq@t-online.de
2020-07-08  7:11 ` [Bug fortran/96101] " rguenth at gcc dot gnu.org
2020-07-08  7:30 ` marxin at gcc dot gnu.org
2020-08-08 15:28 ` pault at gcc dot gnu.org
2020-08-09 17:18 ` pault at gcc dot gnu.org
2020-08-10 16:29 ` dominiq at lps dot ens.fr
2020-08-20 17:18 ` cvs-commit at gcc dot gnu.org
2020-12-28 14:56 ` cvs-commit at gcc dot gnu.org
2020-12-28 15:16 ` cvs-commit at gcc dot gnu.org
2020-12-28 16:53 ` pault 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).