Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner

Invalid binary operation and USE statement order

Hi,

I have attached an example that should compile, and there are several ways to work around the bug. The comments on lines 229 through 235 show how the order of the USE statements determine if the code compiles or not.  It also compiles if I remove a subroutine from an interface ( line 139), but that is not a work around for my project.

 

This is the output from the compiler

C:\wdir>ifort invalid_binary_error.f90
Intel(R) Visual Fortran Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 17.0.0.109 Build 20160721
Copyright (C) 1985-2016 Intel Corporation.  All rights reserved.


invalid_binary_error.f90(247): error #6355: This binary operation is invalid for this data type.   [ERR]
   err = err + file%errorMessage()
----------^

invalid_binary_error.f90(247): error #6355: This binary operation is invalid for this data type.
   err = err + file%errorMessage()
----------------^

invalid_binary_error.f90(247): error #6549: An arithmetic or LOGICAL type is required in this context.
   err = err + file%errorMessage()
--------------^
compilation aborted for
invalid_binary_error.f90 (code 1)

 

Best regards,

Øystein

0 Kudos
1 Reply
Highlighted

Thanks for the nice test case

Thanks for the nice test case and your investigation notes. I am pretty sure this is the same compiler bug reported here, but it is not yet fixed. I will add this to the existing issue DPD200374263 and ping the developers for status.

Retired 12/31/2016
0 Kudos