[Ada] Crash on pragma Compile_Time_Warning with declared string constant
This patch fixes a compiler abort on a pragma Compile_Time_Warning when its
second argument is a reference to a constsant string (rather than a string
literal or an expression that evaluates to a string literal).
Compiling msain.adb must yield:
main.adb:5:33: warning: Good
main.adb:6:33: warning: VALLUE
main.adb:7:33: warning: Test
----
procedure Main is
Value : constant String := "Test";
Switch : constant Boolean := True;
begin
pragma Compile_Time_Warning (Switch, "Good");
pragma Compile_Time_Warning (Switch, "VAL" & "LUE");
pragma Compile_Time_Warning (Switch, value);
null;
end Main;
2018-05-22 Ed Schonberg <schonberg@adacore.com>
gcc/ada/
* sem_prag.adb (Process_Compile_Time_Warning_Or_Error): Handle properly
a second argument that is a constant of a given string value.
From-SVN: r260514