From: Jason Merrill <jason@redhat.com>
To: Andrew Pinski <pinskia@gmail.com>
Cc: Richard Henderson <rth@redhat.com>,
Andrew_Pinski@playstation.sony.com,
gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] Fix middle-end/30132: ICE with complex and taking the real part of a ?:
Date: Mon, 12 Nov 2007 21:22:00 -0000 [thread overview]
Message-ID: <4738B9A5.5040206@redhat.com> (raw)
In-Reply-To: <de8d50360711012116q61dd505cg26111e5e61dc18b6@mail.gmail.com>
Andrew Pinski wrote:
> * typeck.c (build_address): For COND_EXPR, create a?&b:&c instead
> of the plain &(a?b:c) so we don't get a temp variable in the gimplifier.
What about the other transformations in unary_complex_lvalue? Or the &*
optimization?
The problem is that build_address is trying to do something very simple,
but the name makes it attractive to other parts of the compiler that
want the address of something without all the diagnostics in
build_unary_op. Really it's only safe to call build_address if you know
that there aren't any tree simplifications to be done on the operand.
I think what we really need is to split out most of the address handling
in build_unary_op so we can call it with diagnostics on or off, call the
latter build_address, rename the current build_address to
build_addr_expr and go through the callers of build_address to see which
one they really want.
Jason
WARNING: multiple messages have this Message-ID
From: Jason Merrill <jason@redhat.com>
To: gcc-patches@gcc.gnu.org
Cc: Richard Henderson <rth@redhat.com>,
Andrew_Pinski@playstation.sony.com, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] Fix middle-end/30132: ICE with complex and taking the real part of a ?:
Date: Mon, 12 Nov 2007 21:28:00 -0000 [thread overview]
Message-ID: <4738B9A5.5040206@redhat.com> (raw)
Message-ID: <20071112212800.Nb1rQyI4WBn76zZ7E199frhBoBd3u526YraASeFwPHE@z> (raw)
In-Reply-To: <de8d50360711012116q61dd505cg26111e5e61dc18b6@mail.gmail.com>
Andrew Pinski wrote:
> * typeck.c (build_address): For COND_EXPR, create a?&b:&c instead
> of the plain &(a?b:c) so we don't get a temp variable in the gimplifier.
What about the other transformations in unary_complex_lvalue? Or the &*
optimization?
The problem is that build_address is trying to do something very simple,
but the name makes it attractive to other parts of the compiler that
want the address of something without all the diagnostics in
build_unary_op. Really it's only safe to call build_address if you know
that there aren't any tree simplifications to be done on the operand.
I think what we really need is to split out most of the address handling
in build_unary_op so we can call it with diagnostics on or off, call the
latter build_address, rename the current build_address to
build_addr_expr and go through the callers of build_address to see which
one they really want.
Jason
next prev parent reply other threads:[~2007-11-12 20:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-14 23:30 Andrew_Pinski
2007-03-15 11:34 ` Richard Guenther
2007-03-20 21:39 ` Richard Henderson
2007-11-02 4:17 ` Andrew Pinski
2007-11-02 14:08 ` Richard Guenther
2007-12-06 20:27 ` Jakub Jelinek
2007-11-12 21:22 ` Jason Merrill [this message]
2007-11-12 21:28 ` Jason Merrill
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=4738B9A5.5040206@redhat.com \
--to=jason@redhat.com \
--cc=Andrew_Pinski@playstation.sony.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=pinskia@gmail.com \
--cc=rth@redhat.com \
/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).