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
459348d4
Commit
459348d4
authored
Nov 16, 2008
by
Eric Botcazou
Committed by
Eric Botcazou
Nov 16, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* gnat.dg/boolean_bitfield.adb: New test.
From-SVN: r141918
parent
06919226
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/boolean_bitfield.adb
+44
-0
No files found.
gcc/testsuite/ChangeLog
View file @
459348d4
2008-11-16 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/boolean_bitfield.adb: New test.
2008-11-16 Tobias Burnus <burnus@net-b.de>
PR fortran/38095
...
...
gcc/testsuite/gnat.dg/boolean_bitfield.adb
0 → 100644
View file @
459348d4
-- { dg-do run }
-- { dg-options "-O" }
with System; use System;
procedure Boolean_Bitfield is
Units_Per_Integer : constant :=
(Integer'Size + System.Storage_Unit - 1) / System.Storage_Unit;
type E_type is (Red, Blue, Green);
type Parent_Type is record
I : Integer range 0 .. 127 := 127;
C : Character := 'S';
B : Boolean := False;
E : E_Type := Blue;
end record;
for Parent_Type use record
C at 0 * Units_Per_Integer range 0 .. Character'Size - 1;
B at 1 * Units_Per_Integer range 0 .. Boolean'Size - 1;
I at 2 * Units_Per_Integer range 0 .. Integer'Size/2 - 1;
E at 3 * Units_Per_Integer range 0 .. Character'Size - 1;
end record;
type Derived_Type is new Parent_Type;
for Derived_Type use record
C at 1 * Units_Per_Integer range 1 .. Character'Size + 1;
B at 3 * Units_Per_Integer range 1 .. Boolean'Size + 1;
I at 5 * Units_Per_Integer range 1 .. Integer'Size/2 + 1;
E at 7 * Units_Per_Integer range 1 .. Character'Size + 1;
end record;
Rec : Derived_Type;
begin
Rec := (12, 'T', True, Red);
if (Rec.I /= 12) or (Rec.C /= 'T') or (not Rec.B) or (Rec.E /= Red) then
raise Program_Error;
end if;
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