public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/94192] New: ICE on wrong code
@ 2020-03-16 11:45 jrfsousa at gmail dot com
  2020-03-16 17:13 ` [Bug fortran/94192] " kargl at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: jrfsousa at gmail dot com @ 2020-03-16 11:45 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 94192
           Summary: ICE on wrong code
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jrfsousa at gmail dot com
  Target Milestone: ---

Created attachment 48041
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48041&action=edit
Code demonstrating problems.

Hi all!

ICE both in:

GNU Fortran (GCC) 9.2.1 20200307

and

GNU Fortran (GCC) 10.0.1 20200307 (experimental)

simplify_bound in simplify.c does not expect an AS_DEFERRED array.

Thank you very much.

Best regards,
José Rui

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

* [Bug fortran/94192] ICE on wrong code
  2020-03-16 11:45 [Bug fortran/94192] New: ICE on wrong code jrfsousa at gmail dot com
@ 2020-03-16 17:13 ` kargl at gcc dot gnu.org
  2020-03-16 17:13 ` kargl at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: kargl at gcc dot gnu.org @ 2020-03-16 17:13 UTC (permalink / raw)
  To: gcc-bugs

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

kargl at gcc dot gnu.org changed:

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

--- Comment #1 from kargl at gcc dot gnu.org ---
Quite silly to have an assert if compiler has already issued an error.

Index: gcc/fortran/simplify.c
===================================================================
--- gcc/fortran/simplify.c      (revision 280157)
+++ gcc/fortran/simplify.c      (working copy)
 @@ -4154,12 +4189,6 @@ simplify_bound (gfc_expr *array, gfc_expr *dim, gfc_ex
             || (as->type == AS_ASSUMED_SHAPE && upper)))
     return NULL;

-  gcc_assert (!as
-             || (as->type != AS_DEFERRED
-                 && array->expr_type == EXPR_VARIABLE
-                 && !gfc_expr_attr (array).allocatable
-                 && !gfc_expr_attr (array).pointer));
-
   if (dim == NULL)
     {
       /* Multi-dimensional bounds.  */

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

* [Bug fortran/94192] ICE on wrong code
  2020-03-16 11:45 [Bug fortran/94192] New: ICE on wrong code jrfsousa at gmail dot com
  2020-03-16 17:13 ` [Bug fortran/94192] " kargl at gcc dot gnu.org
@ 2020-03-16 17:13 ` kargl at gcc dot gnu.org
  2020-03-17  8:17 ` marxin at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: kargl at gcc dot gnu.org @ 2020-03-16 17:13 UTC (permalink / raw)
  To: gcc-bugs

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

kargl at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P4

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

* [Bug fortran/94192] ICE on wrong code
  2020-03-16 11:45 [Bug fortran/94192] New: ICE on wrong code jrfsousa at gmail dot com
  2020-03-16 17:13 ` [Bug fortran/94192] " kargl at gcc dot gnu.org
  2020-03-16 17:13 ` kargl at gcc dot gnu.org
@ 2020-03-17  8:17 ` marxin at gcc dot gnu.org
  2020-04-13 14:33 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-03-17  8:17 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marxin at gcc dot gnu.org,
                   |                            |mikael at gcc dot gnu.org

--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r6-597-g22fa926f19ae0ebb.

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

* [Bug fortran/94192] ICE on wrong code
  2020-03-16 11:45 [Bug fortran/94192] New: ICE on wrong code jrfsousa at gmail dot com
                   ` (2 preceding siblings ...)
  2020-03-17  8:17 ` marxin at gcc dot gnu.org
@ 2020-04-13 14:33 ` cvs-commit at gcc dot gnu.org
  2020-04-13 14:37 ` tkoenig at gcc dot gnu.org
  2020-04-15 15: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-04-13 14:33 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Thomas Kथà¤nig <tkoenig@gcc.gnu.org>:

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

commit r10-7699-gefbf7392079222ef00db2d39998faf5513055181
Author: Linus Koenig <link@sig-st.de>
Date:   Mon Apr 13 16:30:44 2020 +0200

    ICE on wrong code [PR94192].

    The idea is not have another resolution of a pointer if an error has
    occurred previously.

    2020-04-13  Linus Koenig <link@sig-st.de>

            PR fortran/94192
            * resolve.c (resolve_fl_var_and_proc): Set flag "error" to 1 if
            pointer is found to not have an assumed rank or a deferred shape.
            * simplify.c (simplify_bound): If an error has been issued for a
            given pointer, one should not attempt to find its bounds.

    2020-04-13  Linus Koenig <link@sig-st.de>

            PR fortran/94192
            * gfortran.dg/bound_resolve_after_error_1.f90: New test.

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

* [Bug fortran/94192] ICE on wrong code
  2020-03-16 11:45 [Bug fortran/94192] New: ICE on wrong code jrfsousa at gmail dot com
                   ` (3 preceding siblings ...)
  2020-04-13 14:33 ` cvs-commit at gcc dot gnu.org
@ 2020-04-13 14:37 ` tkoenig at gcc dot gnu.org
  2020-04-15 15:45 ` cvs-commit at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: tkoenig at gcc dot gnu.org @ 2020-04-13 14:37 UTC (permalink / raw)
  To: gcc-bugs

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

Thomas Koenig <tkoenig at gcc dot gnu.org> changed:

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

--- Comment #4 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
Fixed on trunk, closing.

Thanks for the bug report!

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

* [Bug fortran/94192] ICE on wrong code
  2020-03-16 11:45 [Bug fortran/94192] New: ICE on wrong code jrfsousa at gmail dot com
                   ` (4 preceding siblings ...)
  2020-04-13 14:37 ` tkoenig at gcc dot gnu.org
@ 2020-04-15 15: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-04-15 15:45 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Fritz Reese <foreese@gcc.gnu.org>:

https://gcc.gnu.org/g:49795733fdcc3a804dab59b63f86d5ebe4541374

commit r10-7738-g49795733fdcc3a804dab59b63f86d5ebe4541374
Author: Fritz Reese <foreese@gcc.gnu.org>
Date:   Wed Apr 15 11:44:40 2020 -0400

    Simplify recently introduced check to simplify_bound.

    gcc/fortran/ChangeLog:

    2020-04-15  Fritz Reese  <foreese@gcc.gnu.org>
            Linus Koenig <link@sig-st.de>

            PR fortran/94192
            * simplify.c (simplify_bound): Simplify condition for error check.

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

end of thread, other threads:[~2020-04-15 15:45 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-16 11:45 [Bug fortran/94192] New: ICE on wrong code jrfsousa at gmail dot com
2020-03-16 17:13 ` [Bug fortran/94192] " kargl at gcc dot gnu.org
2020-03-16 17:13 ` kargl at gcc dot gnu.org
2020-03-17  8:17 ` marxin at gcc dot gnu.org
2020-04-13 14:33 ` cvs-commit at gcc dot gnu.org
2020-04-13 14:37 ` tkoenig at gcc dot gnu.org
2020-04-15 15: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).