This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: PR 19893 & array_ref bug
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Steve Ellcey <sje at cup dot hp dot com>
- Cc: gdr at integrable-solutions dot net, joseph at codesourcery dot com, Joe dot Buck at synopsys dot COM, gcc at gcc dot gnu dot org
- Date: Wed, 16 Mar 2005 14:01:48 -0800
- Subject: Re: PR 19893 & array_ref bug
- Organization: CodeSourcery, LLC
- References: <200503162158.NAA24062@hpsje.cup.hp.com>
Steve Ellcey wrote:
From: Gabriel Dos Reis <gdr@integrable-solutions.net>
|
| Make them array arguments, instead of pointer arguments. I'm not sure
| if GCC is smart enough to still vectorize them in that case, but
| that's the right way to express it. An aligned array-of-floats decays
| to an aligned pointer-to-float, i.e., the pointer is known to be
| aligned, but the object pointed to is just a float not an aligned
| float.
Agreed.
-- Gaby
But as Joseph pointed out we don't implement attributes on array
arguments so I get a warning when I try to use the __restrict__
attribute on the array arguments. Without the __restrict__ attribute I
am sure we would not do any vectorization and then what is the point of
the test?
I agree that it's pointless to change the test if GCC can't handle that.
It may be that this is a problem with no easy solution. The original
ICE you're after is caused because the input program is broken. But,
issuing an error about the input program may break real code -- and
there may be no other way to specify the behavior people want at
present. So, we may just have to live with the ICE.
It sounds like the right workplan is to start by fixing the compiler to
accept attribute on arrays and to handle the array-to-pointer conversion
properly. Then, the tests could be changed, and your original patch (to
issue an error) could be put in -- perhaps under control of an option to
allow people to use the old syntax for a while. Not simple, I realize.
--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
(916) 791-8304