https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63725
Bug ID: 63725 Summary: Scalar_Storage_Order is required for nested string types, but cannot be added to those types Product: gcc Version: 4.9.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ada Assignee: unassigned at gcc dot gnu.org Reporter: daniel.merrill at psware dot com Created attachment 33878 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33878&action=edit demonstrates the problem with nested string types and scalar storage order Target: i686-pc-linux-gnu Configured with: ../configure --enable-languages=c,c++,ada --disable-multilib -- with-gcc --with-gnu-ld --with-gnu-as --target=i686-pc-linux-gnu --prefix=/c/gcc- ade -v --with-sysroot=/c/gcc-ade/i686-pc-linux-gnu --includedir=/c/gcc-ade/i686- pc-linux-gnu/usr/include Thread model: posix gcc version 4.10.0 20140706 (experimental) (GCC) This is a build of the svn://gcc.gnu.org/svn/gcc/branches/scalar-storage-order branch. when the following is defined and compiled with "gnatmake main.adb": subtype string_type is string (1..15); type string_array is array (1..2) of string_type; for string_array'Scalar_Storage_Order use System.High_Order_First; type BigEndianInt32Array is array (1..10) of int32; type bigEndianType is record ThirtyTwoBits : int32; SixteenBits : int16; TestStrings : string_array; end record; for bigEndianType use record ThirtyTwoBits at 0 range 0 .. 31; SixteenBits at 0 range 32 .. 47; TestStrings at 0 range 48 .. 79; end record; for bigEndianType'Bit_Order use System.High_Order_First; for bigEndianType'Scalar_Storage_Order use System.High_Order_First; the following compiler error is produced: main.adb:17:04: nested composite must have explicit scalar storage order You are unable to fix this because the nested type is a subtype of string and you cannot define a scalar_storage_order attribute for a subtype.