For the test case: program F03_2_9_3_5_2b use omp_lib implicit none integer, parameter :: NT = 4 integer, parameter :: int64_t = selected_int_kind(18) integer (kind=int64_t), parameter::DYNAMIC_MEMORY = 64000_int64_t integer (kind=int64_t), parameter::ARRAY_SIZE = DYNAMIC_MEMORY/NT/8 integer, parameter :: EXPECTED_RESULT = 1 logical :: fail = .false. integer :: i integer (kind=int64_t), allocatable :: A(:) call omp_set_num_threads(NT) call omp_set_dynamic(.false.) !$omp parallel if (omp_get_thread_num() == NT-1) then allocate(A(ARRAY_SIZE)) end if !$omp barrier ! ensure A is allocated before the sections region !$omp sections lastprivate(A) ! This thread sleeps to attempt to let the thread ! that executes the next section get ahead. call sleep(5) A = EXPECTED_RESULT+1 !$omp section A = EXPECTED_RESULT !$omp end sections ! implicit barrier at end of sections construct !$omp master ! verify that all elements of the array are EXPECTED_RESULT if (MAXVAL(A) /= EXPECTED_RESULT .or. & MINVAL(A) /= EXPECTED_RESULT) then print *, 'FAIL - MAXVAL(A) == ', MAXVAL(A), & ' (expected ', EXPECTED_RESULT, '), & MINVAL(A) == ', MINVAL(A), & ' (expected ', EXPECTED_RESULT, ')' end if !$omp end master !$omp end parallel end program F03_2_9_3_5_2b > gfortran -fopenmp test.f90 test.f90: In function 'f03_2_9_3_5_2b': test.f90:23: internal compiler error: in single_pred_edge, at basic-block.h:658 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. Expected message (Cray compiler): > ftn -c test.f90 /opt/cray/xt-asyncpe/3.8.20/bin/ftn: INFO: linux target is being used MINVAL(A) == ', MINVAL(A), & ^ ftn-505 crayftn: ERROR F03_2_9_3_5_2B, File = test.f90, Line = 37, Column = 27 Continuation of character context in free source form requires an "&" as the first nonblank character of the next line. I tried a much simpler test: > cat simple.f90 program test print *, "Beginning of string & improperly continued" end program test For which the Cray compiler made a similar objection: improperly continued" ^ ftn-505 crayftn: ERROR TEST, File = simple.f90, Line = 3, Column = 12 Continuation of character context in free source form requires an "&" as the first nonblank character of the next line. However, the gfortran compiler did not object (it should have) and the code actually worked in a reasonable way: > gfortran simple.f90 > ./a.out Beginning of string improperly continued > At this point, I gave up on trying to reduce the original test case that caused the ICE.
Try using -std=f90 with and without -pedantic. gfortran allows the missing ampersand as an extension.
OK, no need to worry about the simple.f90 case. The original test.f90 problem is the only issue.
I tried this test case gfortran 4.6.0 (current trunk) and i do not get an ICE. It just works. ???
(In reply to comment #3) > I tried this test case gfortran 4.6.0 (current trunk) and i do not get an ICE. > It just works. ??? Same here: gcc version 4.4.0 20090206 -- ICE gcc version 4.5.0 20100409 -- works gcc version 4.6.0 20100415 -- works With -std=f95 -pedantic, I get the diagnostic for the continuation line.
Please update your gfortran. *** This bug has been marked as a duplicate of 42866 ***