]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR ada/92489 (internal error on Invalid_Value Attribute attribute)
authorEric Botcazou <ebotcazou@adacore.com>
Fri, 29 Nov 2019 09:07:53 +0000 (09:07 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Fri, 29 Nov 2019 09:07:53 +0000 (09:07 +0000)
PR ada/92489
Backport from mainline
2019-07-01  Ed Schonberg  <schonberg@adacore.com>

* exp_attr.adb (Expand_Attribute_Reference, case Invalid_Value):
Resolve result of call to Get_Simple_Init_Val, which may be a
conversion of a literal.

From-SVN: r278830

gcc/ada/ChangeLog
gcc/ada/exp_attr.adb

index e2efd819c042c2e63658ef3e10911aa9538ece94..5464c6b3d6865da467a5920ef560e3e77a01951a 100644 (file)
@@ -1,3 +1,13 @@
+2019-11-29  Eric Botcazou  <ebotcazou@adacore.com>
+
+       PR ada/92489
+       Backport from mainline
+       2019-07-01  Ed Schonberg  <schonberg@adacore.com>
+
+       * exp_attr.adb (Expand_Attribute_Reference, case Invalid_Value):
+       Resolve result of call to Get_Simple_Init_Val, which may be a
+       conversion of a literal.
+
 2019-11-25  Eric Botcazou  <ebotcazou@adacore.com>
 
        PR ada/92362
index 22368a19d0b8a39c07b0968b841016a22c489bc8..cbf7db372ff7a95d13961a40566f7681b9e6a9b8 100644 (file)
@@ -4242,6 +4242,11 @@ package body Exp_Attr is
       when Attribute_Invalid_Value =>
          Rewrite (N, Get_Simple_Init_Val (Ptyp, N));
 
+         --  The value produced may be a conversion of a literal, which
+         --  must be resolved to establish its proper type.
+
+         Analyze_And_Resolve (N);
+
       ----------
       -- Last --
       ----------