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]

Re: [PATCH] Fix SPARC ICE



  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


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