This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [gomp4, 10/23] Ensure address space gets set on array types
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Bernd Schmidt <bernds at codesourcery dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 9 Dec 2013 23:05:05 +0000
- Subject: Re: [gomp4, 10/23] Ensure address space gets set on array types
- Authentication-results: sourceware.org; auth=none
- References: <52A5D8D4 dot 2030803 at codesourcery dot com> <52A5DB9D dot 50801 at codesourcery dot com> <Pine dot LNX dot 4 dot 64 dot 1312092241520 dot 22134 at digraph dot polyomino dot org dot uk> <52A64799 dot 6010600 at codesourcery dot com>
On Mon, 9 Dec 2013, Bernd Schmidt wrote:
> On 12/09/2013 11:42 PM, Joseph S. Myers wrote:
> > On Mon, 9 Dec 2013, Bernd Schmidt wrote:
> >
> >> Most of the compiler expects TYPE_ADDR_SPACE to be valid for things like
> >> initializing a MEM. The C frontend does not set it for arrays, which
> >> seems like an oversight caused by not setting other type qualifiers for
> >> array types.
> >
> > I see nothing in TR 18037 to make address space qualifiers different from
> > other qualifiers with regard to the rule that qualifiers apply to element
> > types rather than array types.
>
> But is this relevant? We're dealing with the compiler's internal
> representation here, and everything assumes that TYPE_ADDRESS_SPACE is
> set properly for an object in a different address space.
It's a mistake for the internal representation to differ from what the
qualifiers are in C standard terms, at least within the front end (it's
possible qualifiers should be adjusted at some lowering stage).
--
Joseph S. Myers
joseph@codesourcery.com