Pragma Loop_Variant is expanded into code which is too complicated for
CodePeer to handle and results in messages with internal names. Disable
expansion.
Tested on x86_64-pc-linux-gnu, committed on trunk
gcc/ada/
* exp_prag.adb (Expand_Pragma_Loop_Variant): Disable expansion
in CodePeer mode.
diff --git a/gcc/ada/exp_prag.adb b/gcc/ada/exp_prag.adb
--- a/gcc/ada/exp_prag.adb
+++ b/gcc/ada/exp_prag.adb
@@ -2692,8 +2692,11 @@ package body Exp_Prag is
begin
-- If pragma is not enabled, rewrite as Null statement. If pragma is
-- disabled, it has already been rewritten as a Null statement.
+ --
+ -- Likewise, do this in CodePeer mode, because the expanded code is too
+ -- complicated for CodePeer to analyse.
- if Is_Ignored (N) then
+ if Is_Ignored (N) or else CodePeer_Mode then
Rewrite (N, Make_Null_Statement (Loc));
Analyze (N);
return;