[Ada] Crash on Image and Value attributes
authorJustin Squirek <squirek@adacore.com>
Mon, 8 Jul 2019 08:12:55 +0000 (08:12 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Mon, 8 Jul 2019 08:12:55 +0000 (08:12 +0000)
commitffec45e390555f4881c841271464a9c264adbbca
treed9a26463ee898d86646270a7aea40a0cc27f9692
parent0a90412010e4bd535df8c35d4bce95f321ebb6be
[Ada] Crash on Image and Value attributes

This patch fixes an issue whereby the creation of an enumeration within
package where Default_Scalar_Storage_Order is in effect may lead to a
crash when the attributes Image or Value are applied to objects of said
type or the type directly.

2019-07-08  Justin Squirek  <squirek@adacore.com>

gcc/ada/

* exp_imgv.adb (Build_Enumeration_Image_Tables): Default SSO for
the building of image tables.
(Expand_Image_Attribute): Minor cleanup.

gcc/testsuite/

* gnat.dg/sso16.adb: New testcase.

From-SVN: r273199
gcc/ada/ChangeLog
gcc/ada/exp_imgv.adb
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/sso16.adb [new file with mode: 0644]