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
927f4842
Commit
927f4842
authored
Apr 07, 2010
by
Janne Blomqvist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PR fortran/40539 Document LOGICAL representation
From-SVN: r158080
parent
87cf0651
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
6 deletions
+37
-6
gcc/fortran/ChangeLog
+6
-0
gcc/fortran/gfortran.texi
+31
-6
No files found.
gcc/fortran/ChangeLog
View file @
927f4842
2010-04-07 Janne Blomqvist <jb@gcc.gnu.org>
PR fortran/40539
* gfortran.texi: Add section about representation of
LOGICAL variables.
2010-04-07 Simon Baldwin <simonb@google.com>
2010-04-07 Simon Baldwin <simonb@google.com>
* cpp.c (cb_cpp_error): Add warning reason argument, set a value
* cpp.c (cb_cpp_error): Add warning reason argument, set a value
...
...
gcc/fortran/gfortran.texi
View file @
927f4842
...
@@ -181,7 +181,7 @@ Part I: Invoking GNU Fortran
...
@@ -181,7 +181,7 @@ Part I: Invoking GNU Fortran
Part
II
:
Language
Reference
Part
II
:
Language
Reference
*
Fortran
2003
and
2008
status
::
Fortran
2003
and
2008
features
supported
by
GNU
Fortran
.
*
Fortran
2003
and
2008
status
::
Fortran
2003
and
2008
features
supported
by
GNU
Fortran
.
*
Compiler
Characteristics
::
KIND
type
parameters
supported
.
*
Compiler
Characteristics
::
User
-
visible
implementation
details
.
*
Mixed
-
Language
Programming
::
Interoperability
with
C
*
Mixed
-
Language
Programming
::
Interoperability
with
C
*
Extensions
::
Language
extensions
implemented
by
GNU
Fortran
.
*
Extensions
::
Language
extensions
implemented
by
GNU
Fortran
.
*
Intrinsic
Procedures
::
Intrinsic
procedures
supported
by
GNU
Fortran
.
*
Intrinsic
Procedures
::
Intrinsic
procedures
supported
by
GNU
Fortran
.
...
@@ -962,14 +962,13 @@ about the current Fortran 2008 implementation status.
...
@@ -962,14 +962,13 @@ about the current Fortran 2008 implementation status.
@node
Compiler
Characteristics
@node
Compiler
Characteristics
@chapter
Compiler
Characteristics
@chapter
Compiler
Characteristics
@c
TODO
:
Formulate
this
introduction
a
little
more
generally
once
This
chapter
describes
certain
characteristics
of
the
GNU
Fortran
@c
there
is
more
here
than
KIND
type
parameters
.
compiler
,
that
are
not
specified
by
the
Fortran
standard
,
but
which
might
in
some
way
or
another
become
visible
to
the
programmer
.
This
chapter
describes
certain
characteristics
of
the
GNU
Fortran
compiler
,
namely
the
KIND
type
parameter
values
supported
.
@menu
@menu
*
KIND
Type
Parameters
::
*
KIND
Type
Parameters
::
*
Internal
representation
of
LOGICAL
variables
::
@end
menu
@end
menu
...
@@ -1013,6 +1012,32 @@ imaginary part are a real value of the given size). It is recommended to use
...
@@ -1013,6 +1012,32 @@ imaginary part are a real value of the given size). It is recommended to use
the
@code
{
SELECT_
*
_KIND
}
intrinsics
instead
of
the
concrete
values
.
the
@code
{
SELECT_
*
_KIND
}
intrinsics
instead
of
the
concrete
values
.
@node
Internal
representation
of
LOGICAL
variables
@section
Internal
representation
of
LOGICAL
variables
@cindex
logical
,
variable
representation
The
Fortran
standard
does
not
specify
how
variables
of
@code
{
LOGICAL
}
type
are
represented
,
beyond
requiring
that
@code
{
LOGICAL
}
variables
of
default
kind
have
the
same
storage
size
as
default
@code
{
INTEGER
}
and
@code
{
REAL
}
variables
.
The
GNU
Fortran
internal
representation
is
as
follows
.
A
@code
{
LOGICAL
(
KIND
=
N
)}
variable
is
represented
as
an
@code
{
INTEGER
(
KIND
=
N
)}
variable
,
however
,
with
only
two
permissible
values
:
@code
{
1
}
for
@code
{.
TRUE
.}
and
@code
{
0
}
for
@code
{.
FALSE
.}.
Any
other
integer
value
results
in
undefined
behavior
.
Note
that
for
mixed
-
language
programming
using
the
@code
{
ISO_C_BINDING
}
feature
,
there
is
a
@code
{
C_BOOL
}
kind
that
can
be
used
to
create
@code
{
LOGICAL
(
KIND
=
C_BOOL
)}
variables
which
are
interoperable
with
the
C99
_Bool
type
.
The
C99
_Bool
type
has
an
internal
representation
described
in
the
C99
standard
,
which
is
identical
to
the
above
description
,
i
.
e
.
with
1
for
true
and
0
for
false
being
the
only
permissible
values
.
Thus
the
internal
representation
of
@code
{
LOGICAL
}
variables
in
GNU
Fortran
is
identical
to
C99
_Bool
,
except
for
a
possible
difference
in
storage
size
depending
on
the
kind
.
@c
---------------------------------------------------------------------
@c
---------------------------------------------------------------------
@c
Extensions
@c
Extensions
@c
---------------------------------------------------------------------
@c
---------------------------------------------------------------------
...
...
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