public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/103505] New: ICE in compare_bound_mpz_t, at fortran/resolve.c:4587
@ 2021-11-30 18:47 gscfq@t-online.de
  2021-11-30 20:44 ` [Bug fortran/103505] " anlauf at gcc dot gnu.org
                   ` (15 more replies)
  0 siblings, 16 replies; 17+ messages in thread
From: gscfq@t-online.de @ 2021-11-30 18:47 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 103505
           Summary: ICE in compare_bound_mpz_t, at fortran/resolve.c:4587
           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: ---

Started with r8 :


$ cat z1.f90
program p
   integer, parameter :: a((2.)) = [4, 8]
   integer(a(1:1)) :: b
end


$ cat z2.f90
program p
   integer, parameter :: a((2.)) = [4, 8]
   print *, [integer(a(1:1)) :: 2]
end


$ cat z3.f90
program p
   integer, parameter :: a((2.)) = [4, 8]
   integer :: b(a(1:1))
end


$ gfortran-12-20211128 -c z1.f90
f951: internal compiler error: compare_bound_int(): Bad expression
0x7977b9 gfc_report_diagnostic
        ../../gcc/fortran/error.c:874
0x799327 gfc_internal_error(char const*, ...)
        ../../gcc/fortran/error.c:1494
0x807111 compare_bound_mpz_t
        ../../gcc/fortran/resolve.c:4587
0x80765c check_dimension
        ../../gcc/fortran/resolve.c:4770
0x81a51d compare_spec_to_ref
        ../../gcc/fortran/resolve.c:4835
0x81a51d resolve_array_ref
        ../../gcc/fortran/resolve.c:5126
0x81a51d gfc_resolve_ref(gfc_expr*)
        ../../gcc/fortran/resolve.c:5340
0x80a7a7 resolve_variable
        ../../gcc/fortran/resolve.c:5842
0x80a7a7 gfc_resolve_expr(gfc_expr*)
        ../../gcc/fortran/resolve.c:7168
0x79d694 gfc_reduce_init_expr(gfc_expr*)
        ../../gcc/fortran/expr.c:3130
0x7a0560 gfc_match_init_expr(gfc_expr**)
        ../../gcc/fortran/expr.c:3178
0x781265 gfc_match_kind_spec(gfc_typespec*, bool)
        ../../gcc/fortran/decl.c:3241
0x787ae9 gfc_match_decl_type_spec(gfc_typespec*, int)
        ../../gcc/fortran/decl.c:4672
0x78947c gfc_match_data_decl()
        ../../gcc/fortran/decl.c:6226
0x7f49c3 match_word
        ../../gcc/fortran/parse.c:67
0x7f49c3 decode_statement
        ../../gcc/fortran/parse.c:378
0x7f640a next_free
        ../../gcc/fortran/parse.c:1397
0x7f640a next_statement
        ../../gcc/fortran/parse.c:1629
0x7f7b2b parse_spec
        ../../gcc/fortran/parse.c:4168
0x7fae8c parse_progunit
        ../../gcc/fortran/parse.c:6179

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

* [Bug fortran/103505] ICE in compare_bound_mpz_t, at fortran/resolve.c:4587
  2021-11-30 18:47 [Bug fortran/103505] New: ICE in compare_bound_mpz_t, at fortran/resolve.c:4587 gscfq@t-online.de
@ 2021-11-30 20:44 ` anlauf at gcc dot gnu.org
  2021-11-30 20:48 ` kargl at gcc dot gnu.org
                   ` (14 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: anlauf at gcc dot gnu.org @ 2021-11-30 20:44 UTC (permalink / raw)
  To: gcc-bugs

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

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
                 CC|                            |anlauf at gcc dot gnu.org
   Last reconfirmed|                            |2021-11-30
     Ever confirmed|0                           |1

--- Comment #1 from anlauf at gcc dot gnu.org ---
How come we let pass a non-integer into the array spec?

program p
  integer, parameter :: a((2.)) = [4, 8]
end

  symtree: 'a'           || symbol: 'a'            
    type spec : (INTEGER 4)
    attributes: (PARAMETER IMPLICIT-SAVE DIMENSION)
    value: (/ 4 , 8 /)
    Array spec:(1 [0] AS_EXPLICIT 1 2.00000000 )


(Without the extra parentheses this does not happen...)

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

* [Bug fortran/103505] ICE in compare_bound_mpz_t, at fortran/resolve.c:4587
  2021-11-30 18:47 [Bug fortran/103505] New: ICE in compare_bound_mpz_t, at fortran/resolve.c:4587 gscfq@t-online.de
  2021-11-30 20:44 ` [Bug fortran/103505] " anlauf at gcc dot gnu.org
