public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/43712]  New: ICE on improperly continued character constant
@ 2010-04-09 21:30 longb at cray dot com
  2010-04-09 21:40 ` [Bug fortran/43712] " jvdelisle at gcc dot gnu dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: longb at cray dot com @ 2010-04-09 21:30 UTC (permalink / raw)
  To: gcc-bugs

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.


-- 
           Summary: ICE on improperly continued character constant
           Product: gcc
           Version: 4.4.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: longb at cray dot com
 GCC build triplet: x86_64-suse-linux
  GCC host triplet: x86_64-suse-linux
GCC target triplet: x86_64-suse-linux


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


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

end of thread, other threads:[~2010-04-20 11:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-09 21:30 [Bug fortran/43712] New: ICE on improperly continued character constant longb at cray dot com
2010-04-09 21:40 ` [Bug fortran/43712] " jvdelisle at gcc dot gnu dot org
2010-04-09 22:20 ` longb at cray dot com
2010-04-15 22:55 ` jvdelisle at gcc dot gnu dot org
2010-04-16  5:55 ` burnus at gcc dot gnu dot org
2010-04-20 11:33 ` jakub at gcc dot gnu dot 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).