public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/103980] New: -Wdouble-promotion triggers on s390x when it shouldn't.
@ 2022-01-11 20:02 rmaguire314 at gmail dot com
  2022-01-11 20:15 ` [Bug c/103980] " pinskia at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: rmaguire314 at gmail dot com @ 2022-01-11 20:02 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103980

            Bug ID: 103980
           Summary: -Wdouble-promotion triggers on s390x when it
                    shouldn't.
           Product: gcc
           Version: 10.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rmaguire314 at gmail dot com
  Target Milestone: ---

The file bug.c:

#include <stdio.h>

int main(void)
{
    float x = 1.0F;

    if (x == 0.0F)
        puts("Hi!");

    return 0;
}

Build with:
gcc -Wdouble-promotion bug.c -o test

No errors.

Build with:
gcc -Wdouble-promotion -std=c89 bug.c -o test

Produces:
bug.c: In function 'main':
bug.c:7:11: warning: implicit conversion from 'float' to 'double' to
match other operand of binary expression [-Wdouble-promotion]
    7 |     if (x == 0.0F)

This only occurs on the s390x architecture. arm64 and amd64 work normally.
I'm running Debian 11 s390x version via emulating and chroot (host is amd64).
GCC version:
gcc (Debian 10.2.1-6) 10.2.1 20210110

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-01-12 18:12 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-11 20:02 [Bug c/103980] New: -Wdouble-promotion triggers on s390x when it shouldn't rmaguire314 at gmail dot com
2022-01-11 20:15 ` [Bug c/103980] " pinskia at gcc dot gnu.org
2022-01-11 20:54 ` joseph at codesourcery dot com
2022-01-11 21:06 ` pinskia at gcc dot gnu.org
2022-01-11 21:33 ` joseph at codesourcery dot com
2022-01-11 22:22 ` rmaguire314 at gmail dot com
2022-01-12  2:04 ` [Bug target/103980] " pinskia at gcc dot gnu.org
2022-01-12  2:06 ` pinskia at gcc dot gnu.org
2022-01-12 17:44 ` rmaguire314 at gmail dot com
2022-01-12 18:12 ` pinskia at gcc dot gnu.org

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).