public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: law@redhat.com To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, Subject: Re: optimization/5793: optimisation causes an integer comparison to fail when it shouldn't Date: Wed, 06 Mar 2002 10:46:00 -0000 [thread overview] Message-ID: <20020306184601.18031.qmail@sources.redhat.com> (raw) The following reply was made to PR optimization/5793; it has been noted by GNATS. From: law@redhat.com To: amorris@providence.org Cc: gcc-gnats@gcc.gnu.org Subject: Re: optimization/5793: optimisation causes an integer comparison to fail when it shouldn't Date: Wed, 06 Mar 2002 11:44:34 -0700 In message <20020228200043.30339.qmail@sources.redhat.com>, amorris@providence. org writes: > > >Number: 5793 > >Category: optimization > >Synopsis: optimisation causes an integer comparison to fail when it s > houldn't > >Confidential: no > >Severity: serious > >Priority: medium > >Responsible: unassigned > >State: open > >Class: wrong-code > >Submitter-Id: net > >Arrival-Date: Thu Feb 28 12:06:00 PST 2002 > >Closed-Date: > >Last-Modified: > >Originator: Adam Morris > >Release: gcc version 3.0.2 > >Organization: > >Environment: > HP-UX11i 64 bit mode on an HP-PA machine. No environment variables set to m > odify gcc > >Description: > When compiled with optimisation an if statement fails when it should succeed > . > > The if statement looks like... > if (-1 == (pPort->sin_addr.s_addr = inet_addr(pcToHost))) > > After the assignment, pPort->sin_addr.s_addr is -1. If a cast to int is pla > ced in front of the assignment then this works with and without optimisation [ ... ] This is closely related to 5169, 5185 and 5264, though slightly different. It works with the current development sources (and I expect the 3.1 branch), but that's more by accident than by design as far as I can tell. Jeff
next reply other threads:[~2002-03-06 18:46 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-03-06 10:46 law [this message] -- strict thread matches above, loose matches on Subject: below -- 2003-02-19 11:00 ebotcazou 2002-02-28 12:16 amorris
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=20020306184601.18031.qmail@sources.redhat.com \ --to=law@redhat.com \ --cc=gcc-prs@gcc.gnu.org \ --cc=nobody@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).