public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/85796] ICE: Floating point exception
       [not found] <bug-85796-4@http.gcc.gnu.org/bugzilla/>
@ 2020-07-18 17:10 ` kargl at gcc dot gnu.org
  2020-07-18 20:13 ` jvdelisle at charter dot net
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: kargl at gcc dot gnu.org @ 2020-07-18 17:10 UTC (permalink / raw)
  To: gcc-bugs

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

kargl at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kargl at gcc dot gnu.org
           Keywords|                            |ice-on-invalid-code

--- Comment #2 from kargl at gcc dot gnu.org ---
Index: gcc/fortran/resolve.c
===================================================================
--- gcc/fortran/resolve.c       (revision 280157)
+++ gcc/fortran/resolve.c       (working copy)
@@ -16174,27 +16174,34 @@ traverse_data_list (gfc_data_variable *var, locus
*whe
   end = gfc_copy_expr (var->iter.end);
   step = gfc_copy_expr (var->iter.step);

-  if (!gfc_simplify_expr (start, 1)
-      || start->expr_type != EXPR_CONSTANT)
+  if (!gfc_simplify_expr (start, 1) || start->expr_type != EXPR_CONSTANT)
     {
       gfc_error ("start of implied-do loop at %L could not be "
                 "simplified to a constant value", &start->where);
       retval = false;
       goto cleanup;
     }
-  if (!gfc_simplify_expr (end, 1)
-      || end->expr_type != EXPR_CONSTANT)
+
+  if (!gfc_simplify_expr (end, 1) || end->expr_type != EXPR_CONSTANT)
     {
       gfc_error ("end of implied-do loop at %L could not be "
                 "simplified to a constant value", &start->where);
       retval = false;
       goto cleanup;
     }
-  if (!gfc_simplify_expr (step, 1)
-      || step->expr_type != EXPR_CONSTANT)
+
+  if (!gfc_simplify_expr (step, 1) || step->expr_type != EXPR_CONSTANT)
     {
       gfc_error ("step of implied-do loop at %L could not be "
-                "simplified to a constant value", &start->where);
+                "simplified to a constant value", &step->where);
+      retval = false;
+      goto cleanup;
+    }
+
+  if (mpz_cmp_si (step->value.integer, 0) == 0)
+    {
+      gfc_error ("step of implied-do loop at %L shall not be zero",
+                &step->where);
       retval = false;
       goto cleanup;
     }

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

* [Bug fortran/85796] ICE: Floating point exception
       [not found] <bug-85796-4@http.gcc.gnu.org/bugzilla/>
  2020-07-18 17:10 ` [Bug fortran/85796] ICE: Floating point exception kargl at gcc dot gnu.org
@ 2020-07-18 20:13 ` jvdelisle at charter dot net
  2020-07-18 20:30 ` sgk at troutmask dot apl.washington.edu
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: jvdelisle at charter dot net @ 2020-07-18 20:13 UTC (permalink / raw)
  To: gcc-bugs

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

jvdelisle at charter dot net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jvdelisle at charter dot net

--- Comment #3 from jvdelisle at charter dot net ---
This looks OK Steve. Assuming your regression tested, shall I commit this for
you?

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

* [Bug fortran/85796] ICE: Floating point exception
       [not found] <bug-85796-4@http.gcc.gnu.org/bugzilla/>
  2020-07-18 17:10 ` [Bug fortran/85796] ICE: Floating point exception kargl at gcc dot gnu.org
  2020-07-18 20:13 ` jvdelisle at charter dot net
@ 2020-07-18 20:30 ` sgk at troutmask dot apl.washington.edu
  2020-07-18 23:21 ` kargl at gcc dot gnu.org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: sgk at troutmask dot apl.washington.edu @ 2020-07-18 20:30 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Steve Kargl <sgk at troutmask dot apl.washington.edu> ---
On Sat, Jul 18, 2020 at 08:13:31PM +0000, jvdelisle at charter dot net wrote:
> 
> --- Comment #3 from jvdelisle at charter dot net ---
> This looks OK Steve. Assuming your regression tested, shall I commit this for
> you?
> 

My regression test shows 22 regression, but none can be
associated with this patch.  There are lto errors about
linking, which likely means gfortran is finding FreeBSD
ld (rtld) instead of binutils.

I'm also getting an odd failure with 'gmake -j7 chec-fortran'
where a submake is dying with 'argument to -j must be positive'.
Odd?

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

* [Bug fortran/85796] ICE: Floating point exception
       [not found] <bug-85796-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2020-07-18 20:30 ` sgk at troutmask dot apl.washington.edu
@ 2020-07-18 23:21 ` kargl at gcc dot gnu.org
  2020-11-12 21:29 ` anlauf at gcc dot gnu.org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: kargl at gcc dot gnu.org @ 2020-07-18 23:21 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from kargl at gcc dot gnu.org ---
