This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: fix c/17384


On Wed, 13 Oct 2004 16:39:28 -0700, Richard Henderson <rth@redhat.com> wrote:
> The problem in this pr is that we create a empty RECORD_TYPE node,
> attempt to apply the attributes, which stomps on the type node
> replacing it with an INTEGER_TYPE node.  We return from applying
> the attributes and then attempt to add the fields to the record
> and lay out the type.  Needless to say, adding fields to an
> INTEGER_TYPE node causes problems.
> 
> My fix is to deny application of a mode if it changes the base
> type.  As a consequence, it is no longer legal to write
> 
>         int foo __attribute__((mode(SF)))
> 
> because INTEGER_TYPE and REAL_TYPE don't match.  You must use
> 
>         float foo __attribute__((mode(SF)))

I'm now getting
glsimd.h: warning: specifying vector types with __attribute__ ((mode))
is deprecated
glsimd.h: warning: use __attribute__ ((vector_size)) instead
glsimd.h: error: mode 'V4SF' applied to inappropriate type

for

typedef float v4sf __attribute__((mode(V4SF)));

and I have no idea what basetype to use.

Richard.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]