From: Eric Botcazou Date: Fri, 29 Nov 2019 09:07:53 +0000 (+0000) Subject: re PR ada/92489 (internal error on Invalid_Value Attribute attribute) X-Git-Tag: releases/gcc-9.3.0~348 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d6ffddab11ca2ff7ab0defc27a21d61e900e4b02;p=thirdparty%2Fgcc.git re PR ada/92489 (internal error on Invalid_Value Attribute attribute) PR ada/92489 Backport from mainline 2019-07-01 Ed Schonberg * 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 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index e2efd819c042..5464c6b3d686 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,13 @@ +2019-11-29 Eric Botcazou + + PR ada/92489 + Backport from mainline + 2019-07-01 Ed Schonberg + + * 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 PR ada/92362 diff --git a/gcc/ada/exp_attr.adb b/gcc/ada/exp_attr.adb index 22368a19d0b8..cbf7db372ff7 100644 --- a/gcc/ada/exp_attr.adb +++ b/gcc/ada/exp_attr.adb @@ -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 -- ----------