(In reply to Steve Kargl from comment #4)
> On Sat, Jul 18, 2020 at 08:13:31PM +0000, jvdelisle at charter dot net wrote:
> > 
> > --- Comment #3 from jvdelisle at charter dot net ---
> > This looks OK Steve. Assuming your regression tested, shall I commit this for
> > you?
> > 
> 
> My regression test shows 22 regression, but none can be
> associated with this patch.  There are lto errors about
> linking, which likely means gfortran is finding FreeBSD
> ld (rtld) instead of binutils.
> 
> I'm also getting an odd failure with 'gmake -j7 chec-fortran'
> where a submake is dying with 'argument to -j must be positive'.
> Odd?

Ugh.  configure is broken.  I asked for --enable-languages=c,fortran.
Because, I left out c++, configure helpfully added in c++,lto.  Not
good.  Had to add --disable-lto.

Regression tests fine.

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

* [Bug fortran/85796] ICE: Floating point exception
       [not found] <bug-85796-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2020-07-18 23:21 ` kargl at gcc dot gnu.org
@ 2020-11-12 21:29 ` anlauf at gcc dot gnu.org
  2020-11-23 21:22 ` anlauf at gcc dot gnu.org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: anlauf at gcc dot gnu.org @ 2020-11-12 21:29 UTC (permalink / raw)
  To: gcc-bugs

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

anlauf at gcc dot gnu.org changed:

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

--- Comment #6 from anlauf at gcc dot gnu.org ---
Jerry, are you still following this one?

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

* [Bug fortran/85796] ICE: Floating point exception
       [not found] <bug-85796-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2020-11-12 21:29 ` anlauf at gcc dot gnu.org
@ 2020-11-23 21:22 ` anlauf at gcc dot gnu.org
  2020-11-25 19:21 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 9+ messages in thread
From: anlauf at gcc dot gnu.org @ 2020-11-23 21:22 UTC (permalink / raw)
  To: gcc-bugs

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

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 #7 from anlauf at gcc dot gnu.org ---
Patch submitted:
https://gcc.gnu.org/pipermail/fortran/2020-November/055325.html

Thus taking.

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

* [Bug fortran/85796] ICE: Floating point exception
       [not found] <bug-85796-4@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2020-11-23 21:22 ` anlauf at gcc dot gnu.org
@ 2020-11-25 19:21 ` cvs-commit at gcc dot gnu.org
  2020-11-25 19:33 ` cvs-commit at gcc dot gnu.org
  2020-11-25 19:36 ` anlauf at gcc dot gnu.org
  8 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-11-25 19:21 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 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:94172dc7091a2c6b2d2f99857de77c607fac3935

commit r11-5389-g94172dc7091a2c6b2d2f99857de77c607fac3935
Author: Harald Anlauf <anlauf@gmx.de>
Date:   Wed Nov 25 20:20:44 2020 +0100

    PR fortran/85796 - Floating point exception with implied do

    Catch invalid step=0 in implied do loop within data statements.

    gcc/fortran/ChangeLog:

            PR fortran/85796
            * resolve.c (traverse_data_list): Fix copy&paste errors; catch
            step=0 in implied do loop.

    gcc/testsuite/ChangeLog:

            PR fortran/85796
            * gfortran.dg/pr85796.f90: New test.

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

* [Bug fortran/85796] ICE: Floating point exception
       [not found] <bug-85796-4@http.gcc.gnu.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2020-11-25 19:21 ` cvs-commit at gcc dot gnu.org
@ 2020-11-25 19:33 ` cvs-commit at gcc dot gnu.org
  2020-11-25 19:36 ` anlauf at gcc dot gnu.org
  8 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-11-25 19:33 UTC (permalink / raw)
  To: gcc-bugs

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

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

commit r10-9084-g67e7f56b6795023dbf59d27e200668b04ce63c3a
Author: Harald Anlauf <anlauf@gmx.de>
Date:   Wed Nov 25 20:20:44 2020 +0100

    PR fortran/85796 - Floating point exception with implied do

    Catch invalid step=0 in implied do loop within data statements.

    gcc/fortran/ChangeLog:

            PR fortran/85796
            * resolve.c (traverse_data_list): Fix copy&paste errors; catch
            step=0 in implied do loop.

    gcc/testsuite/ChangeLog:

            PR fortran/85796
            * gfortran.dg/pr85796.f90: New test.

    (cherry picked from commit 94172dc7091a2c6b2d2f99857de77c607fac3935)

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

* [Bug fortran/85796] ICE: Floating point exception
       [not found] <bug-85796-4@http.gcc.gnu.org/bugzilla/>
                   ` (7 preceding siblings ...)
  2020-11-25 19:33 ` cvs-commit at gcc dot gnu.org
@ 2020-11-25 19:36 ` anlauf at gcc dot gnu.org
  8 siblings, 0 replies; 9+ messages in thread
From: anlauf at gcc dot gnu.org @ 2020-11-25 19:36 UTC (permalink / raw)
  To: gcc-bugs

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

anlauf at gcc dot gnu.org changed:

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

--- Comment #10 from anlauf at gcc dot gnu.org ---
Fixed on master for gcc-11, and backported to 10-branch.  Closing.

Thanks for the report!

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

end of thread, other threads:[~2020-11-25 19:36 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-85796-4@http.gcc.gnu.org/bugzilla/>
2020-07-18 17:10 ` [Bug fortran/85796] ICE: Floating point exception kargl at gcc dot gnu.org
2020-07-18 20:13 ` jvdelisle at charter dot net
2020-07-18 20:30 ` sgk at troutmask dot apl.washington.edu
2020-07-18 23:21 ` kargl at gcc dot gnu.org
2020-11-12 21:29 ` anlauf at gcc dot gnu.org
2020-11-23 21:22 ` anlauf at gcc dot gnu.org
2020-11-25 19:21 ` cvs-commit at gcc dot gnu.org
2020-11-25 19:33 ` cvs-commit at gcc dot gnu.org
2020-11-25 19:36 ` 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).