summaryrefslogtreecommitdiff
path: root/gcc/ada/gnat1drv.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/gnat1drv.adb')
-rw-r--r--gcc/ada/gnat1drv.adb16
1 files changed, 10 insertions, 6 deletions
diff --git a/gcc/ada/gnat1drv.adb b/gcc/ada/gnat1drv.adb
index 04b26c58fa5..5e95182425d 100644
--- a/gcc/ada/gnat1drv.adb
+++ b/gcc/ada/gnat1drv.adb
@@ -123,6 +123,13 @@ procedure Gnat1drv is
Generate_SCIL := True;
end if;
+ -- Disable CodePeer_Mode in Check_Syntax, since we need front-end
+ -- expansion.
+
+ if Operating_Mode = Check_Syntax then
+ CodePeer_Mode := False;
+ end if;
+
-- Set ASIS mode if -gnatt and -gnatc are set
if Operating_Mode = Check_Semantics and then Tree_Output then
@@ -136,10 +143,11 @@ procedure Gnat1drv is
Inline_Active := False;
- -- Turn off SCIL generation in ASIS mode, since SCIL requires front-
- -- end expansion.
+ -- Turn off SCIL generation and CodePeer mode in semantics mode,
+ -- since SCIL requires front-end expansion.
Generate_SCIL := False;
+ CodePeer_Mode := False;
end if;
-- SCIL mode needs to disable front-end inlining since the generated
@@ -160,10 +168,6 @@ procedure Gnat1drv is
Front_End_Inlining := False;
Inline_Active := False;
- -- Turn off ASIS mode: incompatible with front-end expansion
-
- ASIS_Mode := False;
-
-- Disable front-end optimizations, to keep the tree as close to the
-- source code as possible, and also to avoid inconsistencies between
-- trees when using different optimization switches.