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

c.friedr...@fz-juelich.de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |c.friedr...@fz-juelich.de

--- Comment #6 from c.friedr...@fz-juelich.de ---
Slightly different case but probably the same bug:

      subroutine sub(i)
c      if(i==1.or.i==2) call sub1 ! this works
      if(any(i==[1,2])) call sub1 ! this does not
      call sub2                                                                 

      contains                                                                  

      subroutine sub1                                                           
      use iso_fortran_env                                                       
      real(real64) :: a                                                         
      end subroutine sub1                                                       

      subroutine sub2                                                           
      use iso_fortran_env                                                       
      real(real64) :: b                                                         
      end subroutine sub2

      end

Compilation fails with any optimization level different from -O0:
/tmp/ccZ13RIp.s: Assembler messages:
/tmp/ccZ13RIp.s:23: Error: symbol `__iso_fortran_env_MOD_real64' is already
defined

Slight changes of the code makes the error disappear. For example, not using
the "any" construction in the if command. Or commenting out one of the two
subroutine calls. Or commening out any of the declarations (a or b) in the
subroutines. Or using "real(8)" instead of "real(real64)".

Tested versions: 5.5.0, 7.3.0

Reply via email to