* [Ada] Error on T'Reduce of when T is not a container
@ 2021-04-29 8:03 Pierre-Marie de Rodat
0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2021-04-29 8:03 UTC (permalink / raw)
To: gcc-patches; +Cc: Bob Duff
[-- Attachment #1: Type: text/plain, Size: 310 bytes --]
This patch fixes a bug that caused the compiler to crash on T'Reduce, if
T is something like Integer.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* sem_attr.adb (Analyze_Attribute): Change "$" to "&".
Otherwise, Errout will trip over an uninitialized (invalid)
variable (Error_Msg_Unit_1).
[-- Attachment #2: patch.diff --]
[-- Type: text/x-diff, Size: 460 bytes --]
diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb
--- a/gcc/ada/sem_attr.adb
+++ b/gcc/ada/sem_attr.adb
@@ -5682,7 +5682,7 @@ package body Sem_Attr is
null;
else
Error_Msg_NE
- ("cannot apply Reduce to object of type$", N, Typ);
+ ("cannot apply Reduce to object of type&", N, Typ);
end if;
elsif Present (Expressions (Stream))
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-04-29 8:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-29 8:03 [Ada] Error on T'Reduce of when T is not a container Pierre-Marie de Rodat
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).