https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66837
Bug ID: 66837 Summary: Non-Native Default_Scalar_Storage_Order Breaks Enum'Image Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ada Assignee: unassigned at gcc dot gnu.org Reporter: MatthewS.Grochowalski at ge dot com Target Milestone: --- Created attachment 35949 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35949&action=edit Test Case Encountered with build of r225405 of the scalar-storage-order branch. Attached test case dies with a STORAGE_ERROR when calling 'Image() on enumeration values. The values in the index array generated by Exp_Imgv.Build_Enumeration_Image_Tables are being byte-swapped due to the Default_Scalar_Storage_Order pragma. System.Img_Enum_New.Image_Enumeration_16 (in this case) treats the index array as native scalar storage order, causing things to blow up.