8212043: Request for help with Submit Failure
adinn at redhat.com
Fri Dec 14 09:36:22 UTC 2018
On 14/12/2018 07:43, Pengfei Li (Arm Technology China) wrote:
> Hope this is the last trial.
>> I don't know for sure what the actual errors are but I suspect that the
>> relevant compilers will not bite on the expression (1.0/0.0). It seems that
>> defining +/-INFINITY in a portable way is going to require some work.
> Actually, the expression (1.0/0.0) is good but (1.0d/0.0d) is not.
> I've reproduced the failure by building jdk on MacBook. I got below error messages.
> src/hotspot/share/opto/type.cpp:453:35: error: invalid suffix 'd' on floating constant
> TypeD::POS_INF = TypeD::make(1.0d/0.0d); // Double positive infinity
> ISO/IEC 9899:1999 Chapter 22.214.171.124 Paragraph 4 said: "An unsuffixed floating constant has type double. If suffixed by the letter f or F, it has type float. If suffixed by the letter l or L, it has type long double." And there's no definition for floating constant suffixed by letter d or D. So this is probably a feature only in GCC but not supported by other compilers in solaris/macOS/Windows. I've also tried to compile a simple C program with 1.0D by AArch64 LLVM and it fails.
> In the new webrev, the suffix letter d is removed. And to be consistent with other definitions above like "TypeF::ONE", the suffix letter f is removed as well. This patch passed build test on Intel/Arm servers and MacBook.
>  ISO/IEC 9899:1999 http://www.dii.uchile.cl/~daespino/files/Iso_C_1999_definition.pdf
That sounds pretty convincing to me. Thanks for doing such thorough
research and testing. I'll try the latest patch and keep my fingers
crossed that it works this time :-)
Senior Principal Software Engineer
Red Hat UK Ltd
Registered in England and Wales under Company Registration No. 03798903
Directors: Michael Cunningham, Michael ("Mike") O'Neill, Eric Shander
More information about the hotspot-compiler-dev