>From Joel Sherrill:

Gcc on the head  fails to compile arm-rtems4.7 at the following point
when Ada is enabled.

../../xgcc -B../../  -c -g -O2      -W -Wall -gnatpg  s-auxdec.adb -o 
s-auxdec.o
s-auxdec.ads:286:13: alignment for "Aligned_Word" must be at least 4

The code is:

   type Aligned_Word is record
      Value : Short_Integer;
   end record;

   for Aligned_Word'Alignment use
      Integer'Min (2, Standard'Maximum_Alignment);

I (Laurent) think Standard'Maximum_Alignment comes from ada/targtyps.c

get_target_maximum_alignment (void)
{
  return BIGGEST_ALIGNMENT / BITS_PER_UNIT;
}

Joel confirmed that changing "Min (2" to "Min (4" enable this file to be
compiled, however my reading of the source would imply that BIGGEST_ALIGNMENT
is at least 32 on arm, so something else must be at play here, any idea?


-- 
           Summary: ada/s-auxdec.ads alignment issue for arm-rtems
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Keywords: build
          Severity: normal
          Priority: P3
         Component: ada
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: laurent at guerby dot net
GCC target triplet: arm-rtems


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24857

Reply via email to