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
64c7c095
Commit
64c7c095
authored
Oct 31, 2015
by
Eric Botcazou
Committed by
Eric Botcazou
Oct 31, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* gnat.dg/discr45.adb: New test.
From-SVN: r229630
parent
4fea442d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
0 deletions
+48
-0
gcc/testsuite/ChangeLog
+4
-0
gcc/testsuite/gnat.dg/discr45.adb
+44
-0
No files found.
gcc/testsuite/ChangeLog
View file @
64c7c095
2015-10-31 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/discr45.adb: New test.
2015-10-31 Tom de Vries <tom@codesourcery.com>
* gfortran.dg/assumed_type_2.f90: Update test.
...
...
gcc/testsuite/gnat.dg/discr45.adb
0 → 100644
View file @
64c7c095
-- { dg-do run }
-- { dg-options "-O2 -gnatws" }
procedure Discr45 is
function Ident_Int (I : Integer) return Integer is
begin
return I;
end;
procedure Proc (Signal : Boolean) is
subtype Index is Integer range 1..10;
type My_Arr is array (Index range <>) OF Integer;
type Rec (D3 : Integer := Ident_Int(1)) is record
case D3 is
when -5..10 => C1 : My_Arr(D3..Ident_Int(11));
when Others => C2 : Integer := Ident_Int(5);
end case;
end record;
X : Rec;
function Value return Rec;
pragma No_Inline (Value);
function Value return Rec is
begin
return X;
end;
begin
if X /= Value then
raise Constraint_Error;
elsif Signal then
raise Program_Error;
end if;
end;
begin
Proc (True);
end;
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