diff options
author | Bob Duff <duff@adacore.com> | 2021-08-17 11:02:51 -0400 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2021-10-01 06:13:39 +0000 |
commit | ea0b5b656a0e90bc9bb3ab0920796b24a9387d76 (patch) | |
tree | 8bfe97cd6152d52664f3591e26e030761f3a7ac9 /gcc | |
parent | 29ada0e5a2ec9545a94fafeac21ac074d306376d (diff) | |
download | gcc-ea0b5b656a0e90bc9bb3ab0920796b24a9387d76.zip gcc-ea0b5b656a0e90bc9bb3ab0920796b24a9387d76.tar.gz gcc-ea0b5b656a0e90bc9bb3ab0920796b24a9387d76.tar.bz2 |
[Ada] Subprogram_Variant in ignored ghost code
gcc/ada/
* exp_ch6.adb (Expand_Call_Helper): Do not call
Check_Subprogram_Variant if the subprogram is an ignored ghost
entity. Otherwise the compiler crashes (in debug builds) or
gives strange error messages (in production builds).
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/exp_ch6.adb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/ada/exp_ch6.adb b/gcc/ada/exp_ch6.adb index ffd1475..ce0bb80 100644 --- a/gcc/ada/exp_ch6.adb +++ b/gcc/ada/exp_ch6.adb @@ -4392,6 +4392,7 @@ package body Exp_Ch6 is -- the current subprogram is called. if Is_Subprogram (Subp) + and then not Is_Ignored_Ghost_Entity (Subp) and then Same_Or_Aliased_Subprograms (Subp, Current_Scope) then Check_Subprogram_Variant; |