@ 2021-11-30 20:48 ` kargl at gcc dot gnu.org
  2021-12-01  9:25 ` [Bug fortran/103505] ICE in compare_bound_mpz_t, at fortran/resolve.c:4587 since r8-7594-g078c5aff5ed83e9c marxin at gcc dot gnu.org
                   ` (13 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: kargl at gcc dot gnu.org @ 2021-11-30 20:48 UTC (permalink / raw)
  To: gcc-bugs

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

kargl at gcc dot gnu.org changed:

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

--- Comment #2 from kargl at gcc dot gnu.org ---
diff --git a/gcc/fortran/array.c b/gcc/fortran/array.c
index 6552eaf3b0c..1b2f5b310a7 100644
--- a/gcc/fortran/array.c
+++ b/gcc/fortran/array.c
@@ -492,6 +492,9 @@ match_array_element_spec (gfc_array_spec *as)
   if (!gfc_expr_check_typed (*upper, gfc_current_ns, false))
     return AS_UNKNOWN;

+  if ((*upper)->expr_type != EXPR_CONSTANT)
+    gfc_simplify_expr (*upper,0);
+
   if (((*upper)->expr_type == EXPR_CONSTANT
        && (*upper)->ts.type != BT_INTEGER) ||
       ((*upper)->expr_type == EXPR_FUNCTION

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

* [Bug fortran/103505] ICE in compare_bound_mpz_t, at fortran/resolve.c:4587 since r8-7594-g078c5aff5ed83e9c
  2021-11-30 18:47 [Bug fortran/103505] New: ICE in compare_bound_mpz_t, at fortran/resolve.c:4587 gscfq@t-online.de
  2021-11-30 20:44 ` [Bug fortran/103505] " anlauf at gcc dot gnu.org
  2021-11-30 20:48 ` kargl at gcc dot gnu.org
@ 2021-12-01  9:25 ` marxin at gcc dot gnu.org
  2021-12-01 20:26 ` anlauf at gcc dot gnu.org
                   ` (12 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-12-01  9:25 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|ICE in compare_bound_mpz_t, |ICE in compare_bound_mpz_t,
                   |at fortran/resolve.c:4587   |at fortran/resolve.c:4587
                   |                            |since
                   |                            |r8-7594-g078c5aff5ed83e9c
                 CC|                            |marxin at gcc dot gnu.org

--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r8-7594-g078c5aff5ed83e9c.

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

* [Bug fortran/103505] ICE in compare_bound_mpz_t, at fortran/resolve.c:4587 since r8-7594-g078c5aff5ed83e9c
  2021-11-30 18:47 [Bug fortran/103505] New: ICE in compare_bound_mpz_t, at fortran/resolve.c:4587 gscfq@t-online.de
                   ` (2 preceding siblings ...)
  2021-12-01  9:25 ` [Bug fortran/103505] ICE in compare_bound_mpz_t, at fortran/resolve.c:4587 since r8-7594-g078c5aff5ed83e9c marxin at gcc dot gnu.org
@ 2021-12-01 20:26 ` anlauf at gcc dot gnu.org
  2021-12-01 21:00 ` sgk at troutmask dot apl.washington.edu
                   ` (11 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: anlauf at gcc dot gnu.org @ 2021-12-01 20:26 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from anlauf at gcc dot gnu.org ---
(In reply to kargl from comment #2)
> diff --git a/gcc/fortran/array.c b/gcc/fortran/array.c
> index 6552eaf3b0c..1b2f5b310a7 100644
> --- a/gcc/fortran/array.c
> +++ b/gcc/fortran/array.c
> @@ -492,6 +492,9 @@ match_array_element_spec (gfc_array_spec *as)
>    if (!gfc_expr_check_typed (*upper, gfc_current_ns, false))
>      return AS_UNKNOWN;
>  
> +  if ((*upper)->expr_type != EXPR_CONSTANT)
> +    gfc_simplify_expr (*upper,0);
> +
>    if (((*upper)->expr_type == EXPR_CONSTANT
>  	&& (*upper)->ts.type != BT_INTEGER) ||
>        ((*upper)->expr_type == EXPR_FUNCTION

There's a second place where this needs to be inserted for the real upper bound
to fix e.g.

  integer, parameter :: z(1:(2.)) = [4, 8]

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

* [Bug fortran/103505] ICE in compare_bound_mpz_t, at fortran/resolve.c:4587 since r8-7594-g078c5aff5ed83e9c
  2021-11-30 18:47 [Bug fortran/103505] New: ICE in compare_bound_mpz_t, at fortran/resolve.c:4587 gscfq@t-online.de
                   ` (3 preceding siblings ...)
  2021-12-01 20:26 ` anlauf at gcc dot gnu.org
@ 2021-12-01 21:00 ` sgk at troutmask dot apl.washington.edu
  2021-12-01 21:42 ` anlauf at gcc dot gnu.org
                   ` (10 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: sgk at troutmask dot apl.washington.edu @ 2021-12-01 21:00 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Steve Kargl <sgk at troutmask dot apl.washington.edu> ---
On Wed, Dec 01, 2021 at 08:26:25PM +0000, anlauf at gcc dot gnu.org wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103505
> 
> --- Comment #4 from anlauf at gcc dot gnu.org ---
> (In reply to kargl from comment #2)
> > diff --git a/gcc/fortran/array.c b/gcc/fortran/array.c
> > index 6552eaf3b0c..1b2f5b310a7 100644
> > --- a/gcc/fortran/array.c
> > +++ b/gcc/fortran/array.c
> > @@ -492,6 +492,9 @@ match_array_element_spec (gfc_array_spec *as)
> >    if (!gfc_expr_check_typed (*upper, gfc_current_ns, false))
> >      return AS_UNKNOWN;
> >  
> > +  if ((*upper)->expr_type != EXPR_CONSTANT)
> > +    gfc_simplify_expr (*upper,0);
> > +
> >    if (((*upper)->expr_type == EXPR_CONSTANT
> >  	&& (*upper)->ts.type != BT_INTEGER) ||
> >        ((*upper)->expr_type == EXPR_FUNCTION
> 
> There's a second place where this needs to be inserted for
> the real upper bound to fix e.g.
> 
>   integer, parameter :: z(1:(2.)) = [4, 8]
> 

Ah yes.  Good catch.  Are you going to insert the 2 lines 
lower int the file?  If so, I think you can considered 
the patch complete and reviewed.

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

* [Bug fortran/103505] ICE in compare_bound_mpz_t, at fortran/resolve.c:4587 since r8-7594-g078c5aff5ed83e9c
  2021-11-30 18:47 [Bug fortran/103505] New: ICE in compare_bound_mpz_t, at fortran/resolve.c:4587 gscfq@t-online.de
                   ` (4 preceding siblings ...)
  2021-12-01 21:00 ` sgk at troutmask dot apl.washington.edu
@ 2021-12-01 21:42 ` anlauf at gcc dot gnu.org
  2021-12-01 22:29 ` sgk at troutmask dot apl.washington.edu
                   ` (9 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: anlauf at gcc dot gnu.org @ 2021-12-01 21:42 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from anlauf at gcc dot gnu.org ---
(In reply to Steve Kargl from comment #5)
> Ah yes.  Good catch.  Are you going to insert the 2 lines 
> lower int the file?  If so, I think you can considered 
> the patch complete and reviewed.

Unfortunately this regresses on gfortran.dg/arith_divide_2.f90,
another testcase submitted by Gerhard.  We lose the information
on division by zero...

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

* [Bug fortran/103505] ICE in compare_bound_mpz_t, at fortran/resolve.c:4587 since r8-7594-g078c5aff5ed83e9c
  2021-11-30 18:47 [Bug fortran/103505] New: ICE in compare_bound_mpz_t, at fortran/resolve.c:4587 gscfq@t-online.de
                   ` (5 preceding siblings ...)
  2021-12-01 21:42 ` anlauf at gcc dot gnu.org
@ 2021-12-01 22:29 ` sgk at troutmask dot apl.washington.edu
  2021-12-02 21:51 ` anlauf at gcc dot gnu.org
                   ` (8 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: sgk at troutmask dot apl.washington.edu @ 2021-12-01 22:29 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Steve Kargl <sgk at troutmask dot apl.washington.edu> ---
On Wed, Dec 01, 2021 at 09:42:44PM +0000, anlauf at gcc dot gnu.org wrote:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103505
> 
> --- Comment #6 from anlauf at gcc dot gnu.org ---
> (In reply to Steve Kargl from comment #5)
> > Ah yes.  Good catch.  Are you going to insert the 2 lines 
> > lower int the file?  If so, I think you can considered 
> > the patch complete and reviewed.
> 
> Unfortunately this regresses on gfortran.dg/arith_divide_2.f90,
> another testcase submitted by Gerhard.  We lose the information
> on division by zero...
> 

Bummer.  Is the regression an ICE or a segfault on execution.
The former is unacceptable.  The latter is user error and the
testcase can be removed.

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

* [Bug fortran/103505] ICE in compare_bound_mpz_t, at fortran/resolve.c:4587 since r8-7594-g078c5aff5ed83e9c
  2021-11-30 18:47 [Bug fortran/103505] New: ICE in compare_bound_mpz_t, at fortran/resolve.c:4587 gscfq@t-online.de
                   ` (6 preceding siblings ...)
  2021-12-01 22:29 ` sgk at troutmask dot apl.washington.edu
@ 2021-12-02 21:51 ` anlauf at gcc dot gnu.org
  2021-12-03 20:08 ` cvs-commit at gcc dot gnu.org
                   ` (7 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: anlauf at gcc dot gnu.org @ 2021-12-02 21:51 UTC (permalink / raw)
  To: gcc-bugs

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

anlauf at gcc dot gnu.org changed:

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

--- Comment #8 from anlauf at gcc dot gnu.org ---
(In reply to Steve Kargl from comment #7)
> Bummer.  Is the regression an ICE or a segfault on execution.
> The former is unacceptable.  The latter is user error and the
> testcase can be removed.

I wouldn't be that cavalier.  It was a different error message.  There
is a simple workaround: do not simplify if an arithmetic error occurs.

Submitted as: https://gcc.gnu.org/pipermail/fortran/2021-December/057102.html

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

* [Bug fortran/103505] ICE in compare_bound_mpz_t, at fortran/resolve.c:4587 since r8-7594-g078c5aff5ed83e9c
  2021-11-30 18:47 [Bug fortran/103505] New: ICE in compare_bound_mpz_t, at fortran/resolve.c:4587 gscfq@t-online.de
                   ` (7 preceding siblings ...)
  2021-12-02 21:51 ` anlauf at gcc dot gnu.org
@ 2021-12-03 20:08 ` cvs-commit at gcc dot gnu.org
  2021-12-03 20:26 ` sgk at troutmask dot apl.washington.edu
                   ` (6 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-12-03 20:08 UTC (permalink / raw)
  To: gcc-bugs

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

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

commit r12-5779-gf46d32dd29b7623915e31b0508e2e925526fa7d8
Author: Harald Anlauf <anlauf@gmx.de>
Date:   Thu Dec 2 22:33:49 2021 +0100

    Fortran: improve checking of array specifications

    gcc/fortran/ChangeLog:

            PR fortran/103505
            * array.c (match_array_element_spec): Try to simplify array
            element specifications to improve early checking.
            * expr.c (gfc_try_simplify_expr): New.  Try simplification of an
            expression via gfc_simplify_expr.  When an error occurs, roll
            back.
            * gfortran.h (gfc_try_simplify_expr): Declare it.

    gcc/testsuite/ChangeLog:

            PR fortran/103505
            * gfortran.dg/pr103505.f90: New test.

    Co-authored-by: Steven G. Kargl <kargl@gcc.gnu.org>

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

* [Bug fortran/103505] ICE in compare_bound_mpz_t, at fortran/resolve.c:4587 since r8-7594-g078c5aff5ed83e9c
  2021-11-30 18:47 [Bug fortran/103505] New: ICE in compare_bound_mpz_t, at fortran/resolve.c:4587 gscfq@t-online.de
                   ` (8 preceding siblings ...)
  2021-12-03 20:08 ` cvs-commit at gcc dot gnu.org
@ 2021-12-03 20:26 ` sgk at troutmask dot apl.washington.edu
  2021-12-03 21:24 ` anlauf at gcc dot gnu.org
                   ` (5 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: sgk at troutmask dot apl.washington.edu @ 2021-12-03 20:26 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from Steve Kargl <sgk at troutmask dot apl.washington.edu> ---
On Thu, Dec 02, 2021 at 09:51:23PM +0000, anlauf at gcc dot gnu.org wrote:
> 
> Submitted as: https://gcc.gnu.org/pipermail/fortran/2021-December/057102.html
> 

Just saw the commit fly by.  Thanks for pursuing this issue!

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

* [Bug fortran/103505] ICE in compare_bound_mpz_t, at fortran/resolve.c:4587 since r8-7594-g078c5aff5ed83e9c
  2021-11-30 18:47 [Bug fortran/103505] New: ICE in compare_bound_mpz_t, at fortran/resolve.c:4587 gscfq@t-online.de
                   ` (9 preceding siblings ...)
  2021-12-03 20:26 ` sgk at troutmask dot apl.washington.edu
@ 2021-12-03 21:24 ` anlauf at gcc dot gnu.org
  2021-12-04 21:31 ` cvs-commit at gcc dot gnu.org
                   ` (4 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: anlauf at gcc dot gnu.org @ 2021-12-03 21:24 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from anlauf at gcc dot gnu.org ---
(In reply to Steve Kargl from comment #10)
> On Thu, Dec 02, 2021 at 09:51:23PM +0000, anlauf at gcc dot gnu.org wrote:
> > 
> > Submitted as: https://gcc.gnu.org/pipermail/fortran/2021-December/057102.html
> > 
> 
> Just saw the commit fly by.  Thanks for pursuing this issue!

Heh, you could also do some more regtesting...

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

* [Bug fortran/103505] ICE in compare_bound_mpz_t, at fortran/resolve.c:4587 since r8-7594-g078c5aff5ed83e9c
  2021-11-30 18:47 [Bug fortran/103505] New: ICE in compare_bound_mpz_t, at fortran/resolve.c:4587 gscfq@t-online.de
                   ` (10 preceding siblings ...)
  2021-12-03 21:24 ` anlauf at gcc dot gnu.org
@ 2021-12-04 21:31 ` cvs-commit at gcc dot gnu.org
  2021-12-19 20:29 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-12-04 21:31 UTC (permalink / raw)
  To: gcc-bugs

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

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

commit r11-9355-g9e9c674dfc6fae8f967341759699b4d75943d256
Author: Harald Anlauf <anlauf@gmx.de>
Date:   Thu Dec 2 22:33:49 2021 +0100

    Fortran: improve checking of array specifications

    gcc/fortran/ChangeLog:

            PR fortran/103505
            * array.c (match_array_element_spec): Try to simplify array
            element specifications to improve early checking.
            * expr.c (gfc_try_simplify_expr): New.  Try simplification of an
            expression via gfc_simplify_expr.  When an error occurs, roll
            back.
            * gfortran.h (gfc_try_simplify_expr): Declare it.

    gcc/testsuite/ChangeLog:

            PR fortran/103505
            * gfortran.dg/pr103505.f90: New test.

    Co-authored-by: Steven G. Kargl <kargl@gcc.gnu.org>
    (cherry picked from commit f46d32dd29b7623915e31b0508e2e925526fa7d8)

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

* [Bug fortran/103505] ICE in compare_bound_mpz_t, at fortran/resolve.c:4587 since r8-7594-g078c5aff5ed83e9c
  2021-11-30 18:47 [Bug fortran/103505] New: ICE in compare_bound_mpz_t, at fortran/resolve.c:4587 gscfq@t-online.de
                   ` (11 preceding siblings ...)
  2021-12-04 21:31 ` cvs-commit at gcc dot gnu.org
@ 2021-12-19 20:29 ` cvs-commit at gcc dot gnu.org
  2021-12-19 21:00 ` [Bug fortran/103505] [9 Regression] " anlauf at gcc dot gnu.org
                   ` (2 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-12-19 20:29 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #13 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:e301a0a8a0f6287ff04e74893265e40dff256301

commit r10-10350-ge301a0a8a0f6287ff04e74893265e40dff256301
Author: Harald Anlauf <anlauf@gmx.de>
Date:   Thu Dec 2 22:33:49 2021 +0100

    Fortran: improve checking of array specifications

    gcc/fortran/ChangeLog:

            PR fortran/103505
            * array.c (match_array_element_spec): Try to simplify array
            element specifications to improve early checking.
            * expr.c (gfc_try_simplify_expr): New.  Try simplification of an
            expression via gfc_simplify_expr.  When an error occurs, roll
            back.
            * gfortran.h (gfc_try_simplify_expr): Declare it.

    gcc/testsuite/ChangeLog:

            PR fortran/103505
            * gfortran.dg/pr103505.f90: New test.

    Co-authored-by: Steven G. Kargl <kargl@gcc.gnu.org>
    (cherry picked from commit f46d32dd29b7623915e31b0508e2e925526fa7d8)

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

* [Bug fortran/103505] [9 Regression] ICE in compare_bound_mpz_t, at fortran/resolve.c:4587 since r8-7594-g078c5aff5ed83e9c
  2021-11-30 18:47 [Bug fortran/103505] New: ICE in compare_bound_mpz_t, at fortran/resolve.c:4587 gscfq@t-online.de
                   ` (12 preceding siblings ...)
  2021-12-19 20:29 ` cvs-commit at gcc dot gnu.org
@ 2021-12-19 21:00 ` anlauf at gcc dot gnu.org
  2022-01-17  9:01 ` rguenth at gcc dot gnu.org
  2022-05-27  9:51 ` rguenth at gcc dot gnu.org
  15 siblings, 0 replies; 17+ messages in thread
From: anlauf at gcc dot gnu.org @ 2021-12-19 21:00 UTC (permalink / raw)
  To: gcc-bugs

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

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |12.0
            Summary|ICE in compare_bound_mpz_t, |[9 Regression] ICE in
                   |at fortran/resolve.c:4587   |compare_bound_mpz_t, at
                   |since                       |fortran/resolve.c:4587
                   |r8-7594-g078c5aff5ed83e9c   |since
                   |                            |r8-7594-g078c5aff5ed83e9c
      Known to fail|                            |9.4.1

--- Comment #14 from anlauf at gcc dot gnu.org ---
Fixed on mainline for gcc-12, and on 11- and 10-branch.

The patch applies cleanly to 9-branch.  However, it regresses on many
testcases.  Not sure how to fix this.

Marking as 9 regression.

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

* [Bug fortran/103505] [9 Regression] ICE in compare_bound_mpz_t, at fortran/resolve.c:4587 since r8-7594-g078c5aff5ed83e9c
  2021-11-30 18:47 [Bug fortran/103505] New: ICE in compare_bound_mpz_t, at fortran/resolve.c:4587 gscfq@t-online.de
                   ` (13 preceding siblings ...)
  2021-12-19 21:00 ` [Bug fortran/103505] [9 Regression] " anlauf at gcc dot gnu.org
@ 2022-01-17  9:01 ` rguenth at gcc dot gnu.org
  2022-05-27  9:51 ` rguenth at gcc dot gnu.org
  15 siblings, 0 replies; 17+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-01-17  9:01 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

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

* [Bug fortran/103505] [9 Regression] ICE in compare_bound_mpz_t, at fortran/resolve.c:4587 since r8-7594-g078c5aff5ed83e9c
  2021-11-30 18:47 [Bug fortran/103505] New: ICE in compare_bound_mpz_t, at fortran/resolve.c:4587 gscfq@t-online.de
                   ` (14 preceding siblings ...)
  2022-01-17  9:01 ` rguenth at gcc dot gnu.org
@ 2022-05-27  9:51 ` rguenth at gcc dot gnu.org
  15 siblings, 0 replies; 17+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-05-27  9:51 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
   Target Milestone|9.5                         |10.4
             Status|ASSIGNED                    |RESOLVED
      Known to fail|                            |9.5.0
      Known to work|                            |10.3.1

--- Comment #15 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed for GCC 10.4.

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

end of thread, other threads:[~2022-05-27  9:51 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-30 18:47 [Bug fortran/103505] New: ICE in compare_bound_mpz_t, at fortran/resolve.c:4587 gscfq@t-online.de
2021-11-30 20:44 ` [Bug fortran/103505] " anlauf at gcc dot gnu.org
2021-11-30 20:48 ` kargl at gcc dot gnu.org
2021-12-01  9:25 ` [Bug fortran/103505] ICE in compare_bound_mpz_t, at fortran/resolve.c:4587 since r8-7594-g078c5aff5ed83e9c marxin at gcc dot gnu.org
2021-12-01 20:26 ` anlauf at gcc dot gnu.org
2021-12-01 21:00 ` sgk at troutmask dot apl.washington.edu
2021-12-01 21:42 ` anlauf at gcc dot gnu.org
2021-12-01 22:29 ` sgk at troutmask dot apl.washington.edu
2021-12-02 21:51 ` anlauf at gcc dot gnu.org
2021-12-03 20:08 ` cvs-commit at gcc dot gnu.org
2021-12-03 20:26 ` sgk at troutmask dot apl.washington.edu
2021-12-03 21:24 ` anlauf at gcc dot gnu.org
2021-12-04 21:31 ` cvs-commit at gcc dot gnu.org
2021-12-19 20:29 ` cvs-commit at gcc dot gnu.org
2021-12-19 21:00 ` [Bug fortran/103505] [9 Regression] " anlauf at gcc dot gnu.org
2022-01-17  9:01 ` rguenth at gcc dot gnu.org
2022-05-27  9:51 ` rguenth 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).