Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
e310115e
Commit
e310115e
authored
Oct 26, 2015
by
Arnaud Charlet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code clean ups.
From-SVN: r229335
parent
ca7e6c26
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
18 deletions
+23
-18
gcc/ada/contracts.adb
+23
-18
No files found.
gcc/ada/contracts.adb
View file @
e310115e
...
...
@@ -431,20 +431,9 @@ package body Contracts is
Prag_Nam : Name_Id;
begin
-- Do not analyze the contract of an entry declaration unless annotating
-- the original tree. It is preferable to analyze the contract after the
-- entry declaration has been transformed into a subprogram declaration
-- to properly handle references to unpacked formals.
if Ekind_In (Subp_Id, E_Entry, E_Entry_Family)
and then not ASIS_Mode
and then not GNATprove_Mode
then
return;
-- Do not analyze a contract multiple times
els
if Present (Items) then
if Present (Items) then
if Analyzed (Items) then
return;
else
...
...
@@ -467,13 +456,29 @@ package body Contracts is
elsif Present (Items) then
-- Analyze pre- and postconditions
-- Do not analyze the pre/postconditions of an entry declaration
-- unless annotating the original tree for ASIS or GNATprove.
Prag := Pre_Post_Conditions (Items);
while Present (Prag) loop
Analyze_Pre_Post_Condition_In_Decl_Part (Prag);
Prag := Next_Pragma (Prag);
end loop;
-- ??? References to formals are causing problems during contract
-- expansion as the references resolve to the entry formals, not
-- the subprogram body emulating the entry body. This will have to
-- be addressed.
if Ekind_In (Subp_Id, E_Entry, E_Entry_Family)
and then not ASIS_Mode
and then not GNATprove_Mode
then
null;
-- Otherwise analyze the pre/postconditions
else
Prag := Pre_Post_Conditions (Items);
while Present (Prag) loop
Analyze_Pre_Post_Condition_In_Decl_Part (Prag);
Prag := Next_Pragma (Prag);
end loop;
end if;
-- Analyze contract-cases and test-cases
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment