Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

WIN64: '__assume expression with side effects discarded' warnings for MPFR builds using ICC

sav
Novice
635 Views

Hello, everyone,

For MPFR builds using Windows ICC got warnings:

uceil_exp2.c(38): warning #2261: __assume expression with side effects discarded
    MPFR_ASSERTN(d <= 1024.0);
    ^
add1.c(40): warning #2261: __assume expression with side effects discarded
    MPFR_ASSERTD (! MPFR_UBF_EXP_LESS_P (b, c));
    ^

etc., which relate to '-fp:strict' (1 2) flag use. A testcase to reproduce warning added in attachment.

Reproduced for:

  • builds using Windows ICC with '-fp:strict' flag,

not reproduced for:

  • builds using Windows ICC without '-fp:strict' flag,
  • builds using MSVC with '-fp:strict' flag,
  • builds using mingw-w64 with '-frounding-math' flag (although it doesn't have '__assume').

Environment:

  • Windows 10 x64 10.0.17134.1,
  • ICC 2018 Update 3,
  • MSVC 2017 15.7.3,
  • Windows SDK 10.0.17134.12,
  • mingw-w64 x86_64 posix seh 8.1.0,
  • GMP-6.1.99-dev-r17649,
  • MPFR-4.1.0-dev-r13104.

Official Intel Documentation tells nothing particular what does it mean and how to solve it.

Such warnings were suppressed for Qt builds, since its Developers believe, that related code is correct (from which it follows, that this is a compiler bug).

MPFR Developers wondering whether this is a bug in ICC since "the use of __assume seems correct".

 

Best,

Alexander

 

0 Kudos
2 Replies
Viet_H_Intel
Moderator
635 Views

 Hi Alexander,

Can you provide a test case to investigate?

Thanks,

Viet

0 Kudos
sav
Novice
635 Views

Added testcase to the Description. Together with the newly revealed feature, that it relate to '-fp:strict' flag use.

Unfortunately ICC was unable to preprocess source file, so it can be build later. Thus testcase contains original source files.

 

Alexander

 

0 Kudos
Reply