public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Pierre-Marie de Rodat <pmderodat@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-833] [Ada] Introduce Opt.CCG_Mode Date: Mon, 30 May 2022 08:30:32 +0000 (GMT) [thread overview] Message-ID: <20220530083032.36A4E3815FEE@sourceware.org> (raw) https://gcc.gnu.org/g:764169055b5b083f1f2167122c637ddc72c58095 commit r13-833-g764169055b5b083f1f2167122c637ddc72c58095 Author: Arnaud Charlet <charlet@adacore.com> Date: Fri Apr 22 08:32:37 2022 +0000 [Ada] Introduce Opt.CCG_Mode To handle code common to the old and the new CCG code generator. gcc/ada/ * gnat1drv.adb, opt.ads, sem_ch7.adb: Introduce CCG_Mode. Diff: --- gcc/ada/gnat1drv.adb | 1 + gcc/ada/opt.ads | 3 +++ gcc/ada/sem_ch7.adb | 4 ++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gcc/ada/gnat1drv.adb b/gcc/ada/gnat1drv.adb index 49ddf03d04b..5c6fd92a825 100644 --- a/gcc/ada/gnat1drv.adb +++ b/gcc/ada/gnat1drv.adb @@ -180,6 +180,7 @@ procedure Gnat1drv is -- Set all flags required when generating C code if Generate_C_Code then + CCG_Mode := True; Modify_Tree_For_C := True; Transform_Function_Array := True; Unnest_Subprogram_Mode := True; diff --git a/gcc/ada/opt.ads b/gcc/ada/opt.ads index 2ce24eec332..c2abbcee8ef 100644 --- a/gcc/ada/opt.ads +++ b/gcc/ada/opt.ads @@ -262,6 +262,9 @@ package Opt is -- Set to True to build, bind and link all the sources of a project file -- (switch -B) + CCG_Mode : Boolean := False; + -- Set to True when running as CCG (either via -gnatceg or via -emit-c) + Check_Aliasing_Of_Parameters : Boolean := False; -- GNAT -- Set to True to detect whether subprogram parameters and function results diff --git a/gcc/ada/sem_ch7.adb b/gcc/ada/sem_ch7.adb index c43686b10ee..03aecc0c932 100644 --- a/gcc/ada/sem_ch7.adb +++ b/gcc/ada/sem_ch7.adb @@ -409,7 +409,7 @@ package body Sem_Ch7 is -- should occur, so we need to catch all cases where the -- subprogram may be inlined by the client. - if not Generate_C_Code + if not CCG_Mode and then (Is_Inlined (Decl_Id) or else Has_Pragma_Inline (Decl_Id)) then @@ -431,7 +431,7 @@ package body Sem_Ch7 is -- unless we generate C code since inlining is then -- handled by the C compiler. - if not Generate_C_Code + if not CCG_Mode and then (Is_Inlined (Decl_Id) or else Has_Pragma_Inline (Decl_Id)) then
reply other threads:[~2022-05-30 8:30 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220530083032.36A4E3815FEE@sourceware.org \ --to=pmderodat@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).