This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: 3.1 branch Ada cross report
- From: Joel Sherrill <joel dot sherrill at OARcorp dot com>
- To: Jim Wilson <wilson at redhat dot com>
- Cc: gcc at gcc dot gnu dot org, guerby at acm dot org
- Date: Thu, 02 May 2002 06:16:07 -0500
- Subject: Re: 3.1 branch Ada cross report
- Organization: OAR Corporation
- References: <3CCED372.616FBD2B@OARcorp.com> <xwun0vjtw5v.fsf@tonopah.toronto.redhat.com>
- Reply-to: joel dot sherrill at OARcorp dot com
Jim Wilson wrote:
>
> >i960-rtems -
> > ../../../gcc-to-merge/gcc/ada/utils.c: In function
> >`finish_record_type':
> > ../../../gcc-to-merge/gcc/ada/utils.c:868: `record_size' undeclared
> >(first use in this function)
>
> This is an Ada front end bug. You will get this error on most any target that
> defines ROUND_TYPE_SIZE, as it is using the undeclared record_size variable
> inside a section of code surrounded by #ifdef ROUND_TYPE_SIZE.
>
> This looks like a simple typo. I think the correct fix is this.
> I have made no attempt to verify this fix.
Can this be committed to both the 3.1 and CVS branch? With this
and some tinkering in my build procedure i960-rtems and powerpc-rtems
now build.
> 2002-05-01 Jim Wilson <wilson@redhat.com>
>
> * ada/utils.c (finish_record_type): Change record_size to record_type.
>
> Index: utils.c
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/ada/utils.c,v
> retrieving revision 1.17
> diff -p -r1.17 utils.c
> *** utils.c 18 Apr 2002 17:53:47 -0000 1.17
> --- utils.c 1 May 2002 21:03:33 -0000
> *************** finish_record_type (record_type, fieldli
> *** 853,859 ****
>
> #ifdef ROUND_TYPE_SIZE
> size = ROUND_TYPE_SIZE (record_type, size, TYPE_ALIGN (record_type));
> ! size_unit = ROUND_TYPE_SIZE_UNIT (record_size, size_unit,
> TYPE_ALIGN (record_type) / BITS_PER_UNIT);
> #else
> size = round_up (size, TYPE_ALIGN (record_type));
> --- 853,859 ----
>
> #ifdef ROUND_TYPE_SIZE
> size = ROUND_TYPE_SIZE (record_type, size, TYPE_ALIGN (record_type));
> ! size_unit = ROUND_TYPE_SIZE_UNIT (record_type, size_unit,
> TYPE_ALIGN (record_type) / BITS_PER_UNIT);
> #else
> size = round_up (size, TYPE_ALIGN (record_type));
--
Joel Sherrill, Ph.D. Director of Research & Development
joel@OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985