[
https://issues.apache.org/jira/browse/STDCXX-862?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12589455#action_12589455
]
Farid Zaripov commented on STDCXX-862:
--------------------------------------
Here is my results (the gcc generates all zeros in all cases):
{noformat}
$ CC -V t.cpp && ./a.out
CC: Sun C++ 5.9 Linux_i386 Patch 124865-01 2007/07/30
GNU ld version 051128 20051128
Supported emulations:
elf_i386
i386linux
ccfe: Sun C++ 5.9 Linux_i386 Patch 124865-01 2007/07/30
12: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00011111 11101101
12: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 01111111 11111101
$ CC -V -O t.cpp && ./a.out
CC: Sun C++ 5.9 Linux_i386 Patch 124865-01 2007/07/30
ir2hf: Sun Compiler Common 12 Linux_i386 Patch 126997-01 2007/07/31
ube: Sun Compiler Common 12 Linux_i386 Patch 126997-01 2007/07/31
GNU ld version 051128 20051128
Supported emulations:
elf_i386
i386linux
/opt/SUNWspro/prod/bin/c++filt: Sun C++ 5.9 Linux_i386 Patch 124865-01
2007/07/30
ccfe: Sun C++ 5.9 Linux_i386 Patch 124865-01 2007/07/30
iropt: Sun Compiler Common 12 Linux_i386 Patch 126997-01 2007/07/31
12: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00100000 00010000
12: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00100000 00010000
$ icc -V t.cpp && ./a.out
Intel(R) C Compiler for applications running on IA-32, Version 10.1 Build
20080212 Package ID: l_cc_p_10.1.013
Copyright (C) 1985-2008 Intel Corporation. All rights reserved.
FOR NON-COMMERCIAL USE ONLY
Edison Design Group C/C++ Front End, version 3.8 (Feb 12 2008 22:39:30)
Copyright 1988-2006 Edison Design Group, Inc.
GNU ld (GNU Binutils for Ubuntu) 2.18
12: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00100000 00010000
12: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00100000 00010000
$ icc -V -O t.cpp && ./a.out
Intel(R) C Compiler for applications running on IA-32, Version 10.1 Build
20080212 Package ID: l_cc_p_10.1.013
Copyright (C) 1985-2008 Intel Corporation. All rights reserved.
FOR NON-COMMERCIAL USE ONLY
Edison Design Group C/C++ Front End, version 3.8 (Feb 12 2008 22:39:30)
Copyright 1988-2006 Edison Design Group, Inc.
GNU ld (GNU Binutils for Ubuntu) 2.18
12: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00100000 00010000
12: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00100000 00010000
{noformat}
> [Sun C++ 5.9] 0.char test failed due to different binary representation of
> "long double ld1 = 0" and "long double ld2 = 0."
> ---------------------------------------------------------------------------------------------------------------------------
>
> Key: STDCXX-862
> URL: https://issues.apache.org/jira/browse/STDCXX-862
> Project: C++ Standard Library
> Issue Type: Bug
> Components: Tests
> Affects Versions: 4.2.0
> Environment: Linux
> Reporter: Farid Zaripov
> Assignee: Farid Zaripov
> Priority: Trivial
> Fix For: 4.2.1
>
> Original Estimate: 1h
> Time Spent: 1h
> Remaining Estimate: 0h
>
> {noformat}
> $ cat test.cpp && CC test.cpp -o test && ./test
> #include <cassert>
> #include <cstring>
> int main ()
> {
> long double ld1 = 0;
> long double ld2 = 0.;
>
> assert (ld1 == ld2);
> assert (0 == memcmp (&ld1, &ld2, sizeof (ld1)));
>
> return 0;
> }
> test: test.cpp:10: Assertion `0 == memcmp (&ld1, &ld2, sizeof (ld1))' failed.
> Aborted
> {noformat}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.