public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/57089] New: [4.9 Regression] ICE in  verify_loop_structure, at cfgloop.c:1647
@ 2013-04-27 10:40 Joost.VandeVondele at mat dot ethz.ch
  2013-04-29  8:12 ` [Bug middle-end/57089] " rguenth at gcc dot gnu.org
  2013-04-29 11:32 ` rguenth at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: Joost.VandeVondele at mat dot ethz.ch @ 2013-04-27 10:40 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57089

             Bug #: 57089
           Summary: [4.9 Regression] ICE in  verify_loop_structure, at
                    cfgloop.c:1647
    Classification: Unclassified
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: Joost.VandeVondele@mat.ethz.ch


rev 198328 is still OK, 198353 fails.

> cat bug.f90 
  SUBROUTINE T()
    INTEGER            :: npoints, grad_deriv
    SELECT CASE(grad_deriv)
    CASE (0)
       !$omp do
       DO ii=1,npoints
       END DO
    END SELECT
  END SUBROUTINE 

> gfortran -fopenmp -c -O2 bug.f90 
bug.f90: In function ‘t’:
bug.f90:9:0: error: loop with header 7 not in loop tree
   END SUBROUTINE 
 ^
bug.f90:9:0: internal compiler error: in verify_loop_structure, at
cfgloop.c:1647
0x6b4665 verify_loop_structure()
    ../../gcc/gcc/cfgloop.c:1647
0x89ab3d loop_optimizer_init(unsigned int)
    ../../gcc/gcc/loop-init.c:109
0xa7ff23 perform_tree_ssa_dce
    ../../gcc/gcc/tree-ssa-dce.c:1554
>From gcc-bugs-return-421077-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sat Apr 27 11:33:35 2013
Return-Path: <gcc-bugs-return-421077-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 27795 invoked by alias); 27 Apr 2013 11:33:35 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 27761 invoked by uid 48); 27 Apr 2013 11:33:31 -0000
From: "janus at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/50438] [F03] proc pointer to subroutine in structure constructors
Date: Sat, 27 Apr 2013 11:33:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: fortran
X-Bugzilla-Keywords: rejects-valid
X-Bugzilla-Severity: normal
X-Bugzilla-Who: janus at gcc dot gnu.org
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: janus at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Changed-Fields: Status AssignedTo
Message-ID: <bug-50438-4-EM6hBDTiwL@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-50438-4@http.gcc.gnu.org/bugzilla/>
References: <bug-50438-4@http.gcc.gnu.org/bugzilla/>
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
Content-Type: text/plain; charset="UTF-8"
MIME-Version: 1.0
X-SW-Source: 2013-04/txt/msg02222.txt.bz2
Content-length: 1606


http://gcc.gnu.org/bugzilla/show_bug.cgi?idP438

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
         AssignedTo|unassigned at gcc dot       |janus at gcc dot gnu.org
                   |gnu.org                     |

--- Comment #5 from janus at gcc dot gnu.org 2013-04-27 11:33:29 UTC ---
(In reply to comment #3)
> Here is a simple patch to avoid this:
>
> [...]
>
> It cures both test cases, but I'm pretty sure it will have quite a number of
> testsuite failures (haven't checked yet).

The patch from comment #3 indeed shows a huge number of failures (as expected).


> If we remove it here,
> 'gfc_reduce_init_expr' should be called somewhere at resolution stage, of
> course! We just need a suitable place for doing this ...

e.g. something like 'resolve_values' or 'resolve_structure_cons'?


However, I'm thinking that this approach may be too big of a hammer for the
problem at hand. A somewhat less invasive patch:

Index: gcc/fortran/expr.c
==================================================================--- gcc/fortran/expr.c    (revision 198155)
+++ gcc/fortran/expr.c    (working copy)
@@ -2522,6 +2522,8 @@ gfc_check_init_expr (gfc_expr *e)

       break;
     }
+      else if (e->symtree->n.sym->attr.flavor == FL_PROCEDURE)
+    break;

       if (gfc_in_match_data ())
     break;


This is also sufficient to remove the error. Regtesting now ...


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

* [Bug middle-end/57089] [4.9 Regression] ICE in  verify_loop_structure, at cfgloop.c:1647
  2013-04-27 10:40 [Bug middle-end/57089] New: [4.9 Regression] ICE in verify_loop_structure, at cfgloop.c:1647 Joost.VandeVondele at mat dot ethz.ch
@ 2013-04-29  8:12 ` rguenth at gcc dot gnu.org
  2013-04-29 11:32 ` rguenth at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-04-29  8:12 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57089

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2013-04-29
         AssignedTo|unassigned at gcc dot       |rguenth at gcc dot gnu.org
                   |gnu.org                     |
   Target Milestone|---                         |4.9.0
     Ever Confirmed|0                           |1

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> 2013-04-29 08:12:44 UTC ---
I'll have a look.


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

* [Bug middle-end/57089] [4.9 Regression] ICE in  verify_loop_structure, at cfgloop.c:1647
  2013-04-27 10:40 [Bug middle-end/57089] New: [4.9 Regression] ICE in verify_loop_structure, at cfgloop.c:1647 Joost.VandeVondele at mat dot ethz.ch
  2013-04-29  8:12 ` [Bug middle-end/57089] " rguenth at gcc dot gnu.org
@ 2013-04-29 11:32 ` rguenth at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-04-29 11:32 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57089

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

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

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> 2013-04-29 11:32:02 UTC ---
Author: rguenth
Date: Mon Apr 29 11:31:33 2013
New Revision: 198409

URL: http://gcc.gnu.org/viewcvs?rev=198409&root=gcc&view=rev
Log:
2013-04-29  Richard Biener  <rguenther@suse.de>

    PR middle-end/57089
    * omp-low.c (expand_omp_taskreg): If the parent function had
    a broken loop tree make sure to schedule a fixup for the child
    as well.
    (expand_omp_for_generic): Properly add loops.
    (expand_omp_for_static_nochunk): Likewise.
    (expand_omp_for_static_chunk): Likewise.
    (expand_omp_for): For the degenerate case fixup loops.
    (expand_omp_sections): Fix default bb placement in loops.
    (expand_omp_atomic_pipeline): Properly add loops.

    * gfortran.dg/gomp/pr57089.f90: New testcase.

Added:
    trunk/gcc/testsuite/gfortran.dg/gomp/pr57089.f90
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/omp-low.c
    trunk/gcc/testsuite/ChangeLog


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

end of thread, other threads:[~2013-04-29 11:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-27 10:40 [Bug middle-end/57089] New: [4.9 Regression] ICE in verify_loop_structure, at cfgloop.c:1647 Joost.VandeVondele at mat dot ethz.ch
2013-04-29  8:12 ` [Bug middle-end/57089] " rguenth at gcc dot gnu.org
2013-04-29 11:32 ` 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).