This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix c/69643, named address space wrong-code
- From: Richard Henderson <rth at redhat dot com>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Jakub Jelinek <jakub at redhat dot com>
- Date: Fri, 5 Feb 2016 09:35:56 +1100
- Subject: Re: [PATCH] Fix c/69643, named address space wrong-code
- Authentication-results: sourceware.org; auth=none
- References: <56B1984A dot 9010208 at redhat dot com> <0B773821-D6B7-489A-A8A5-C37520FFFA13 at gmail dot com> <56B1A805 dot 5090901 at redhat dot com> <4BCE1023-7CFB-45F4-B0F7-D31160C6B895 at gmail dot com> <56B26359 dot 5060802 at redhat dot com> <56B274D2 dot 8020109 at redhat dot com> <CAFiYyc2K5htJ5_O9CuHUtbN=b5BM6UXg85Oa8NxnMZpYX4qSRA at mail dot gmail dot com> <56B3BCEF dot 1020600 at redhat dot com> <B214F119-274E-438F-9DD9-16A1B2C35819 at gmail dot com>
On 02/05/2016 08:59 AM, Richard Biener wrote:
This version fails to fall through to the next code block when
(1) Both types are pointers,
(2) Both types have the same address space,
which will do the wrong thing when
(3) The pointers have different modes.
Recall that several ports allow multiple modes for pointers.
Oh, I thought they would be different address spaces.
They probably should be.
So we'd need to add a mode check as well.
Yes. But why make this one expression so complicated that it's hard to read,
as opposed to letting the existing code that checks modes check the mode?
I hope we don't have different type bit-precision with the same mode for pointers here?
Not that I'm aware. ;-)
r~