Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Invalid binary operation and USE statement order

Øystein_O_
Beginner
219 Views

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
Steven_L_Intel1
Employee
219 Views

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.

0 Kudos
Reply