From 7780448ee07b7f80021feffd1f7e2a066818ceba Mon Sep 17 00:00:00 2001 From: pmderodat Date: Mon, 11 Jun 2018 09:18:12 +0000 Subject: [PATCH] [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 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261414 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/ChangeLog | 6 ++++++ gcc/ada/gnat1drv.adb | 9 ++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index c145d7216a18..b9bb4791dacf 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,9 @@ +2018-06-11 Yannick Moy + + * 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 * inline.adb (Build_Body_To_Inline): Consider case of extended return diff --git a/gcc/ada/gnat1drv.adb b/gcc/ada/gnat1drv.adb index 06b553664992..4325cf35e7d8 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; -- 2.47.2