From: "Joseph S. Myers" <joseph@codesourcery.com>
To: "Iyer, Balaji V" <balaji.v.iyer@intel.com>
Cc: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>,
Jakub Jelinek <jakub@redhat.com>,
"mpolacek@gcc.gnu.org" <mpolacek@gcc.gnu.org>
Subject: RE: [PATCH] Fix for PR c/57563
Date: Mon, 10 Jun 2013 15:16:00 -0000 [thread overview]
Message-ID: <Pine.LNX.4.64.1306101509500.15706@digraph.polyomino.org.uk> (raw)
In-Reply-To: <BF230D13CA30DD48930C31D4099330003A42D6CC@FMSMSX101.amr.corp.intel.com>
On Mon, 10 Jun 2013, Iyer, Balaji V wrote:
> > You don't say what the actual error was, and neither does the original PR.
> > But if it was an ICE from an EXCESS_PRECISION_EXPR getting to the gimplifier,
> > that suggests that c_fully_fold isn't getting called somewhere it should be - and
> > probably calling c_fully_fold is the correct fix rather than inserting a cast. If you
> > can get such ICEs for EXCESS_PRECISION_EXPR, it's quite possible you might get
> > them for C_MAYBE_CONST_EXPR as well (e.g. try using 0 / 0, or compound
> > literals of variably modified type, in various places in the affected expressions),
> > which should be fixed by using c_fully_fold but not by inserting a cast.
>
> It was not. It was actually a type mismatch between double and long
> double caught in verify_gimple_in_seq function. So, is it OK for trunk?
A cast still doesn't make sense conceptually. Could you give a more
detailed analysis of what the trees look like at this point where you are
inserting this cast, and how you get to a mismatch?
EXCESS_PRECISION_EXPR can be thought of as a conversion operator. It
should only appear at the top level of an expression. At the point where
excess precision should be removed - the value converted to its semantic
type - either the expression with excess precision should be folded using
c_fully_fold (if this is the expression of an expression statement, or
otherwise will go inside a tree that c_fully_fold does not recurse
inside), or the operand of the EXCESS_PRECISION_EXPR should be converted
to the semantic type with the "convert" function. In neither case is
generating a cast appropriate; that's for when the user actually wrote a
cast in their source code.
--
Joseph S. Myers
joseph@codesourcery.com
next prev parent reply other threads:[~2013-06-10 15:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-09 1:20 Iyer, Balaji V
2013-06-10 14:39 ` Joseph S. Myers
2013-06-10 15:08 ` Iyer, Balaji V
2013-06-10 15:16 ` Joseph S. Myers [this message]
2013-06-10 17:19 ` Iyer, Balaji V
2013-06-10 21:18 ` Joseph S. Myers
2013-06-10 22:16 ` Iyer, Balaji V
2013-06-10 22:45 ` Joseph S. Myers
2013-06-10 22:18 ` FW: " Iyer, Balaji V
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=Pine.LNX.4.64.1306101509500.15706@digraph.polyomino.org.uk \
--to=joseph@codesourcery.com \
--cc=balaji.v.iyer@intel.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@redhat.com \
--cc=mpolacek@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: link
Be 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).