This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix SPARC ICE
- To: Jakub Jelinek <jakub at redhat dot com>
- Subject: Re: [PATCH] Fix SPARC ICE
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Tue, 13 Jun 2000 14:23:55 -0600
- cc: Richard Henderson <rth at cygnus dot com>, gcc-patches at gcc dot gnu dot org
- Reply-To: law at cygnus dot com
In message <20000606193329.W474@sunsite.ms.mff.cuni.cz>you write:
> Hi!
>
> The following testsuite leads into infinite recursion on SPARC and generate
> s
> bad code on Alpha and other arches.
> The issue is that if some variable is declared with incomplete type which i
> s
> later on defined, DECL_ALIGN is 1 and gcc will use unaligned access because
> it things the field is aligned to 1 bit.
> IMNSHO alignment 1 bit for a declaration cannot be ever set by attribute an
> d
> this means that if the type has a more appropriate alignment in that case,
> it should use it.
>
> 2000-06-06 Jakub Jelinek <jakub@redhat.com>
>
> * expr.c (get_inner_reference): If decl was done with incomplete
> type which was later defined, try to use its type alignment.
Isn't there any way to find/fix the DECLs when we complete the type? It
seems to me like you're just papering over that problem by noting a bogus
value and looking elsewhere the for a value that might be useful.
If there isn't a way to fix things, then you must include comments in the
code about why you're doing what you're doing. Nothing in the patch itself
gives the reader any clue why you're looking at the alignment of the type
in certain special cases.
jeff