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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tkoenig at gcc dot gnu.org

--- Comment #3 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
(In reply to Zaak from comment #0)

> Furthermore, there is an error message embedded in the `REPEAT()` function

I doubt that. REPEAT() is an intrinsic, there are no embedded
error messages in there.

> which breaks deterministic builds! It is unclear to me why the following
> example compiles while the one above does not:
> 
> ```Fortran
>   subroutine co_broadcast_c_char(a,source_image,stat,errmsg)
>     character(kind=c_char,len=*), intent(inout), volatile, target :: a
>     integer(c_int), intent(in), optional :: source_image
>     integer(c_int), intent(out), optional:: stat
>     character(kind=1,len=*), intent(out), optional :: errmsg
>     ! Local variables and constants:
>     integer(c_int), allocatable :: a_cast_to_integer_array(:)
> 
>     ! Convert "a" to an integer(c_int) array where each 32-bit integer
> element holds four 1-byte characters
>     a_cast_to_integer_array = transfer(a,[0_c_int])
>     ! Broadcast the integer(c_int) array
>     call co_broadcast_c_int(a_cast_to_integer_array,source_image, stat,
> errmsg)
>     ! Recover the characters from the broadcasted integer(c_int) array
>     a = transfer(a_cast_to_integer_array,repeat(' ',len(a)))
> 
>   end subroutine
> ```

This does not compile.

Can you specify a complete, self-contained example?

Reply via email to