aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYannick Moy <moy@adacore.com>2018-06-11 09:18:12 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2018-06-11 09:18:12 +0000
commita19711197eb4c7d72f493e808534faa490e94712 (patch)
treeb8bc7e9ef6f1a93a56e0f7ea7da3d26212f48432
parentd42dc0ade04ceb5b186fec9cdbc2554251753583 (diff)
downloadgcc-a19711197eb4c7d72f493e808534faa490e94712.zip
gcc-a19711197eb4c7d72f493e808534faa490e94712.tar.gz
gcc-a19711197eb4c7d72f493e808534faa490e94712.tar.bz2
[Ada] Do not query the representation information in CodePeer/GNATprove
Representation information generated when user calls the compiler with -gnatR switch is not available when running the frontend inside CodePeer or GNATprove. Do not query such information in that case, as this leads to spurious messages that it is not available. There is no impact on compilation. 2018-06-11 Yannick Moy <moy@adacore.com> gcc/ada/ * gnat1drv.adb: Do not check representation information in CodePeer and GNATprove modes, as these modes call a special backend instead of gigi, so do not have the information. From-SVN: r261414
-rw-r--r--gcc/ada/ChangeLog6
-rw-r--r--gcc/ada/gnat1drv.adb9
2 files changed, 14 insertions, 1 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index c145d72..b9bb479 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,5 +1,11 @@
2018-06-11 Yannick Moy <moy@adacore.com>
+ * gnat1drv.adb: Do not check representation information in CodePeer and
+ GNATprove modes, as these modes call a special backend instead of gigi,
+ so do not have the information.
+
+2018-06-11 Yannick Moy <moy@adacore.com>
+
* inline.adb (Build_Body_To_Inline): Consider case of extended return
of unconstrained type as one case where inlining is not supported.
(Expand_Inlined_Call): Remove special case for body as extended return
diff --git a/gcc/ada/gnat1drv.adb b/gcc/ada/gnat1drv.adb
index 06b5536..4325cf3 100644
--- a/gcc/ada/gnat1drv.adb
+++ b/gcc/ada/gnat1drv.adb
@@ -1455,6 +1455,9 @@ begin
-- representation information will be provided by the GNSA back end, not
-- gigi.
+ -- A special back end is always called in CodePeer and GNATprove modes,
+ -- unless this is a subunit.
+
if Back_End_Mode = Declarations_Only
and then
(not (Back_Annotate_Rep_Info or Generate_SCIL or GNATprove_Mode)
@@ -1468,7 +1471,11 @@ begin
Tree_Dump;
Tree_Gen;
Namet.Finalize;
- Check_Rep_Info;
+
+ if not (Generate_SCIL or GNATprove_Mode) then
+ Check_Rep_Info;
+ end if;
+
return;
end if;