public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "serge.ayoun at outlook dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/110321] New: Double precision comaprison does not seem to work well when -std=c++17 option is selected Date: Tue, 20 Jun 2023 15:14:41 +0000 [thread overview] Message-ID: <bug-110321-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110321 Bug ID: 110321 Summary: Double precision comaprison does not seem to work well when -std=c++17 option is selected Product: gcc Version: 13.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: serge.ayoun at outlook dot com Target Milestone: --- The following code: int main(int, char**) { double a = 2.2; if ( a == 2.2) return 1; return 0; } compiled and link with the following instruction: g++ -O0 -m32 -std=c++17 with gcc 11.1, returns 1 as expected with gcc 13.1, returns 0. when -std=c++17 is removed, both return 0 as expected. for exact reproduction See: https://godbolt.org/#z:OYLghAFBqd5QCxAYwPYBMCmBRdBLAF1QCcAaPECAMzwBtMA7AQwFtMQByARg9KtQYEAysib0QXACx8BBAKoBnTAAUAHpwAMvAFYTStJg1DIApACYAQuYukl9ZATwDKjdAGFUtAK4sGe1wAyeAyYAHI%2BAEaYxHoADqgKhE4MHt6%2BcQlJAkEh4SxRMVy2mPaOAkIETMQEqT5%2BRXaYDskVVQQ5YZHRegqV1bXpDX3twZ353VwAlLaoXsTI7BzBBADULEzBEMukK8gIVQBUB5MmGgCCJgDsFiunZysPK%2BizEfQrTLcAzAAiK2YAdGYTJ8rOdHis8FQVhB3l9vsDfgCzJMVsRMAQ5gwVlxgTc7uC0RjiFiNLjbucrt8ONNaJwAKy8PwcLSkVCcNzWawrBSzeaYW5mT48UgETTU6YAaxAkku/zpAE4uBoAGzyz6fDRceXyy7Kun6TiSRli1mcXgKEAaEVi6ZwWAwRAoVAsWJ0aLkShoF1umLALhC0hYABueAWADU8JgAO4AeVijE4wpotAI0QtEAiJoiwSqAE9E7xs8xiLmYxFtE1RdxeF62IIYwxaPnmbwsBEvMA3GJaBbq4HMOsjOIW4G8GjmkHML2WZhVE0vKmC%2BRBCUTbQ8BFiHmPFgTQRiHgWAXplQDMAFBHo3GE33%2BIIRGJ2FIZIJFCp1CPdEUDEYUJzLPoG4WpA0yoLEZQML2AC0MYaCsUEsJ8Zjwb06AIqYljWFwly8Kgk7EAeWDARA0yNM0zgQK4Az1KQgSjHkBQZIkEHUUxWQMB0DETMUpQtMMrENCUlZ8W0nFdIUtj8Z4dQ9MMYnjIUpG8gsEg0vSxojmyHArKoAAcypQcqkgrMAyDINinz/Fw0K4IQJACkKky8FWWiTJKIB0latIcEapBHpI8r/Boum6ZcZjypqyqXPpdKXKQTIslp5qWtaLa2g6EBIF6rr0GQFAQNlPogH6XBFMGoaYJesbxkySZ0KmxDppmI5FnmS6tSWZYVg4S61owBANk2Jpth2Xa0D2S5YIOwDDiy%2BDjo4k7Trws7zoufbLKuI7rpu24YIsLL7oex58GeF6RtVN5JrID7iM%2Bd7yEoagmroZj6IYxj/jYO3EaB4HJNBsHwYhyFQah6FfdhuH4YRU7wKRQnkX4lEMO40mDLRqPyYxRTxMxyQCaQePsdj3FkRBrT9OjNHkyJ1SkxJvRtITTP0/R4mqTMcwqVMBocAy8UmlpOn6YZxmmeZpVWTZ%2BBEMQDlTM5NrTAgmBMFgMQkXzvlHp5/yKlwZiXBo8q6Uh/qSJ8guaWatgpS54qkFKdIApIwVqiqqq6RoGiCvq3mfBpiW2w7bl82YQe4SHyukPhiTOJIQA%3D Thanks, Serge
next reply other threads:[~2023-06-20 15:14 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-06-20 15:14 serge.ayoun at outlook dot com [this message] 2023-06-20 15:18 ` [Bug c++/110321] " redi at gcc dot gnu.org 2023-06-20 15:21 ` pinskia at gcc dot gnu.org 2023-06-20 15:31 ` redi at gcc dot gnu.org 2023-06-20 16:21 ` serge.ayoun at outlook dot com
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-110321-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).