Bug 45597 - [4.6 Regression] ICE: in gfc_trans_cycle, at fortran/trans-stmt.c:4320
Summary: [4.6 Regression] ICE: in gfc_trans_cycle, at fortran/trans-stmt.c:4320
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.6.0
: P3 normal
Target Milestone: ---
Assignee: Jakub Jelinek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-08 12:12 UTC by Joost VandeVondele
Modified: 2010-09-08 17:52 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2010-09-08 12:18:35


Attachments
gcc46-pr45597.patch (594 bytes, patch)
2010-09-08 14:25 UTC, Jakub Jelinek
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joost VandeVondele 2010-09-08 12:12:57 UTC
> gfortran -c -fopenmp bug.f90

bug.f90: In function ‘rs_pw_transfer_distributed’:
bug.f90:6:0: internal compiler error: in gfc_trans_cycle, at fortran/trans-stmt.c:4320
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


> cat bug.f90
  SUBROUTINE rs_pw_transfer_distributed()
    INTEGER, ALLOCATABLE, DIMENSION(:, :)    :: bounds
!$omp parallel do default(none), &
!$omp             shared(bounds,my_rs_rank)
       DO i = 0, N
          IF (ub_send(1) .LT.bounds(my_rs_rank,1)) CYCLE
       END DO
  END SUBROUTINE rs_pw_transfer_distributed
Comment 1 Jakub Jelinek 2010-09-08 14:25:56 UTC
Created attachment 21739 [details]
gcc46-pr45597.patch

Seems to be a recent regression, caused by
http://gcc.gnu.org/viewcvs?view=revision&revision=163798
Comment 2 Jakub Jelinek 2010-09-08 16:47:29 UTC
Subject: Bug 45597

Author: jakub
Date: Wed Sep  8 16:47:16 2010
New Revision: 164005

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=164005
Log:
	PR fortran/45597
	* trans-openmp.c (gfc_trans_omp_do): Store exit/cycle labels on code
	instead of code->block.

	* gfortran.dg/gomp/pr45597.f90: New test.

Added:
    trunk/gcc/testsuite/gfortran.dg/gomp/pr45597.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/trans-openmp.c
    trunk/gcc/testsuite/ChangeLog

Comment 3 Jakub Jelinek 2010-09-08 17:52:36 UTC
Fixed.