============================================================
Known problems in GNAT version 3.16a1 as of January 10, 2005
============================================================

Copyright (c) 2001-2005, Ada Core Technologies

The following is a listing of known problems in release 3.16a1. Except
where specifically noted, all these problems have been corrected in
version 5.01, which means they are corrected in any wavefront issued
subsequent to the date above, and in the final 5.01 (and subsequent
releases). The status line indicates the date the problem was fixed
(in ISO format YYYY-MM-DD). This can be used to determine if a given
wavefront has the fix identified in the entry. Some entries are marked
as fixed in 3.17, which means that the corresponding problem has also
been fixed in GNAT Pro 3.17w wavefronts.

An updated version of this file is available on Gnat Tracker, our
Gnat Pro customer web server.

KP-316a1-D416-012 Assembler error for complex expressions

  Problem:    On the x86, certain complex expressions can result in an
              error message from the assembler about invalid immediate
              expression values.

  Status:     Fixed in all 5.0x versions, not fixed in 3.17w

  Workaround: Simplify the expression in question, breaking it up into
              smaller subexpressions.

KP-316a1-D406-009 NT installer for GNAT Pro 3.16a1 corrupts the path

  Problem:    The NT installer for GNAT Pro 3.16a1 registers GNAT tools on
              the path in such a manner that system utilities may no longer
              be found on some systems.

  Status:     This is fixed in all releases after 3.16a1.

  Workaround: An automated tool fixreg-3.16a1.exe can be downloaded from
              the subdirectory tools/ of the GNAT Pro 3.16a1 release download
              area that will fix this problem for 3.16a1.

KP-316a1-D326-014 Unability to interrupt a program attached in the debugger.

  Problem:    On unix systems, if the user attach a program in the debugger,
              then during his debug session he will not be able to interrupt
              asynchronously the execution of this program from the debugger.

  Status:     This problem is fixed in 3.17 on 2004-03-30.

  Workaround: Use kill -INT <pid> to interrupt the program.

KP-316a1-D319-013 Debugger unable to dump an array in optimized code

  Problem:    On x86-windows, the debugger may not be able to compute correctly
              the bounds of an unconstrained array in optimized code. An
              internal error may happen when trying to dump the content of the
              unconstrained array.

  Status:     This problem was fixed in 3.17 on 2004-04-28

  Workaround: The internal error can be safely ignored. Use x/s on the address
              of the string to display it, or re-compile without optimization.

KP-316a1-D315-008 16 or 32bit Rotate on 64bit object produces wrong result

  Problem:    On some platforms, Interfaces.Rotate_Left/Right produces wrong
              results for 16 or 32bit rotations when a 64bit object is used
              both as the operation target and as the source operand.

  Status:     This problem was fixed in 5.02 and not in 3.17.

  Workaround: Ensure the operation target and source operand are different
              objects.

KP-316a1-D108-001 Compiler error when returning two-float record on MIPS

  Problem:    In some cases, an attempt to return a record that consists
              of two floating-point values will cause the compiler to abort.

  Status:     This was fixed in 3.17 on 2004-04-10.

  Workaround: Copy the expression to be returned into a temporary variable
              and return that variable.

KP-316a1-CC15-007 Error on fixed operation with real literals in conversion

  Problem:    Compiler emits a spurious type error on an expression that
              involves fixed-type operations on real literals, when the
              context is a type conversion.

  Status:     This was fixed in 3.17 on 2003-12-15

  Workaround: Qualify integer * real operation with desired fixed-point or
              floating point type.

KP-316a1-CC12-012 crash on conversion of anonymous array from other unit

  Problem:    Code generator aborts on a constant declaration of a local
              array type T, initialized with a conversion from an anonymous
              array declared in another package.

  Status:     This was fixed in 3.17 on 2003-12-20

  Workaround: Use an explicit array type in both places instead of an
              anonymous array in original declaration.

KP-316a1-CC05-003 memory leak in loop bounds with function call.

  Problem:    Program consumes memory on a nested loop when a bound is
              an attribute of an unconstrained array returned by a function.

  Status:     This was fixed in 3.17 on 2003-012-09

  Workaround: Introduce a temporary to compute the loop bound.

KP-316a1-CC02-023 Spurious error on pragma Warnings in inlined body

  Problem:    Compiler emits a spurious error on a pragma Warnings within an
              inlined body.

  Status:     This was fixed in 3.17 on 2003-11-03

  Workaround: Place pragma outside subprogram body, or compile unit without
              front-end inlining.

KP-316a1-CC02-022 Spurious error on inlined call returning array

  Problem:    Compiler emits a spurious error  mentioning 'Length on an
              inlined call when body of the function appears in an instance
              and the function returns a private type completed by an array.

  Status:     This was fixed in 3.17 on 2003-11-03

  Workaround: Compile unit without front-end inlining.

KP-316a1-CC02-009 Spurious error on conversion in inlined call from instance

  Problem:    Compiler emits a spurious error on an actual in an inlined call
              when the body of the subprogram to inline appears in an instance
              declared previously in the current scope.

  Status:     This was fixed in 3.17 on 2003-11-03

  Workaround: Compile unit without front-end inlining.

KP-316a1-CC01-012 inlining error on 'Constrained in instance

  Problem:    Compiler emits a spurious error on an attribute reference
              'Constrained that appears in an inlined call, when the
              body of the subprogram is declared in an instance.

  Status:     This was fixed in 3.17 on 2003-12-01

  Workaround: Compile unit without front-end inlining.

KP-316a1-CB30-005 Exception breapoint hit changes the language

  Problem:    The debugger sometimes incorrectly changes the language
              after hitting an exception breakpoint if the exception was
              raised during the execution of the last statement of
              a procedure or function.

  Status:     This problem was fixed in 5.02 on 2003-12-12

  Workaround: Manually force the language to Ada.

KP-316a1-CB21-010 Incorrect debugger information for array components on AAMP

  Problem:    On the AAMP target only, the decl-id associated with the
              DST information for an array type's element type is
              incorrect in cases where the element type is a private
              type (e.g., System.Address).

  Status:     This was fixed in 5.02 on 2003-11-25

  Workaround: Change the component type to a nonprivate type. Alternatively,
              create a record wrapper type with a single component of the
              array element type and redefine the array type to use the
              wrapper as its element type. However this will require
              editing all references to array elements to use selected
              component notation.

KP-316a1-CB20-018 AAMP debugger can't access address of exported subprograms

  Problem:    On the AAMP target only, the debugger is unable to locate
              the address of an exported subprogram.

  Status:     This was fixed in 5.03 on 2004-01-13

  Workaround: Edit the assembly file and change the name in the subprogram's
              INFO record and PROC_BEGIN/PROC_END macros to match the Ada name
              of the subprogram and add an EXPORT. macro for the subprogram's
              Export name (equating it to the Ada name).

KP-316a1-CB20-017 Usage displayed twice by "gnatmake -h"

  Problem:    When the command "gnatmake -h" is used, gnatmake usage
              is output twice.

  Status:     This was fixed in 5.02 on 2003-11-20

  Workaround: Do not use -h when calling gnatmake without a main

KP-316a1-CB20-011 AAMP debugging information not available for renamed objects

  Problem:    On the AAMP target only, the compiler does not generate
              debugger symbol table information for object renaming
              declarations.

  Status:     This was fixed in 5.02 on 2004-01-16

  Workaround: Use the name of the renamed object.

KP-316a1-CB19-021 Exception raised on assignment to unconstrained formal

  Problem:    When passing an unconstrained discriminated component
              of a class-wide object as an actual of mode in out, the
              compiler incorrectly treats the actual as constrained,
              which can lead to Constraint_Error for assignments
              to the formal parameter.

  Status:     This was fixed in 5.02 on 2003-11-20

  Workaround: Assign the selected discriminated component to a temporary
              object and pass the temporary as the actual, and then perform
              an assignment from the temporary back to the discriminated
              component after the call.

KP-316a1-CB19-017 Error on in-out conversion of array component

  Problem:    Compiler emits spurious type errors on an in-out actual that
              is a conversion of an array component, when the array index
              is an enumeration with a non-standard representation.

  Status:     This was fixed in 3.17 on 2003-11-25

  Workaround: Use renaming for actual, or use a temporary and write post-call
              assignment explicitly.

KP-316a1-CB17-018 Not all executables rebuilt after common source update

  Problem:    When a source common to several mains is updated, gnatmake
              invoked with these mains may fail to detect that one or
              several of these mains are not up to date and should be
              rebuilt (relinked).

  Status:     This was fixed in 5.02 on 2003-11-20

  Workaround: Use gnatmake with a single main on the command line

KP-316a1-CB17-006 Incorrect result with in-out conversion of packed slice.

  Problem:    An in-out parameter that is a type conversion of a slice
              of a bit-packed array is not updated correctly by the call.

  Status:     This was fixed in 3.17 on 2003-11-25

  Workaround: Introduce explicit temporary for slice, and explicit
              assignment after the call.

KP-501a-CB16-002 Suppress (Elaboration_Checks) does not work in task body

  Problem:    A function call within a select statement creates an elaboration
              dependency between the package that contains the task and the
              unit that contains the function, even when elaboration checks
              are suppressed by means of a pragma in the task body.

  Status:     This was fixed in 5.02 on 2003-11-20

  Workaround: Place pragma in the enclosing package, or use configuration
              pragma No_Entry_Calls_In_Elaboration_Code

KP-316a1-CB11-004 Spurious style check warnings on predefined file

  Problem:    When a file that has no explicit dependency on System is
              compiled with style checks, spurious warnings are generated
              on System.

  Status:     This was fixed in 3.17 on 2003-011-11

  Workaround: Do not apply style checks to the unit, or add a harmless
              with_clause for System.

KP-316a1-CB07-008 Incorrect backtrace from nested or local procedures

  Problem:    On mips-irix, GDB backtraces sometimes reference the wrong
              code location for nested procedures or procedures only
              defined in package bodies. This problem only occurs with
              a recent version of the IRIX linker.

  Status:     This was fixed in 3.17 on 2003-11-18

  Workaround: Define the nested and local procedures as global by
              declaring them inside a package specification.

KP-316a1-CB05-009 Problem with long pathname with Text_IO Create/Open

  Problem:    If a pathname with a size above OS limit is passed to
              Text_IO Create or Open an EXCEPTION_ACCESS_VIOLATION is
              raised.

  Status:     This was fixed in 3.17 on 2003-11-05

  Workaround: Be sure to check that the pathname does not exceed OS limit.
              On Windows, this limit is 260 characters.

KP-316a1-CB05-003 Spurious error on type derived from Bounded_String

  Problem:    Compiler emits a spurious type error on an expression that is
              a conversion of a call to To_Bounded_String, when the target
              type is derived from a type in an instance of Bounded_String.

  Status:     This was fixed in 3.17 on 2003-11-13

  Workaround: Use directly the inherited operation To_Bounded_String for
              the derived type.

KP-316a1-CB04-002 Problem with long pathname with GNAT.OS_Lib API on Win32

  Problem:    If a pathname with a size above OS limit is passed to
              OS_Lib.Is_Regular_File an EXCEPTION_ACCESS_VIOLATION is raised.

  Status:     This was fixed in 3.17 on 2003-11-05

  Workaround: Be sure to check that the pathname does not exceed OS limit.
              On Windows, this limit is 260 characters.

KP-316a1-CB03-001 Crash on complex address clause for initialized object

  Problem:    Compiler aborts on an address clause for an object of an
              initialized type, when the address clause is a non-static
              type conversion that includes array references and selected
              components.

  Status:     This was fixed in 3.17 on 2003-11-04

  Workaround: Introduce a constant of type Address to capture the desired
              expression, before the object declaration.

KP-316a1-CA30-010 Crash with Restrictions and subtype of Boolean

  Problem:    Compiler aborts on a unit that contains a subtype of Boolean
              and an equality operator declared on this subypte, when the
              unit is compiled in the presence of various Restrictions.

  Status:     This was fixed in 3.17 on 2003-10-30

  Workaround: Use Boolean directly, rather than the local subtype.

KP-316a1-CA29-039 gnatelim fails when the argument unit is a child subprogram

  Problem:    Whet the argument unit for gnatelim is a child subprogram
              gnatelim fails with junk diagnostic message

  Status:     This was fixed in 3.17 on 2003-10-31

 Workaround:  Redefine the argument subprogram as non-child unit and apply
              gnatelim to it. The result will be the same as if you apply
              gnatelim to the original child subprogram

KP-316a1-CA29-016 Wrong signal mask after abortion on VxWorks

  Problem:    After executing an abort statement, the abort signal was still
              masked out. VxWorks always mask out signals while they are
              handled until the handler ends its execution; however, exit
              from the handler is done differently in GNAT (through an
              exception handler).

  Status:     This was fixed in 3.17 on 2003-11-21

  Workaround: Unmask the abort signal manually from the user code that is
              executed as a result of the abort.

KP-316a1-CA29-009 Missing empty variant parts in ptype output from debugger.

  Problem:    The type information printed by the debugger for variant
              records is incomplete when the variant record contains
              empty variant parts located at the end of the type
              declaration. These empty variant parts will be missing
              from the debugger output.

  Status:     This was fixed in 3.17 on 2003-10-31

  Workaround: Use the type declaration in the source code.

KP-316a1-CA29-007 Incorrect ALI file written for -gnatQs if errors found

  Problem:    If a -gnats (syntax check only) compilation encounters
              errors, then an incorrect ali file is generated if
              -gnatQ is also specified. This is wrong, since -gnats
              should never result in an ALI file.

  Status:     This was fixed in 3.17 on 2003-10-29

  Workaround: Do not use -gnatQ in conjunction with -gnats

KP-316a1-CA27-009 Incorrect type resolution of universal fixed membership test

  Problem:    A membership test for a range whose bounds are universal
              fixed-point expressions (i.e. the result of multiplying a
              fixed-point value by a literal) may fail to resolve the
              range to an appropriate subtype.

  Status:     This was fixed in 3.17 on 2003-10-27.

  Workaround: Use a qualified expression to specify the subtype of one bound
              of the range explicitly.

KP-316a1-CA24-017 Incorrect packing of atomic components

  Problem:    A pragma pack for an array whose components are of an
              atomic type should be ignored (see RM C.6(21)), but GNAT
              incorrectly performs the packing anyway, resulting in
              possibly incorrect results if separate elements of this
              array are modified/referenced by separate tasks.

  Status:     This was fixed in 3.17 on 2003-10-25

  Workaround: Remove the useless pragma Pack

KP-316a1-CA24-013 Crash on dead code in tree-building mode

  Problem:    In tree-building mode, as for ASIS applications, compiler
              crashes on a variable declaration of a constrained array
              type, when the declaration appears in unreachable code in
              an instance.

  Status:     This was fixed in 3.17 on 2003-10-28

  Workaround: Do not compile this unit with -gnatct

KP-316a1-CA24-009 Breakpoint on function when first instruction is a branch

  Problem:    On x86 targets, if the first instruction after the prologue
              a function is a branch instruction, using the debugger command
              'break <func_name>' will not set the breakpoint after
              the prologue as expected, but at the target of the branch.

  Status:     This was fixed in 3.17 on 2004-04-30

  Workaround: Insert the breakpoint using the function address. For
              instance, use the "break *<func_name>'Address" command
              where "<func_name>" should be replaced by the function
              name, instead of "break <func_name>".

KP-316a1-CA24-001 Prooblem with Initialize_Scalars and derived string types

  Problem:    If a unit has types that are derived from String or Wide_String,
              and it is compiled without Initialize_Scalars, and a client of
              this unit is compiled with Initialize_Scalars, then at link time
              there may be an unresolved call to an initialization routine.

  Status:     This was fixed in 3.17 on 2003-10-25

  Workaround: Compile both units with Initialize_Scalars, or use a subtype
              of String or Wide_String instead of a derived type.

KP-316a1-CA23-016 GNAT.Calendar.Time_IO spells February wrong

  Problem:    The name of the second month of the year is improperly
              spelled when the picture format includes the full month
              name.

  Status:     This was fixed in 5.02 on 2003-10-24

  Workaround: Avoid using picture formats including %B

KP-316a1-CA23-015 GNAAMP fails on object initialized by packed bit array formal

  Problem:    On the AAMP target only, the compiler blows up on a declaration
              of a constrained array object initialized by a packed bit array
              given by an unconstrained formal parameter.

  Status:     This was fixed in 3.17 on 2003-11-24

  Workaround: Change the object declaration's subtype to the unconstrained
              array type of the formal, or alternatively initialize the
              constrained object by a separate assignment statement.

KP-316a1-CA23-009 incorrect code for signed packed component loads on AAMP

  Problem:    On the AAMP target only, the compiler generates incorrect
              code for loading packed components that allow negative values
              in their subtype.

  Status:     This was fixed in 3.17 on 2003-11-03

  Workaround: If the packed component can take on negative values, declare
              its subtype with a shifted unsigned range and adjust the value
              appropriately on loads and assignments.

KP-316a1-CA22-021 Base_Name checks for drive letters on UNIX

  Problem:    On UNIX machines, Directory_Operations.Base_Name does check for
              drive letters. This is not correct as a colon is valid on UNIX
              filenames.

  Status:     This was fixed in 5.02 on 2003-10-26

  Workaround: Avoid ':' in filename on UNIX

KP-316a1-CA22-018 incorrect code for word-crossing component loads on AAMP

  Problem:    On the AAMP target only, the compiler generates incorrect
              code for loading packed components crossing a word boundary.

  Status:     This was fixed in 3.17 on 2003-11-03

  Workaround: When possible, respecify the component to avoid crossing
              a word boundary. If the existing component specification
              is absolutely required, then it may be necessary to perform
              an unchecked conversion to a type that will allow explicit
              extraction of the component value (e.g., convert to a packed
              array of bits, or to an array or record of integers and use
              arithmetic or shift operations to obtain the component value).

KP-316a1-CA22-015 Spurious error when inlining with local use clause

  Problem:    Compiler emits spurious ambiguity errors on inlining a call
              for a function whose body is an instance, when the enclosing
              scope of the generic body includes a use clause for an
              unrelated unit that declares a predefined operator.

  Status:     This was fixed in 3.17 on 2003-11-24

  Workaround: Remove local use_clause, or move it to package specification.

KP-316a1-CA21-031 gnatmake and mains that are not in project files

  Problem:    When gnatmake is invoked with a project file and
              a main specified on the command line with directory
              information that is not a source of the main project,
              if there exists a source with the same simple name,
              this source is taken as the main.

  Status:     This was fixed in 3.17 on 2003-10-23

  Workaround: Do not specify directory information for mains.

KP-316a1-CA21-028 gnatmake, project files and foreign mains

  Problem:    When gnatmake is invoked with a project file and
              no main on the command line, if attribute Languages
              includes a language other than Ada and the attribute
              Mains is not an empty list, gnatmake will try to
              compile and build mains in languages other than Ada.

  Status:     This was fixed in 3.17 on 2003-10-23

  Workaround: When there are foreign mains in Attribute Mains,
              always invoke gnatmake with mains specified on the
              command line.

KP-316a1-CA16-008 Illegal dispatching call not flagged with -fstack-check

  Problem:    Certain illegal calls on tagged primitive subprograms are
              not caught when using the -fstack-check option. This occurs
              specifically in the context of an assignment with a qualified
              expression applied to a an illegal tag-indeterminate subprogram.

  Status:     This was fixed in 3.17 on 2003-10-17

  Workaround: Remove the illegal calls from the program. Note that the
              compiler correctly diagnoses the illegalities if the
              -fstack-check switch is not used.

KP-316a1-CA09-014 External_Tag not handled properly for private types

  Problem:    GNAT ignores a representation clause for External_Tag on a
              private type, if clause appears before full view.

  Status:     This was fixed in 3.17 on 2003-10-13

  Workaround: Place representation clause after full view.

KP-316a1-CA09-011 gnatmake crashes with many source directories

  Problem:    gnatmake, invoked with a project file, may crash when
              there is a source list file, the number of open file
              descriptors is limited and the number of source
              directories in all the project files is greater that
              this limited number of file descriptors

  Status:     This was fixed in 5.02 on 2003-10-10

  Workaround: Avoid source list files or increase the max number of
              open file descriptors.

KP-316a1-CA08-007 inlining bug on child instantiated in sibling

  Problem:    Compiler emits a spurious error when inlining a call to a
              function whose body is declared in an instance of a sibling
              of the current child unit.

  Status:     This was fixed in 3.17 on 2003-10-16

  Workaround: Remove pragma Inlined from function.

KP-316a1-CA03-010 Imported bit arrays should not be initialized to zero

  Problem:    The compiler initializes certain bit arrays to zero for
              supporting operations such as array comparison, but this
              initialization should not be done if a pragma Import applies
              to the array object.

  Status:     This was fixed in 3.17 on 2003-10-21

  Workaround: When possible, give an address specification for the bit
              array object, which will cause the suppression of the
              unwanted initialization. One way to do this is by declaring
              a separate imported (non-bit-array) object of a comparable
              size and specifying the bit array object's address as the
              address of the other object.

KP-316a1-CA03-006 Problem returning certain fields from function arguments

  Problem:    If a function returns a field of one of its input arguments
              and that field is more than 32 but less than 64 bits long,
              the optimizer may improperly reorder instructions used in
              extracting that field.

  Status:     This was fixed in 3.17 on 2003-10-08

  Workaround: Use an optimization level below 2 or make a temporary copy
              of the input argument.

KP-316a1-CA02-017 Crash on aggregate of pointers to private types.

  Problem:    Compiler aborts on a  declaration for an array of access types
              intialized with an aggregate of null values, when the designated
              type is private and its full view has not been seen yet.

  Status:     This was fixed in 3.17 on 2003-10-28

  Workaround: Remove redundant aggregate from declaration.

KP-316a1-CA02-002 Wrong file name in ALI file

  Problem:    In some cases, when using several project files,
              with package specs and package bodies in different
              projects, the wong file names are stoted in ALI files,
              and the sources are not found by gnatmake.

  Status:     This was fixed in 5.02 on 2003-10-02

  Workaround: Keep spec and body in the same project file.

KP-316a1-C924-010 Foreign sources unnecessarily compiled

  Problem:    When make is invoked on a Makefile produced by gpr2make,
              the project file includes Ada and C or C++ as languages,
              and the list of sources of the project file is specified,
              some foreign sources in the project source directories
              may be improperly compiled, even though they are not in
              the source list of the project.

  Status:     This was fixed in 5.02 on 2003-10-14

  Workaround: Do not put foreign sources that are not immediate
              sources of a project file in one of its source directories.

KP-316a1-C923-006 Pragma Unsuppress ineffective after a stub.

  Problem:    If a pragma Unsuppress appears in a package body before a stub
              for a subunit, the corresponding check is still suppressed in
              subsequent code.

  Status:     This was fixed in 3.17 on 2003-10-27

  Workaround: Repeat pragma after stub.

KP-316a1-C923-004 Problem with gdb stepping into a separate procedure

  Problem:    The debugger may not be able to step into a separate procedure,
              and may stop on the next line after the call instead of stopping
              at the beginning of this procedure. This problem may also occur
              in a C program if the body of a function is shared between
              several files (using #include).

  Status:     This was fixed in 3.17 on 2003-09-30

  Workaround: Use stepi (step instruction) instead of step.

KP-316a1-C922-004 Odd behavior if case specified in Source_File_Name pragma

  Problem:    If a Source_File_Name pragma (or if the project facility creates
              an equivalent Source_File_Name_Project pragma) specifies casing
              to be mixed case or upper case, then the compiler gets confused
              in loading predefined files. This showed up as a failure to
              allow intrinsic operators, but might have other consequences.

  Status:     This was fixed in 3.17 on 2003-09-26

  Workaround: Use standard casing for all files, or avoid the use of pattern
              entries, and use individual pragmas for each application file
              so that predefined files are not affected.

KP-316a1-C919-001 Spurious error on deallocation of dynamic of tasks.

  Problem:    Compiler gives a spurious type error on a deallocation when
              the argument is a pointer to an unconstrained array of tasks.

  Status:     This was fixed in 5.02 on 2003-09-19

  Workaround: Use an explicit loop to free each task.

KP-316a1-C918-006 GNAAMP back end incorrectly optimizes component accesses

  Problem:    On the AAMP target only, accesses to statically addressed
              components, including as part of composite comparison
              operations, are incorrectly optimized, resulting in
              addressing of adjacent or nearby storage elements.

  Status:     This was fixed in 3.17 on 2003-09-19

  Workaround: Do not enable optimization (-O1) when compiling units that
              involve problematic component addressing,

KP-316a1-C916-014 Incorrect usage displayed for -gnatyk/-gnatyr

  Problem:    The usage information displayed when a gnatmake command with
              no arguments is incorrect for -gnatyk/-gnatyr.

  Status:     This was fixed in 3.17 on 2003-09-20

  Workaround: Ignore the output, the usage information in the gnat users
              guide is correct.

KP-316a1-C916-011 Spurious discriminant check on record w/ controlled component

  Problem:    Constraint_Error is raised improperly on use of an object of
              an record type R that has a component that is a constrained
              record subtype S with controlled component, when the object is
              declared before the base type B of S is frozen.

  Status:     This was fixed in 3.17 on 2003-09-24

  Workaround: Introduce a variable of type B in before the declaration that
              mentions R.

KP-316a1-C916-007 Compiler crashes on overloaded index in entry family component

  Problem:    Compiler aborts on an attribute reference 'Count when the prefix
              is a component of an entry family, and the index is an overloaded
              function call or enumeration literal.

  Status:     This was fixed in 3.17 on 2003-09-22

  Workaround: Qualify the expression for the index to remove overloading.

KP-316a1-C912-008 GNAAMP emits incorrect debugger info for enumeration literals

  Problem:    On the AAMP target only, the debugger symbol table information
              for enumeration literals is incorrect: the DST info for a
              literal is given a decl-id corresponding to the literal's
              enumeration type DST record rather than identifying the
              literal itself. Also, the DST name for character literals
              is not of the correct form (it should be the image of the
              character literal).

  Status:     This was fixed in 3.17 on 2003-09-23

  Workaround: Avoid Facade debugger operations that depend on the decl-id
              of enumeration literals.

KP-316a1-C911-011 Providing several mains to gnatmake causes crash.

  Problem:    When gnatmake builds several mains, a crash may occur building
              a main that has at least one common unit with another main that
              is sufficiently large to cause this error.

  Status:     This was fixed in 3.17 on 2003-10-01

  Workaround: Invoke gnatmake with only one main

KP-316a1-C910-001 Crash on derived enumeration type with negative rep values

  Problem:    Code generator aborts on the use of an enumeration literal in
              a case statement, when the enumeration type is derived, and it
              has a representation clause with negative values.

  Status:     This issue was fixed in 3.17 on 2003-09-11

KP-316a1-C908-020 Windows linker fails on path with spaces

  Problem:    On Windows the linker fails in some cases when an argument
              contains spaces.

  Status:     This was fixed in 3.17 on 2003-09-10

  Workaround: Do not put Ada sources in a directory whose path contains
              spaces.

KP-316a1-C908-015 ASIS Corresponding_Name_Definition problem

  Problem:    If Corresponding_Name_Definition is applied to the reference
              that follows 'RENAMES', and if this happens inside an expanded
              generic, Corresponding_Name_Definition may blow
              up. This problem also affects gnatpp

  Status:     This was fixed in 3.17 on 2003-09-10.

  Workaround: Compute the result of Corresponding_Name_Definition manually,
              using other structural and semantic queries.

KP-316a1-C905-005 gnatmake compiles too many files

  Problem:    Sometimes, when using project files, gnatmake invoked
              with a main on the command line will recompile sources
              that are already up to date.

  Status:     This was fixed in 5.02 on 2003-11-16

  Workaround: Put the main in attribute Main of the project file and
              invoke gnatmake with the project file but with no main
              on the command line.

KP-316a1-C902-007 Library build fails with indirect import

  Problem:    On some platforms, such as VMS, when a library A imports
              indirectly another library B, linking the library A may
              fail if units of A are importing units of B.

  Status:     This was fixed in 3.17 on 2003-09-03

  Workaround: Import directly all library projects, to avoid
              indirect imports.

KP-316a1-C829-007 GNAAMP generates incorrect debug information for objects

  Problem:    On the AAMP target only, the debugger symbol table information
              for an array object with a static index constraint has an
              incorrect object classification (NIL_VAR_MODE, when it should
              be STATIC_ARRAY), and the type field of objects refers to
              the symbol table info for the base type instead of the
              subtype (so constraint information is not available).

  Status:     This was fixed in 3.17 on 2003-09-04

  Workaround: Avoid debugger queries for static array objects and
              for subtype constraint information on objects generally.

KP-316a1-C828-001 GNAT does not report unused entities in generic package

  Problem:    When compiling with warnings on unused entities, compiler
              fails to report unused entities in generic package declarations
              that have no bodies.

  Status:     This was fixed in 3.17on 2003-09-23

  Workaround: Ignore missing warnings.

KP-316a1-C827-009 GNAAMP generates incorrect debug info for private types

  Problem:    On the AAMP target only, incorrect (empty) range bounds are
              present in the debugger symbol table information for private
              types whose full type is a numeric type.

  Status:     This was fixed in 3.17 on 2003-09-04

  Workaround: Avoid debugger queries for private types and their
              full types when the full type has a range constraint,
              or make the type nonprivate.

KP-316a1-C827-008 Spurious link error with front-end inlining

  Problem:    If an inlined call appears within a nested procedure in a
              package body whose declaration is in the context of the main
              unit, the linker reports an unresolved reference.

  Status:     This was fixed in 3.17 on 2003-08-28

  Workaround: Compile main unit without front-end inlining.

KP-316a1-C826-010 Wrong dependencies between units with extended projects

  Problem:    When using extended projects, a source that incorrectly
              imports a library unit from a project it does not import
              directly or indirectly may compile successfully, while
              it should not.

  Status:     This was fixed in 5.02 on 2003-09-29

  Workaround: Correct the incorrect source

KP-316a-C825-011 Compiler hang with bad program and -gnatq

  Problem:    In some cases, the illegal appearence of a declare block in
              a declarative sequence can put the compiler into an infinite
              loop if semantic analysis is forced with -gnatq or -gnatQ.

  Status:     This was fixed in 3.17 on 2003-07-30

  Workaround: Avoid this illegal usage, or avoid using -gnatq, or use
              -gnatdO to force error messages to be output immediately.

KP-316a1-C825-004 Compiler crashes on instance with multiple formal packages

  Problem:    Compiler aborts on an instantiation of a generic package that
              has several formal packages, some with a box and some with
              explicit parameters.

  Status:     This was fixed in 3.17 on 2003-08-28

  Workaround: Place formal packages with parameters ahead of those with box.

KP-316a1-C820-017 GNAAMP generates wrong debug info for address clause objects

  Problem:    On the AAMP target only, incorrect debugger symbol table
              records are generated for objects with address clauses.

  Status:     This was fixed in 3.17 on 2003-09-04

  Workaround: Avoid debugger queries for objects with address clauses, or
              replace such objects with access objects initialized to
              point at the required address.

KP-316a1-C820-016 Crash on constrained access subtype components

  Problem:    Code generator aborts on a use of a record that has components
              of a constrained access type with a private designated type.

  Status:     This was fixed in 3.17 on 2003-08-22

  Workaround: Use unconstrained access type in the component declarations.

KP-316a1-C819-006 Unexpected SIGSTOP after attaching the debugger to a program

  Problem:    After being attached to a program using tasks on RedHat 9,
              the debugger fails to resume the execution of the
              application, and immediately reports the raise of
              an unexpected SIGSTOP signal.

  Status:     This problem was fixed in 5.02 on 2003-10-28.

  Workaround: Use the Linux Threads Library instead of the NPTL by
              setting the LD_ASSUME_KERNEL environment variable to
              the kernel version (eg 2.4.1).

KP-316a1-C811-010 Unable to interrupt the debugger

  Problem:    Certain GDB commands such as a "disassemble" on very large
              procedures can take a very long time to complete. During
              the execution of such commands, GDB is ignoring interrupt
              orders from the user (pressing the stop button in GVD or
              hitting Control-C in GDB).

  Status:     This was fixed in 3.17 on 2003-08-12

  Workaround: Restrict the commands used to smaller contexts in order to
              reduce their execution duration. For instance, disassemble
              a large procedure chunk by chunk.

KP-316a1-C811-005 Bad documentation for Fixed_Value, Integer_Value attributes

  Problem:    The GNAT reference manual incorrectly states that these
              attribute functions are equivalent to unchecked conversions.
              This is not the case, since full range checks are performed.

  Status:     This was fixed in 3.17 on 2003-08-11

  Workaround: None needed, since this is a documentation error only. If your
              code relies on absence of range checks, use unchecked conversion
              directly instead of these attributes.

KP-316a1-C805-018 Incorrect removal of case expression with side effects

  Problem:    The front end incorrectly removes the evaluation of case
              expressions with side effects when optimizing case statements
              with one alternative.

  Status:     This was fixed in 3.17 on 2003-08-05

  Workaround: Add an additional alternative to the case statement (such
              as an others alternative) or save the result of the case
              expression in a temporary and apply the case to the temporary.

KP-316a1-C801-016 warnings on inlining with gnatVa

  Problem:    The front-end emits spurious warnings that some operations in
              predefined units cannot be inlined, when units are compiled
              with validity checks enabled.

  Status:     This was fixed in 3.17 on 2003-08-19

  Workaround: Ignore warnings.

KP-316a1-C730-019 Wrong file name in exception message when -gnatD used

  Problem:    If -gnatD is used, then exception messages correctly (and
              usefully) refer to the line number in the expanded (.dg)
              file that caused the exception, but the file name was
              wrong (e.g. test1.adb instead of test1.adb.dg).

  Status:     This was fixed in 3.17 on 2003-08-04

  Workaround: None needed, just be aware that if -gnatD is used, then the
              file referenced in exception messages is the .dg file, even
              if the message itself indicates otherwise.

KP-316a1-C730-011 GNAAMP fails on aggregates with subprogram'address

  Problem:    On the AAMP target only, uses of a subprogram Address
              attribute within an aggregate can cause the compiler
              to blow up or to generate incorrect ROM data (the latter
              in the case of a statically allocated aggregate).

  Status:     This was fixed in 3.17 on 2003-07-31

  Workaround: Assign the aggregate to a variable, initialize any such
              components of type Address with System.Null_Address, and
              reinitialize those components with the Address attributes
              by using separate assignments.

KP-316a1-C726-001 GDB gets error in testing exception breakpoint

  Problem:    In some cases, GDB will stop prematurely on an exception
              breakpoint with a message indicating that certain memory
              is unreadable.  That is, it will stop on the exception
              breakpoint, whether or not the exception raised was the
              one requested in the "break exception" command, will not
              reposition the frame properly to the point of the exception
              in the source, and will not execute commands attached to the
              breakpoint.

  Status:     This was fixed in 3.17 on 2003-08-06

  Workaround: The problem arises when GDB cannot complete a stack trace
              at the point of the exception (this is how you can determine
              that you are seeing the problem reported here).  Get around
              the problem by the following alternative procedure for setting
              the exception breakpoint:
                  (gdb) print DESIRED_BREAKPOINT'address
                  $... = (system.address) ADDRESS
                  (gdb) break exception (ADDRESS).all

KP-316a1-C722-012 GNAAMP generates incorrect code for packed bit-array formals

  Problem:    On the AAMP target only, formal parameters of small packed
              bit-array types are not addressed properly.

  Status:     This was fixed in 3.17 on 2003-07-24

  Workaround: Enclose the bit-array type in a record type and change the
              type of the formal to the record type.
KP-316a1-C722-006 Initialize_Scalars fails with constrained float subtypes

  Problem:    If a program compiled with pragma Initialize_Scalars has
              uninitialized variables whose type is a floating-point type
              with a constraint, then incorrect constraint errors may be
              generated while initializing these variables.

  Status:     This was fixed in 3.17 on 2003-07-31

  Workaround: Make sure such variables are initialized, or remove the
              constraint on the floating-point type.

KP316a1-C718-008 Problem with non-standard array indexed by function call

  Problem:    If an array whose index type is an enumeration with a rep.
              clause is indexed by a function call, the call is executed
              twice.

  Status:     This was fixed in 3.17 on 2003-07-22

  Workaround: Use temporary to compute function call, and use temporary in
              indexed component.

KP-316a1-C717-005 Crash on intrinsic "mod", "rem", and "/" on private types

  Problem:    Code generator aborts on uses of operators declared with
              Import (Intrinsic) when the underlying type is a 64-bit integer.

  Status:     This was fixed in 3.17 on 2003-07-18

  Workaround:  Introduce function bodies for the operators, and make then
               inlined.

KP316a1-C715-007 SIGBUS in nested unaligned record array aggregate

  Problem:    On machines that require strict alignment, if an array of
              records that contains a word-aligned field is contained as
              a component of another record at a position that does not
              match the alignment offield's alignment, then initializing
              the record with an aggregate can generate a SIGBUS.

  Status:     This was fixed in 3.17 on 2003-07-31

  Workaround: Make sure the alignment of the field in question is respected
              in the layout, or avoid the use of an aggregate for performing
              the initialization.

KP-316a1-C710-005 crash on intrinsic operators with overloaded operands

  Problem:    Code generator aborts on an operation declared Import (Intrinsic)
              when one operand is an overloaded operator on a real literal.

  Status:     This was fixed in 3.17 2003-07-10

  Workaround: Introduce a separate temporary for operand.

KP-316a1-C710-001 gnatN failure on child unit with instance

  Problem:    Compiler reports spurious type errors on a child unit that
              has a nested instantiation containing inlined calls.

  Status:     This was fixed in 3.17 on 2003-07-10

  Workaround: Compile child unit without front-end inlining.

KP-316a1-C707-019 Debugger problems with applications using Florist

  Problem:    Applications using Florist sometimes appear to be hanging
              when run under the debugger with some breakpoints being
              inserted. This is because Florist sometimes temporarily
              masks the SIGTRAP signal, which interferes with debugger
              operations.

  Status:     This was fixed in 5.02 on 2003-07-15

  Workaround: Do not set breakpoints that can be hit while executing
              Florist routines.

KP-316a1-C703-015 No main program(s) for a library project file

  Problem:    Main program(s) could be specified, either as attribute
              Main or on the command line, for library project files,
              but the mains failed to bind. This situation is now
              detected and results in an error.

  Status:     This was fixed in 5.01 on 2003-07-09

  Workaround: Do not specify main programs for a library project file

KP-316a1-C703-004 Multiple paths to the same source

  Problem:    When the same source file can be accessed through
              several paths (because of symbolic links) in the same
              project file, a duplicate source error is reported.

  Status:     This was fixed in 5.01 on 2003-07-06

  Workaround: Remove the symbolic links.

KP-316a1-C702-012 gnatmake -c with a library project file

  Problem:    Use of gnatmake -c -P<project> when <project> is a library
              project file would do more than recompilation. It would also
              rebuild the library. Conversely, if all sources of a library
              project file were up to date, gnatmake would not rebuild
              the library.

  Status:     This was fixed in 5.01 on 2003-07-06

  Workaround: Do not use gnatmake -c with a library project file

KP-316a1-C627-017 GNAAMP fails on addressing component of nested packed record

  Problem:    On the AAMP target only, the compiler fails when generating
              code for a storage-unit aligned scalar component of a record
              type with a pragma Pack that's embedded within a composite
              component of an outer packed record type.

  Status:     This was fixed in 5.01 on 2003-07-03

  Workaround: Remove the Pack pragma on the innermost type or replace it
              with a record representation clause.

KP-316a1-C626-016 Wrong loop index variable displayed by the debugger

  Problem:    On AiX, GDB sometimes prints the wrong value for a loop
              index variable when another loop whose index variable
              shares the same name is present in the same subprogram.

  Status:     This was fixed in 5.01 on 2003-06-26

  Workaround: Use different loop index variable names for each loop.

KP-316a1-C626-010 Spurious error on Not on a dynamic array

  Problem:    Compiler may generate spurious error messages, such as
              missing specifications or bodies, if a Not operation on
              an array of dynamic size is the right-hand side of an
              assignment statement.

  Status:     This was fixed in 5.01 on 2003-06-27

  Workaround: Expand the assignment into an explicit loop with
              component-by-component assignments.

KP-316a1-C626-003 Wrong interpretation of formal subprogram in instance

  Problem:    If a generic unit G has a formal subprogram F, a subprogram
              of the same name is use visible in the generic body, and
              that subprogram has the same signature as that of the actual
              in an instance of G, the code for the instance might call the
              use-visible F rather than the actual for F.

  Status:    This was fixed in 5.01 on 2003-06-26

  Workaround: Rename the formal, or remove the use_clause that makes the
              outer F use_visible in the generic.

KP-316a1-C625-028 GNAAMP generates incorrect values for some types in DST files

  Problem:    The GNAAMP back end emits a bit size rather than a size
              in words for the component size of unpacked array types
              in Facade debugger symbol table (DST) files. Also, the
              DST info for a packed byte array type does not indicate
              that the type is packed.

  Status:     This was fixed in 5.01 on 2003-07-01

  Workaround: Avoid debugger commands that depend on the attributes that
              are incorrectly set.

KP-316a1-C625-015 Documentation error for -gnatRs (which is not allowed)

  Problem:    The documentation in the users guide implies that -gnatRs
              is permitted as an abbreviation for -gnatR1s, but this is
              not the case, -gnatR1s is rejected by the compiler.

  Status:     This was fixed in the 3.17 documentation on 2003-06-26

  Workaround: Do not use -gnatRs, use the full form -gnatR1s instead.
              This is a documentation-only problem.

KP-316a1-C624-019 gnatpp and ASIS problem with renamed exceptions

  Problem:    gnatpp crashes on an exception handler if come exception
              name in the choices lists denoted the exception renaming.
              Asis.Expressions.Corresponding_Name_Definition query for the
              elements representing references to renamed exceptions in
              exception handlers returns not the name defined by the renaming
              declaration, but the original exception defining name.

  Status:     This problem was fixed in 5.01 on 2003-07-03

  Workaround: Do not use gnatpp for the programs containing renamed exceptions
              in exception handlers. When using ASIS for the identifiers
              which are components of an exception handler, check the string
              image of the result of Corresponding_Name_Definition corresponds
              to the string image of the argument, if it does not, compute the
              defining name manually.

KP-316a1-C624-016 Spurious error on Storage_Size with complex expression

  Problem:    Compiler produces a spurious error on missing indices when
              the expression in the pragma is of the form A.B (I), B is
              an array component of A whose bounds depend on a discriminant,
              and A is denoted by the discriminant of the enclosing task.

  Status:     This problem was fixed in 5.01 on 2003-06-24

  Workaround: Make the bounds of A constant, rather than depending on a
              discriminant.

KP-316a1-C623-010 Ada.Command_Line raises exception when argv/argc unavailable

  Problem:    A call to Ada.Command_Line.Argument_Count raises Program_Error
              if the target does not implement argv/argc. It should return 0.

  Status:     This problem was fixed in 5.02 on 2003-09-02

  Workaround: Do not use Ada.Command_Line.Argument_Count on targets that
              do not support argv/argc processing.

KP-316a1-C616-005 Bad field assignment for variant record with rep clause

  Problem:    If the following conditions are all met:
                - a component clause is specified for a component
                - the component type is a variant record of less than 64 bits
                - the size of the component is not a multiple of storage unit
                - some other component is positioned in the last partial byte
              Then assignments to the component may clobber bits of this
              other component.

  Status:     This problem was fixed in 3.17 and 5.02 on 2003-07-12

  Workaround: Avoid the set of conditions above. In particular, avoid the
              overlap of the two fields in the same byte.

KP-316a1-C615-001 GDB finds wrong static variables

  Problem:    GDB will sometimes confuse identically named file-scope
              variables from two different source files (i.e., variables
              declared in a package body, or file-scope variables
              declared "static" in C).

  Status:     This problem was fixed in 5.01 on 2003-06-15

  Workaround: Use the full, package-qualified, name of the variable.
              For C code, use file-scope qualification, as in
                  print 'foo.c':static_var

KP-316a1-C606-019 Type qualification by standard types fails in GDB

  Problem:    The qualified expression Boolean'(True) fails to find
              a unique meaning for True on HPUX.

  Status:     This problem was fixed in 5.01 on 2003-06-27

  Workaround: This is a rather unusual problem, caused when the
              application introduces additional enumerals clashing
              with True or False, and the qualified expression is
              used before GDB has read in all the debugging symbols.
              The second and subsequent times you use the expression,
              GDB will have all the necessary information and the
              qualification will work. Using Standard.Boolean rather
              than Boolean works as of wavefronts since 1 June 2003.

KP-316a1-C603-011 Spurious error on instance from formal package

  Problem:    Analogous to C530-005, but involving formal packages with
              explicit parameters, i.e. without a box.

  Status:     This problem was fixed in 5.01 on 2003-06-03

  Workaround: Replace the instantiation of P2 with an additional formal
              package parameter.

KP-316a1-C603-002 Overridden 'write ignored by default 'output

  Problem:    When the stream oriented 'Write (resp. 'Read) function is
              redefined for a private type, it may be ignored by calls to
              to the default 'Output (resp. 'Input) functions.

  Status:     This problem was fixed in 5.01 on 2003-06-10

  Workaround: Override 'Output (resp. 'Input) for this private type in order
              to force a call to the overridden 'Write (resp. 'Read).

KP-316a1-C602-005 Compiler Abort on complex address clause

  Problem:    Compiler aborts on an address clause that involves address
              arithmetic, when the specified object is an initialized type,
              and there is a pragma Import on it to suppress initialization.

  Status:     This problem was solved in 3.17 on 2003-06-03

  Workaround: Introduce an explicit constant to hold the address expression
              and use the constant in the address clause.

KP-316a1-C530-005 Spurious error on instance from formal package

  Problem:    Compiler complains about a missing body when compiling a
              generic package P that contains a nested instantiation of
              a package P2 declared in a formal package of P, declared with
              a box.

  Status:     This problem was fixed in 5.01 on 2003-05-30

  Workaround: Replace the instantiation of P2 with an additional formal
              package parameter.

KP-316a1-C529-001 Compiler abort on access subtypes to private types

  Problem:    Compiler aborts on an instance of a package that manipulates
              access subtypes to private discriminated types. Abort occurs
              on a selected component of a formal parameter that is such an
              access subtype, declared in the body of the package.

  Status:     This problem was fixed in 3.16a1 on 2003-05-30

  Workaround: Avoid the use of access subtypes (a general Ada rule). Use
              an access to the base type whenever possible.

KP-316a1-C528-018 Incorrect inequality for empty arrays

  Problem:    When comparing two multi-dimensional array objects, the code
              was incorrect in the case where both arrays were empty (had
              no elements), the bounds were different, and the component
              type was floating-point or composite. If all these conditions
              held, then the arrays looked unequal, even though all empty
              arrays should compare equal.

  Status:     This problem was fixed in 5.01 on 2003-05-26

  Workaround: The conditions for this to occur are rather unlikely (this
              problem was found in code inspection, not in any real program),
              but if it could pose a problem, separately test the arrays for
              being empty before comparing them for equality.

KP-316a-C527-015 ASIS, gnatelim, gnatstub, gnatpp may crash in HP-UX

  Problem:    gnatelim, gnatstub, gnatpp and ASIS-based tools may crash with
              Segmentation Fault in HP-UX.

  Status:     This problem was fixed in 5.01 on 2003-06-06

  Workaround: Rebuild gnatelim, gnatstub and gnatpp with -mdisable-indexing
              option. Use -mdisable-indexing option when building ASIS-based
              programs

KP-316a1-C526-002 Initialize_Scalars and shared libraries

  Problem:    On some targets, the use of Initialize_Scalars is incompatible
              with the use of a shared libgnat, and results in link errors.

  Status:     This problem was fixed in 5.01 on 2003-05-26

  Workaround: Use a static version of libgnat, or use gnatmake -a -f.

KP-316a1-C523-003 GDB loops setting exception breakpoint

  Problem:    GDB will sometimes go into an infinite loop when asked to
              perform a "break exception X" for specific exception X.  The
              problem occurs when the user has a definition in a package
              or package body whose simple name is X.

  Status:     This problem was fixed in 5.01 on 2003-06-01

  Workaround: Set the breakpoint by hand as follows:

                  (gdb) set lang c
                  (gdb) break  __gnat_raise_nodefer_with_msg \
                             if (constraint_error == e)
                  (gdb) set lang auto

               (For convenience, this sequence is a good candidate for
               a user-defined command.)

KP-316a1-C522-015 GNAAMP not emitting DST link names for Import/Export objects

  Problem:    On the AAMP target only, for imported and exported objects with
              a specified link name the compiler is always emitting the Ada
              name instead of the link name within the Debugger Symbol Table
              entries for the objects. As a result, the Facade debugger gives
              an error on these objects because it cannot locate their symbols.

  Status:     This problem was fixed in 5.01 on 2003-05-27

  Workaround: Define a zero-sized object having the incorrect Ada-based name
              that is adjacent to the real object. This will satisfy the search
              for the object name within Facade and allow access to the object
              contents.

KP-316a1-C522-012 Additional executable suffix on Windows

  Problem:    On Windows, if an extension ".EXE" for the executable
              were given, gnatmake would still add the extension ".exe"

  Status:     This problem was fixed in 5.01 on 2003-05-22

  Workaround: Use only extensions ".exe" for specified executables.

KP-316a1-C521-012 Packed arrays with boolean components with inherited 'Read

  Problem:    Compiler aborts when creating the stream procedure for a tagged
              type T, if it contains a packed array component whose component
              type B is a derived boolean type that inherits stream operations
              from its parent type BP.

  Status:     This problem was fixed in 5.01 on 2003-06-11

  Workaround: Make B into a subtype of BP rather than a derivation.

KP-316a1-C520-008 Get_Current_Dir returns two directory separators

  Problem:    For a root directory (UNIX / or Windows c:\) Get_Current_Dir
              routine (in GNAT.Directory_Operations) returns a path ending
              with two directory separators.

  Status:     This problem was fixed in 5.01 on 2003-05-20

  Workaround: Remove the second directory separator.

KP-316a1-C519-006 s-memcop.ads is not compiled

  Problem:    If s-memcop.ads is referenced in a program, the compilation
              fails because the corresponding ALI file is not found.

  Status:     This problem was fixed in 5.01 on 2003-05-28

  Workaround: Either recompile manually this file, with -gnatpg, or
              compile the whole program with -a.

KP-316a1-C519-001 In GDB, 'LAST, 'FIRST, and 'LENGTH have wrong types

  Problem:    The type that GDB ascribes to values of the attributes
              'LAST, 'FIRST, and 'LENGTH are nonsensical. Any arithmetic
              involving these values fails.

  Status:     This problem was fixed in 5.01 on 2003-05-22

  Workaround: The values still print just fine, as long as they are used
              alone, without being combined into larger expressions.

KP-316a1-C515-017 GNAAMP back end is not checking No_Implicit_Heap_Allocation

  Problem:    On the AAMP target only, the back end is not checking for
              implicit heap use when the No_Implicit_Heap_Allocations
              restriction is in force.

  Status:     This problem was fixed in 5.01 on 2003-05-19

  Workaround: Eliminate any declarations of objects or aggregates with a
              nonstatic size when No_Implicit_Heap_Allocations is applied.

KP-316a1-C515-015 Stand-alone library projects importing other projects

  Problem:    Stand-Alone Libraries could not be built, if the project
              was importing one or several other projects

  Status:     This problem was fixed in 5.01 on 2003-05-15

  Workaround: Only build Stand-Alone Libraries in projects that do not
              depend on other projects.

KP-316a1-C509-001 Spurious warning on entry reference in requeue statement

  Problem:    Compiler emits an unreferenced warning on a protected entry
              if the only reference to it is in  requeue statement of
              another protected operation of the same type.

  Status:     This problem was fixed in 5.01 on 2003-05-09

  Workaround: Ignore warning.

KP-316a1-C508-010 Support of GCOV -l option on Windows

  Problem:    On Windows the GCOV -l option does not work properly when
              sources are in multiple directories. In this case gcov fails
              to create the report files (.gcov).

  Status:     This problem was fixed in 5.01 on 2003-05-13

  Workaround: Put all sources in the same directory.

KP-316a1-C508-004 Spurious visibility error with inlining and generics

  Problem:    Compiler rejects a valid reference to a package in the context,
              if there is a previous instance of a unit that has an inlined
              subprogram, and that depends on another generic of the same name
              as that of the rejected reference.
              This only occurs when front-end inlining is enabled.

  Status:     This problem was fixed in 5.01 on 2003-05-08

  Workaround: Compile the unit without front-end inlining.

KP-316a1-C507-010 Spurious error on child unit with front-end inlining

  Problem:    Compiler emits a spurious error on a system file when compiling
              a child unit that contains an instantiation of a text_io package,
              and the visible part of the parent unit ends with a use clause.
              This only occurs when the child unit is compiled with front-end
              inlining.

  Status:     This problem was fixed in 5.01 on 2003-05-07

  Workaround: Compile the unit without front-end inlining.

KP-316a1-C507-003 Threads and vforks don't mix in GDB on HPUX11

  Problem:    On HPUX11, when a breakpoint precedes a vfork in a threaded
              program it is possible for GDB to get confused after continuing
              from the breakpoint.  The debugged process can hang or get
              spurious SIGTRAPs.

  Status:     This problem was fixed in 5.01 on 2003-05-07

  Workaround: Avoid setting breakpoints until after the point your program
              forks.

KP-316a1-C505-011: Spurious error on nested generic with inlining

  Problem:    Compiler rejects a unit containing a nested instance, when
              the generic has a local package named Float_IO, and its
              context includes a package that has a instance of the predefined
              Float_IO package. This only happens when the unit is compiled
              with front-end inlining.

  Status:     This problem was fixed in 5.01 on 2003-05-05

  Workaround: Compile the unit without front-end inlining.

KP-316a1-C505-010: Spurious error on nested generic with inlining

  Problem:    Compiler rejects a function that contains an instance, when
              the generic includes a function call declared in a package
              in the context of the generic, and the function called is a
              homonym of one of the formals of the function being compiled.
              This happens when the unit is compiled with front-end inlining.

  Status:     This problem was fixed in 5.01 on 2003-05-05

  Workaround: Compile the unit without front-end inlining.

KP-316a1-C505-014: Leak in classwide 'Input on Unbounded_String component

  Problem:    When using T'Class'Input on a type T with controlled
              component(s) such as Unbounded_Strings, some finalizations
              may be missing leading to memory leaks.

  Status:     This problem was fixed in 5.01 on 2003-05-15

  Workaround: Replace Unbounded_String components with Bounded_Strings.

KP-316a1-C503-004: GDB displays incorrect array upper bound displayed

  Problem:    An index empty range 0 .. -1 displays as having an upper bound
              that is a large non-negative integer.

  Status:     This problem was fixed in 5.01 on 2003-05-08

  Workaround: This problem is merely a nuisance and causes no real trouble.
              Simply recognize that large positive numbers displayed as
              range bounds by (e.g.) ptype are really negative.

KP-316a1-C502-006 Class-wide argument not rejected in specific-type allocator

  Problem:    An allocator with a qualified expression where the type mark
              denotes a specific tagged type should not allow an argument
              that is class-wide (and vice versa).

  Status:     This problem was fixed in 5.01 on 2003-05-05

  Workaround: Avoid this illegal usage.

KP-316a1-C502-005 Failure to diagnose missing overridings.

  Problem:    If a parent abstract type overrides its inherited abstract
              operations in the private part, a subsequent nonabstract
              extension inherits those operations as nonabstract, even if
              they are not visible at the point of derivation.

  Status:     This problem was fixed in 5.01 on 2003-05-08

  Workaround: Do not write an illegal derivation.

KP-316a1-C502-004 Visibility error on comparisons with aggregates

  Problem:    The compiler may improperly consider a comparison or equality
              operator use_visible when left operand is an aggregate, and
              there is a use_type clause for the type of the aggregate in
              a preceding inner scope of the current one.

  Status:     This problem was fixed in 5.01 on 2003-05-02

  Workaround: Invert the operands and the operation so that the aggregate is
              the right operand.

KP-316a1-C430-020 Compiler crash on instantiation of unchecked conversion

  Problem:    Compiler aborts on an inlined function that contains an
              instance of Ada.Unchecked_Conversion (with an expanded name).

  Status:     This problem was fixed in 5.01 on 2003-04-30

  Workaround: Add a use clause to the current unit, and use the direct name.

KP-316a1-C429-017 GNAAMP creates unnecessary dependences on secondary stack

  Problem:    The GNAAMP compiler introduces dependences on the secondary
              stack support package (s-secsta) when not needed. In particular,
              any subprograms with unconstrained array parameters will
              create such an extraneous dependence.

  Status:     This problem was fixed in 5.01 on 2003-04-30

  Workaround: For programs incurring an unnecessary dependence, edit the
              .lec linker script to remove the include line for s-secsta.

KP-316a1-C429-015 Float assignment failure in GDB for power pc targets

  Problem:    GDB 5.3 for ppc-elf and ppc-vxworks fails to assign floats,
              with several warnings "Can't store a floating-point number
              of 16 bytes."

  Status:     This problem was fixed in 5.01 on 2003-04-05

  Workaround: Assign the value in hex using a memory write command.

KP-316a1-C426-003 Win32 programs crash if temp file creation is not possible

  Problem:    On Win32 a program crashes when trying to create a temporary
              file and no such files are available on the system. This happen
              when the disk is full or if there is no more temporary files
              available on the directory pointed to by the TMP environment
              variable or in c:\temp when TMP is not set.

  Status:     This problem was fixed in 5.01 on 2003-04-30

  Workaround: Free some spaces on the disk or clean-up the temp directory

KP-316a1-C425-027 Failure to consider exec directory for gnatmake -l

  Problem:    When using project files, gnatmake -l (link only),
              without compilation, was putting the executable in the
              object directory, not the exec directory.

  Status:     This problem was fixed in 5.01 on 2003-04-25

  Workaround: Specify the full path of the executable with a -o switch.

KP-316a1-C425-021 Spurious unreferenced warning on formal subprogram

  Problem:    With warnings enabled, compiler emits an Unreferenced warning
              on a function that renames an attribute, when the function is
              declared in the visible part of package.

  Status:     This problem was fixed in 5.01 on 2003-04-028

  Workaround: Ignore warning.

KP-316a1-C425-007 Missing layout information for types in subprogram bodies

  Problem:    When compiling with -gnatR3, compiler does not display layout
              information for types declared in subprogram and task bodies
              declared within a package body.

  Status:     This problem was fixed in 5.01 on 2003-04-25

  Workaround: To get layout information, place an equivalent type declaration
              in a package.

KP-316a1-C424-014 GNAAMP generates wrong operands for increment/decrement

  Problem:    The GNAAMP back end emits the size rather than the type
              for the first operand of increment and decrement macros.
              This can cause problems in for loops where the loop index
              has bounds outside the range of signed 16-bit integers.

  Status:     This problem was fixed in 3.17 on 2003-04-25

  Workaround: Rewrite for loops using large indexes as while loops and
              compile without optimization to prevent generation of
              increment and decrement macros.

KP-316a1-C424-010 GNAAMP incorrectly optimizes certain null comparisons

  Problem:    The GNAAMP optimizer incorrectly optimizes comparisons
              of access-to-unconstrained-array values with null, which
              leaves excess words on the stack and leads to incorrect
              execution (comparison branches always skipped).

  Status:     This problem was fixed in 3.17 on 2003-04-24

  Workaround: Compile without optimization, or try reversing the operand
              order in the comparison (e.g., null /= access_value).

KP-316a1-C424-009 Problem with overlaying packed bit arrays

  Problem:    On big endian machines, if you overlay (using an address clause)
              some object on top of an object whose type is a packed bit
              array (or the object is packed), assignments to the bit array
              may not get performed if the index computation involves
              more than one variable and checking is enabled.

  Status:     This problem was fixed in 5.01 on 2003-05-28

  Workaround: Turn off checks or do the index computation involving only
              one variable.

KP-316a1-C423-015 PRINTDLG Win32Ada binding record layout problem

  Problem:    The Win32 Ada binding does not define properly the PRINTDLG
              records (ASCII and Unicode versions). These records have the
              wrong size and the layout does not correspond to the OS
              structure.

  Status:     This problem was fixed in 5.01 on 2003-05-01

  Workaround: Use a C wrapper routine to access these records.

KP-316a1-C422-019 Incorrect values set for Initialize/Normalize_Scalars

  Problem:    The use of pragmas Initialize/Normalize_Scalars may in some
              cases not initialize private objects to out of range values
              if the size of the type is not equal to the size of the type.

  Status:     This problem was fixed in 5.01 on 2003-05-12

  Workaround: This will not affect the operation of a correct program so
              no work around is required for correct programs, though it
              may be that some cases of uninitialized variables are missed.

KP-316a1-C421-008 Extending a project file with read-only ALIs

  Problem:    In an extending project, it was not possible
              to replace a source of the extended project if the
              ALI file in the extended project was read-only.

  Status:     This problem was fixed in 5.01 on 2003-04-21

  Workaround: Do not set to read-only ALI files in projects
              that are extended.

KP-316a1-C421-007 GDB on HPUX can miss breakpoints and hang

  Problem:    When a process includes a fork, GDB can sometimes hang and
              possibly fail to reach breakpoints.

  Status:     This problem was fixed in 5.01 on 2003-04-25

  Workaround: Try starting the process outside of GDB and attaching to it
              after it has forked.

KP-316a1-C418-007 GDB task switching fails on XSCALE

  Problem:    In multi-task mode, if you switch to an other task,
              you will get a corrupted backtrace if it is stopped
              during a system call.

  Status:     This problem was fixed in 5.01 on 2003-06-16

  Workaround: Use windsh's debug features to explore status of tasks

KP-316a1-C416-016 Spurious error on generic with inlining

  Problems:   Compiler rejects a unit whose context includes a package P
              that contains a nested package NP, when the context of P
              includes an instance also called NP, and the original unit
              has use clause on NP and references one of its subprograms.
              This only happens when inlining is enabled (gnatn).

  Status:     This problem was fixed in 5.01 on 2003-05-15

  Workaround: Compile unit without inlining.

KP-316a1-C411-015 Crash on access discriminant used in Attach_Handler

  Problem:    Compiler aborts on a pragma Attach_Handler in a protected type,
              when the identity of the handler is given by an access discrimi-
              nant of the type.

  Status:     This problem was fixed in 5.01 on 2003-04-18

  Workaround: Use an object declared outside of the protected object to
              designate the handler.

KP-316a1-C411-003 Debugger performance issues with large systems

  Problem:    The commands "list" and "info line" take several seconds
              to output their results for large executables (with
              several thousand sources files) that are built using
              absolute paths at compile time instead of relative paths.
              In GPS or GVD the symptom is that the files take some
              time to be displayed.

  Status:     This problem was fixed in 5.01 on 2003-05-27

  Workaround: Use relative paths at compile time instead of absolute ones.

KP-316a1-C410-007 GDB cannot backtrace through signal handlers on MIPS targets

  Problem:    GDB is unable to produce a proper backtrace through a
              signal handler on MIPS targets.  The backtrace ends at
              a frame marked either "__sigtramp" or "<signal handler called>".

  Status:     This problem was fixed in 5.01 on 2003-04-22

  Workaround: You can usually arrange to trap the signal before getting
              into the handler. Use the "handle" command with the 'stop'
              and 'pass' options, if necessary, to cause GDB to stop at
              the time the signal is received (GDB intercepts many
              signals by default).

KP-316a1-C409-012 Error at run-time with -fstack-check on function return

  Problem:    If a function returns the result of another function and for
              both functions, the returned object is variable length (e.g.
              a class-wide type), then the program may fail at execution
              time (with a segmentation fault or unexpected exception) if
              the outer function is compiled with -fstack-check.

  Status:     This problem was fixed in 5.01 on 2003-05-28

  Workaround: Avoid the use of -fstack-check for the unit in question.

KP-316a1-C409-010 GDB outputs CYGWIN paths in annotate mode

  Problem:    Under Windows, GDB outputs CYGWIN absolute paths. Those paths
              confuse GPS and GVD, and it fails to get the sources of the
              run-time library files and the files generated by the binder.

  Status:     This problem was fixed in 5.01 on 2003-04-09

  Workaround: Add the directories where those files are in search path of
              GDB by using the 'dir' command.

KP-316a1-C409-001 Wide Enumeration_IO malfunctions with literals > 1 character

  Problem:    If Wide_Text_IO.Enumeration_IO is used to read enumeration
              values, it will fail if a literal value has a length longer
              than one character, raising Data_Error.

  Status:     This problem was fixed in 5.01 on 2003-05-11

  Workaround: Use Text_IO.Enumeration_IO if possible. Otherwise use Stream_IO
              and program the input manually using the Value attribute.

KP-316a1-C407-017 Bad error messages for use of double underscore in identifier

  Problem:    If an identifier contains a double underscore, then a correct
              message is given complaining about this, but if -gnatq is used
              to force semantic processing, then junk cascaded messages may
              occur in which the identifier is improperly spelled.

  Status:     This problem was fixed in 5.01 on 2003-05-11

  Workaround: Ignore all but the first message, and fix the illegal usage
              of double underscore.

KP-316a1-C407-015 Incomplete support for Atomic and Volatile on AAMP target

  Problem:    On the AAMP target only, the compiler was not flagging
              pragma Atomic on nonatomic types and objects and was not
              inhibiting a few cases of optimization involving local
              variables marked as Volatile.

  Status:     This problem was fixed in 3.17 on 2003-05-23

  Workaround: Avoid pragma Volatile on local variables or compile without
              optimization. Pragma Atomic should only be applied to
              elementary types and objects no larger than three words.

KP-316a1-C405-005 Output of long string with Put_Line can cause stack overflow

  Problem:    If a string longer than 4000 characters is output using a single
              call to Put_Line, then undetected stack overflow may occur.

  Status:     This problem was fixed in 5.01 on 2003-04-06

  Workaround: If stack overflow is a possible issue, then use Put to output
              the string, followed by a call to New_Line.

KP-316a1-C403-003 Spurious error on concatenation with derived array type

  Problem:    The compiler incorrectly rejects a concatenation in an
              instantiation, when one operand is of a derived array type
              with a character component type, and the other operand is a
              string literal.

  Status:     This problem was fixed in 5.01 on 2003-04-03

  Workaround: Qualify the string literal with the type of the other
              operand.

KP-316a1-C402-008 -L switch of gnatbind in project files

  Problem:    When switch -L was specified in package Binder of
              a project file, the binder generated package were
              incorrectly generated.

  Status:     This problem was fixed in 5.01 on 2003-04-02

  Workaround: Do not use switch -L of gnatbind in project files

KP-316a1-C401-016 GNAT 3 does not handle paths with spaces

  Problem:    GNAT 3 does not handle paths with spaces properly. It fails to
              properly quote such paths before passing them to sub-processes
              (C or Ada compiler, linker...). Note that GNAT-5 properly
              handles spaces in paths.

  Status:     This problem was fixed in 3.17 on 2003-04-16

  Workaround: Remove spaces in directory names.

KP-316a1-C401-011 Incorrect size set for packed record

  Problem:    If a packed record contains record or array fields, then in
              certain unusual cases, the front end of the compiler sets a
              size value which is then rejected as too small by the back
              end, leading to an unexpected message about too small a size
              having been specified when no size clause was present.

  Status:     This problem was fixed in 5.01 on 2003-04-05

  Workaround: Add an explicit size clause that sets the correct size, or
              remove the pragma Pack on the record type.

KP-316a1-C331-005 Bad warning message for !/%/: used instead of |/"/#

  Problem:    If the character ! is used in -gnatwj (warn on obsolete
              features), then the text of the warning messages omits
              the characters ! and |. A similar problem occurs with
              the use of % instead of double quotes and with the use
              of : instead of #.

  Status:     This problem was fixed in 5.01 on 2003-03-31

  Workaround: Correct the obsolete usage.

KP-316a1-C329-003 Spec of GNAT.Directory_Operations.File_Extension unclear

  Problem:    File_Extension returns the string including the dot (the spec
              was ambiguous on this point). Also, not mentioned in the spec,
              a null string is returned if the file name ends with a period.

  Status:     This problem was fixed in 5.01 on 2003-03-29

  Workaround: None needed, this fix is only a clarification in the spec, not
              a change of behavior. Make sure that your usage corresponds to
              that described above.

KP-316a1-C327-003 Possible race conditions in file open/close

  Problem:    In very rare circumstances, there may be a race condition
              when one thread opens a file at the same time that another
              thread closes some other file. This race condition may result
              in unexpected behavior, including possible infinite loops.

  Status:     This problem was fixed in 5.01 on 2003-03-31

  Workaround: If this problem is encountered, use a lock to prevent this
              simultaneous access. This is very unlikely to happen, so we
              do not recommend applying locks in cases where no problematical
              behavior has been seen

KP-316a1-C326-006 gnatmem exits with unhandled exception for unknown option

  Problem:    If gnatmem is launched with a non supported option it terminates
              with an unhandled exception. Other tools output the usage string
              in this case.

  Status:     This problem was fixed in 5.01 on 2003-04-03

  Workaround: Check gnatmem usage in GNAT User's Guide.

KP-316a1-C325-005 Problems with --RTS runtime directories

  Problem:    When --RTS= is used for the compiler, the runtime directories
              were not positioned at the end of the search directories. The
              consequence was that in some circumstances, in particular when
              a project file was used with gnatmake, new runtime sources
              could not be compiled successfully with -f -a.

  Status:     This problem was fixed in 5.01 on 2003-03-25

  Workaround: Do not use a project file when this happens.

KP-316a1-C325-001 Wildcard_Iterator fails to open some directories on Windows

  Problem:    On Windows, if a drive letter is specified for the iterator,
              Directory_Operations.Iteration.Wildcard_Iterator will not behave
              properly. The default directory for the specified drive will be
              used as the root directory.

  Status:     This problem was fixed in 5.01 on 2003-03-29

  Workaround: Use the Win32Ada binding to read directory entries.

KP-316a1-C321-017 GNAAMP compiler does not enforce No_Elaboration_Code

  Problem:    The GNAAMP back end is not performing checks to ensure that
              no elaboration code is generated when pragma Restrictions
              is used to specify No_Elaboration_Code.

  Status:     This problem was fixed in 3.17 on 2003-03-21

  Workaround: Examine the assembly to ensure that any *_elabs and *_elabb
              routines are empty.

KP-316a-C319-012 ASIS problem on protected entries

  Problem:    Asis.Declaration queries Corresponding_Declaration and
              Corresponding_Body do not accept protected entries and entry
              bodies (as they should according to the ASIS ISO Standard).
              ASIS_Inappropriate_Element is raised instead.

  Status:     This problem was fixed in 5.01 on 2003-03-23

  Workaround: Check the argument kind before calling these queries and
              compute the needed spec/body manually.

KP-316a1-C317-022 GNAAMP optimizer incorrectly removes live code

  Problem:    The AAMP peephole optimizer invalidly removes labels that are
              only referenced by the LOCB. macro (such as for exception
              handlers) and this can lead to removal of live code following
              the label as well as link errors for undefined labels.

  Status:     This problem was fixed in 3.17 on 2003-03-18

  Workaround: Compile any units subject to this bug without optimization,
              which may include certain units in the run-time library
              such as a-except.adb.

KP-316a1-C317-021 GNAAMP AA_Link tool returns success when CLINK fails

  Problem:    AA_Link checks the result status after the invocation of CLINK,
              but then incorrectly returns a success result to gnaamp_link.

  Status:     This problem was fixed in 3.17 on 2003-03-31

  Workaround: Check for textual error output resulting from AA_Link and CLINK.

KP-316a1-C313-023 Entryless protected objects are not properly reclaimed.

  Problem:    Resources held by protected objects without entries are not
              properly reclaimed when the object is destroyed. This happens
              when the protected object is a component of a enclosing
              array or record.

  Status:     This problem was fixed in 5.01 on 2003-03-17

  Workaround: Add a dummy entry to the protected type.

KP-316a1-C313-013 Windows DLL build failure confuses next build

  Problem:    If a DLL build that uses the project facility fails, it makes
              subsequent builds impossible.

  Status:     This problem was fixed in 5.01 on 2003-03-14

  Workaround: Remove the generated binder files (b~*.*) from the build

KP-316a1-C312-019 Large projects cannot be built using gnatlink

  Problem:    An attempt to build a large project using gnatlink may fail if
              there are many object files placed in many different directories.
              This is because gnatlink's algorithm to compute the command line
              length was incorrect, so in some cases it failed to select a
              response file automatically.

  Status:     This problem was fixed in 5.01 on 2003-03-26

  Workaround: Use gnatlink's -f option to force use of response file

KP-316a1-C312-011 Ordering check not turned off by pragma Style_Checks (Off)

  Problem:    If the style option -gnatyo is specified to check alpha order
              of subprogram bodies, then this check is not turned off by the
              use of pragma Style_Checks (Off).

  Status:     This problem was fixed in 5.01 on 2003-05-11

  Workaround: Specify pragma Style_Checks ("n") to turn off all style checks
              rather than pragma Style_Checks (Off).

KP-316a1-C311-016 AAMP stack underflow on indexing of nonstatic components

  Problem:    The GNAAMP back end generates incorrect code for array indexing
              when the size of the component subtype is nonstatic.

  Status:     This problem was fixed in 3.17 on 2003-03-12

  Workaround: Avoid using array types with nonstatic component subtypes.

KP-316a1-C306-015 Compiler loops on illegal subunit with -gnatE.

  Problem:    Compiler goes into an infinite loop when a unit is built with
              dynamic elaboration checks, and a subunit of the unit does not
              conform to the declaration of the stub.

  Status:     This problem was fixed in 5.01 on 2003-03-07

  Workaround: If the compiler seems to loop, compile with -gnatdO so that
              errors are posted at once, rather than at end of compilation.

KP-316a1-C306-008 Spurious warning with Extend_System

  Problem:    Compiler emits a spurious warning that no entities in System
              are referenced, when the unit being compiled uses an extension
              of system (through pragma Extend_System) and entities in the
              extension are referenced.

 Status:      This problem was fixed in 5.01 on 2003-03-06

 Workaround:  Ignore warning.

KP-316a1-C306-002 Run-time generates -gnatwd warnings

  Problem:    If the -gnatwd (warn on implicit dereference) flag is used,
              then warnings are generated for some run-time units (e.g.
              Text_IO) that are with'ed.

  Status:     This problem was fixed in 5.01 on 2003-03-10

  Workaround: Avoid the use of this warning flag, or ignore any warnings
              placed on run-time units.

KP-316a1-C305-006 Warnings when compiling binder generated files

  Problem:    If the binder generated files are compiled with standard
              style switches, then warnings are generated because of style
              violations.

  Status:     This problem was fixed in 5.01 on 2003-03-05

  Workaround: Avoid the use of the -gnaty flag when compiling this file,
              or manually insert a pragma Warnings (Off) into the file.

KP-316a1-C304-006 GNAT.OS_Lib.Copy_File on VMS

  Problem:    Copy_File was not working properly on VMS. Sometimes, for text
              files, only the first line would be copied. Copy_File is now
              supported on VMS, but only for simple text files, with
              Preserve = None.

  Status:     This problem was fixed in 5.01 on 2003-03-04

  Workaround: Use external means to copy a file on VMS.

KP-316a1-C303-006 Compiler rejects an initialized object with Import_Object

  Problem:    Compiler rejects a DEC pragma Import_Object on an object with
              implicit initialization.

  Status:     This problem was fixed in 5.01 on 2003-03-03

  Workaround: Use the standard Ada95 pragma Import.

KP-316a1-C303-003 Bad size for fixed subtype with no constraint

  Problem:    If a subtype declaration refers to a fixed-point type with no
              constraint, and the parent type has a size clause, the subtype
              may have an incorrect size, resulting in incorrect values.
              Such subtypes occur implicitly for generic types.

  Status:     This problem was fixed in 5.01 on 2003-08-13

  Workaround: Provide explicit size clauses for the subtype, or remove the
              size clause for the parent type.

KP-316a1-C228-003 Compiler crashes when constant used in case and atomic assign

  Problem:    If a constant is used both as a case label, and as the
              initializing expression for an atomic variable, the compiler
              may crash with a gigi 332 abort.

  Status:     This problem was fixed in 5.01 on 2003-03-10

  Workaround: Define two separate constants for the separate purposes.

KP-316a1-C227-005 Problem inlining DEC.Text_IO.Put with string operand

  Problem:    On VMS, if /OPT=INLINING is specified on a compilation that
              calls the variant of DEC.Text_IO.Put that takes a String
              operand does other things in the same basic block, the
              inlined call may be miscompiled leading to a constraint error
              accessing 0.

  Status:     This problem was fixed in 3.17 on 2003-03-18

  Workaround: Do not use /OPT=INLINING for a program using DEC.Text_IO.Put

KP-316a1-C226-002 Failure with subtype of private with unknown discriminants

  Problem:    If a package declares a private type with unknown discriminants,
              and a client package declares a local subtype that renames the
              private type, uses of that subtype fail to recognize the
              presence of discriminants in the full view.

  Status:     This problem was fixed in 5.01 on 2003-02-026

  Workaround: Use the private type itself.

KP-316a1-C225-022 assembler fails when compiling with -gnatD using GNAAMP

  Problem:    An incorrect assembler file name is passed to MACASM by the
              GNAAMP compiler when compiling with the -gnatD option.

  Status:     This problem was fixed in 3.17 on 2003-02-27

  Workaround: Compile using -gnatG instead of -gnatD and redirect the output.

KP-316a1-C225-021 GNAAMP compiler blows up on strings that raise an exception

  Problem:    The GNAAMP back end fails when translating expressions of byte
              array types that statically raise Constraint_Error (as determined
              by the front end).

  Status:     This problem was fixed in 3.17 on 2003-02-27

  Workaround: Correct the program to avoid byte array expressions that
              result in Constraint_Error warnings from the front end.

KP-316a1-C225-020 GNAAMP allocates incorrect size for variant record aggregates

  Problem:    The GNAAMP back end is allocating an incorrect amount of space
              in the local stack frame for holding the value of aggregates of
              a variant record type. This problem also occurs for aggregates
              of other forms of discriminated types.

  Status:     This problem was fixed in 3.17 on 2003-02-27

  Workaround: Declare an object of the appropriate discriminated subtype and
              Initial the components individually.

KP-316a1-C224-016 Temp files not be cleaned when gnatmake fails

  Problem:    In some circumstances, gnatmake may fail without
              deleting the temporary files it has created.

  Status:     This problem was fixed in 5.01 on 2003-02-25

  Workaround: Delete the temporary files manually after a gnatmake failure.

KP-316a1-C221-012 -pg triggered recompilation with gnatmake -s

  Problem:    When the switch -pg was used, all sources were
              recompiled when using "gnatmake -s".

  Status:     This problem was fixed in 5.01 on 2003-02-21

  Workaround: Do not mix -pg and gnatmake -s.

KP-316a1-C221-008 Extra stack frames in GNAT.Debug_Pools

  Problem:    The various stack traces reported by the debug pool contain
              some frames internal to the debug pool itself.

  Status:     This problem was fixed in 5.01 on 2003-02-25

  Workaround: Ignore the first few levels when using addr2line.

KP-316a1-C221-007 Exception raised by loop with Integer'Last bound using GNAAMP

  Problem:    A for loop with an upper bound equal to Integer'Last (or
              the last value of integer type's base range) causes the
              exception Constraint_Error after the last iteration of
              the loop. This occurs specifically on the AAMP target.

  Status:     This problem was fixed in 3.17 on 2003-02-21

  Workaround: Replace the for loop with an equivalent while loop.

KP-316a1-C220-006 Null record in discriminated protected type

  Problem:    A multitasking program deadlocks if tasks communicate
              through a discriminated protected type, and the discriminant
              constrains an array of null records.

  Status:     This was fixed in 3.17 on 2003-03-04

  Workaround: Include at least one component in the record declaration

KP-316a1-C219-022 Spurious error on aggregate as actual in instantiation

  Problem:    Compiler rejects an aggregate as an actual in an instance
              when the type of the corresponding formal is declared in a
              formal package of the same generic unit.

  Status:     This was fixed in 5.01 on 2003-02-21

  Workaround: Introduce a temporary to hold the aggregate, and use the
              temporary in the instance.

KP-316a1-C219-020 Unexpected choice when setting breakpoint on source line

  Problem:    When trying to set a breakpoint using a source location of
              the form "FILE:LINENO", the debugger sometimes presents
              the user with an unexpected multiple-choice menu. The menu
              contains entries refering to procedures that are actually
              internally generated by GNAT. This can occur when using
              stream attributes for instance.

  Status:     This problem was fixed in 5.01 on 2003-05-26

  Workaround: Ignore all the entries in the menu that refer to the
              internally generated procedures, and select the remaining
              entry.

KP-316a1-C219-013 Failure to resolve pathological overloadings

  Problem:    Compiler rejects a call on an overloaded function when its
              argument is an overloaded operator on literals, and the
              context is an assignment to an overloaded explicit dereference.

  Status:     This problem was fixed in 5.01 on 2003-02-20

  Workaround: Use qualification on the operands.

KP-316a1-C210-030 Spurious constraint error on slice of 'Image.

  Problem:    Compiler generates an improper constraint check on an constant
              declaration for a constrained string, whose expression is a
              slice of a 'Image reference. This only happens for library-level
              declarations.

  Status:     This problem was fixed in 5.01 on 2003-03-25

  Workaround: Remove "constant" keyword, or introduce an intermediate
              temporary to hold the result of 'Image.

KP-316a1-C210-029 Bad code for packed arrays of records with initial value

  Problem:    Bad code is sometimes generated to deal with packed arrays of
              records with representation clauses and implicit initial values.
              Visible consequences may be that the implicit initialization
              appears inoperative, or explicit assignments to components
              do not have the expected effect.

  Status:     This problem was fixed in 5.01 on 2003-04-03

  Workaround: Remove the pragma pack, or provide explicit initialization

KP-316a1-C210-014 ASIS Data Decomposition problem

  Problem:    If an ASIS Context is based on a set of trees, then under some
              circumstances, Type_Model_Kind may classify some type
              definitions as being of A_Complex_Dynamic_Model even if they are
              static or may be processed as A_Simple_Dynamic_Model. It may
              happen if a type is defined in some compilation unit, this unit
              is a supporter of the body of some library level generic unit,
              and this generic unit is instantiated in some other unit
              belonging to the ASIS Context.

  Status:     This problem was fixed in 5.01 on 2003-02-21

  Workaround: This problem does not exist if the Context is based on a single
              tree created for the unit where the type is defined. Try to
              minimize a set of trees defined an ASIS Context having this in
              mind.

KP-316a1-C206-002 Spurious warning on packed array in generics

  Problem:    The compiler improperly evaluates 'Length on a packed array
              declared within a generic unit, when the array index is a
              generic parameter. Spurious warnings on constraint errors
              may result.

  Status:     This problem was fixed in 5.01 on 2003-02-06

  Workaround: Ignore warning.

KP-316a1-C205-002 Problem with renaming of unchecked conversion result

  Problem:    On machines that enforce strict alignment, an alignment error
              may occur if a variable is a renaming of a call to an unchecked
              conversion whose operand is less strictly aligned than the type
              of the variable.

  Status:     This problem was fixed in 3.17 on 2003-03-19

  Workaround: Use a variable, rather than a renaming.

KP-316a1-C204-017 Crash on aggregate default in subprogram renaming

  Problem:    Compiler aborts on a subprogram renaming declaration where a
              formal has a default value that is an aggregate for a discrimi-
              nated type.

  Status:     This problem was fixed in 5.01 on 2003-03-05

  Workaround: Write a subprogram body that calls the renamed subprogram,
              instead of using a renaming.

KP-316a1-C204-014 Over-aligned variables initialized by function results

  Problem:    If the alignment specified for a local variable (either directly
              or via the alignment of its type) is larger than the maximum
              supported in a stack frame and that variable is initialized to
              a value that is the return value of a function, the variable
              may not be properly initialized.

  Status:     This problem was fixed in 5.01 on 2003-02-12

  Workaround: Do not specify an alignment larger than the maximum alignment
            ` supported in a stack frame.

KP-316a1-C203-003 Bad quotes handling makes linker fail on Windows

  Problem:    If environment variables (ADA_INCLUDE_PATH or ADA_OBJECTS_PATH)
              are quoted the linker will be confused and will fail to build
              the executable.

  Status:     This problem was fixed in 5.01 on 2003-02-24

  Workaround: Do not quote these environment variables and use the DOS
              equivalent pathnames to avoid spaces.

KP-316a1-C201-003 ASIS problem with indexed components

  Problem:    If the prefix of an indexed component is a function call, and
              the name of the function is an expanded name, ASIS blows up when
              it tries to decompose such an indexed component.  This problem
              may also affect GNATPP.

  Status:     This problem was fixed in 5.01 on 2003-02-05

  Workaround: Either try to avoid decomposing of such Elements or try to get
              the text image of enclosing construct and separate the
              corresponding syntax elements manually.

KP-316a1-C131-001 'Access not checked properly against access subtypes

  Problem:    The rule of Ada 95 RM 3.10.2(27) is not being checked properly
              when an Access attribute is in the context of a constrained
              access subtype (certain illegal cases were accepted and certain
              legal cases rejected).

  Status:     This problem was fixed in 5.01 on 2003-01-31

  Workaround: Remove any offending uses of constrained access subtypes.

KP-316a1-C130-028 GNAAMP blows up on aggregate with unpacked string literal

  Problem:    The GNAAMP back end doesn't allow static aggregates with
              a component association given by a string literal of an
              unpacked character array type.

  Status:     This problem was fixed in 3.17 on 2003-01-30

  Workaround: Either declare the character array type as packed, or
              assign the string literal to a temporary constant object
              and replace the component association with a reference
              to the constant.

KP-316a1-C127-017 Certain CLINK options are being ignored by aa_link (GNAAMP)

  Problem:    The aa_link tool (invoked by gnaamplink) is ignoring certain
              CLINK options (e.g., -data) due to testing for a limited set
              of options (specifically, only -list, -ram, and -rom are
              allowed).

  Status:     This problem was fixed in 3.17 on 2003-01-27

  Workaround: Invoke CLINK manually with the desired options.

KP-316a1-C127-005 Compiler abort on complex address clause

  Problem:    Compiler aborts on a variable declaration with an address clause,
              when the address expression is a component of a discriminated
              record and the object type has an implicit initialization.

  Status:     This problem was fixed in 5.01 on 2003-02-13

  Workaround: Introduce a temporary to hold the address expression, before
              the variable declaration.

P-316a1-C127-003 Compiler aborts on allocator for access discriminant

  Problem:    Compiler aborts on a component declaration for a component
              with an access discriminant, when the constraint is given by
              an allocator.

  Status:     This problem was fixed in 5.01 on 2003-01-27

  Workaround: Introduce a subtype outside of the record declaration, and
              use that subtype for the component declaration.

KP-316a1-C127-004 -gnatVxy is not equivalent to -gnatVx -gnatVy

  Problem:    Unlike -gnatwxxx and -gnatyxxx, -gnatVxxx is not equivalent
              to several -gnatVx corresponding switches. Only the last
              -gnatV switch is taken into consideration.

  Status:     This problem was fixed in 5.01 on 2003-01-27

  Workaround: Only use one -gnatV switch

KP-316a1-C124-017 Confusing message when compiling predefined generic

  Problem:    Predefined generics cannot be compiled to generate code, but
              the error message complains about a package spec instead of
              a predefined generic.

  Status:     This problem was fixed in 5.01 on 2003-05-11

  Workaround: Ignore the incorrect message, and use -gnatc to check a
              predefined generic for errors.

KP-316a1-C124-009 aa_link doesn't check for missing $$$ lines in .lec file

  Problem:    The aa_link tool used by GNAAMP doesn't complain if the
              a user-provided .lec file is missing the $$$ substitution lines.

  Status:     This problem was fixed in 3.17 on 2003-01-24

  Workaround: Add at least the required run-time library $$$ substitution
              line to the beginning of any user-provided .lec file following
              the model given in the default template.lec file.

KP-316a1-C124-005 Link failure with XSCALE/VxWorks kernel (GNAT 5)

  Problem:    Trying to link an object built using GNAT with an XSCALE/VxWorks
              kernel fails with an assertion failure in ld.

  Status:     This problem was fixed in 5.01 on 2003-04-21

  Workaround: Download the module at run time instead of doing a link with
              the kernel.

KP-316a1-C123-003 Spurious error on component in extension from instance

  Problem:    Compiler rejects a component in an type extension, when the
              parent type is a private type declared in a package instance,
              whose full view includes a component of the same name.

  Status:     This problem was fixed in 5.01 on 2003-01-25

  Workaround: Change name of component in extension.

KP-316a1-C123-002 ASIS Enclosing_Element problem on subtype names

  Problem:    For a subtype defining name, in case when a subtype mark denotes
              a private type defining in general instantiation,
              Enclosing_Element may return Nil_Element as a result. This
              problem may also affect GNATPP.

  Status:     This problem was fixed in 5.01 on 2003-01-27

  Workaround: Use your own implementation of Enclosing_Element on the base of
              Traverse_Element.

KP-316a1-C122-011 Overflow in GNAT.Debug_Pools

  Problem:    The internal counters used in GNAT.Debug_Pools to compute
              the total amount of allocated or freed memory may overflow.

  Status:     This problem was fixed in 5.01 on 2003-02-25

  Workaround: The overflow only impacts the output of Print_Info, and can
              be safely ignored.

KP-316a1-C121-028 GNAAMP compiler fails on aggregate with bit array component

  Problem:    The GNAAMP back end fails when translating an aggregate of
              a record type with a packed bit array component when the
              array type is declared in another library unit.

  Status:     This problem was fixed in 3.17 on 2003-01-21

  Workaround: Replace the aggregate with assignments to individual components.

KP-316a1-C121-022 Compiler abort on protected type with nested instances

  Problem:    Compiler aborts when compiling the body of a protected operation
              that contains several package instantiations.

  Status:     This problem was fixed in 5.01 on 2003-02-13

  Workaround: Place the package instantiations outside of the protected
              type altogether.

KP-316a1-C120-018 GNAAMP compiler fails on illegal component clause

  Problem:    The GNAAMP back end crashes instead of reporting an error for
              a component clause that specifies too few bits for a composite
              component.

  Status:     This problem was fixed in 3.17 on 2003-01-21

  Workaround: Correct the component clause to specify the correct bit range.

KP-316a1-C117-004 class-wide allocators in array aggregates are not distinct

  Problem:    If an aggregate has an array subcomponent whose components are
              class-wide pointers, and which is initialized with a component
              association with a subtype name, the components of the array
              are not always distinct.

  Status:     This problems was fixed in 5.01 on 2003-01-024

  Workaround: Use an explicit loop to build the object, rather than an
              aggregate.

KP-316a1-C116-017 GNAAMP compiler fails on aggregate with bit array component

  Problem:    The GNAAMP back end fails when translating an aggregate of
              a record type with a packed bit array component.

  Status:     This problem was fixed in 3.17 on 2003-01-17

  Workaround: Replace the aggregate with assignments to individual components.

KP-316a1-C110-019 Compiler abort with nested unconstrained in packed

  Problem:    If there is a discriminated record with a default value that is
              used as a the the type of a field of a record and that second
              record is used as the type of a field in a packed record, the
              compiler may abort with Gigi code 999.

  Status:     This problem was fixed in 5.01 on 2003-01-31

  Workaround: Avoid the nesting or remove the packing of the outer record.

KP-316a1-C110-012 Missing .da output for gcov on HPUX

  Problem:    On HPUX, running a program compiled with the right options for
              later coverage analysis by gcov does not produce the required
              .da output.

  Status:     This problem was fixed in 3.17 on 2003-01-17

  Workaround: Arrange for -C to be included in the gnatbind and gnatlink

KP-316a1-BC31-003 GNAAMP fails on large bit arrays as record components

  Problem:    The GNAAMP back end blows up on record components that are packed
              bit arrays larger than 64 bits and the assembler fails for record
              components that are bit arrays with a size in the range 33 to 64
              bits unless the component is on a word boundary.

  Status:     This problem was fixed in 3.17 on 2003-02-10

  Workaround: Split large bit array components into smaller fields and word
              align any fields with sizes in the range 33 to 64 bits.

KP-316a1-BC10-009 Degraded debugger after switching to terminated task

  Problem:    Trying to switch the debugger to a task that is already
              terminated locks the debugger into a state were most
              commands will fail with the following message: "Cannot
              find thread nnnn: no thread to satisfy query".

  Status:     This problem was fixed in 5.01 on 2003-03-06

  Workaround: Use the "info tasks" command to check that a task is
              not terminated before attempting to switch to it.

KP-316a1-BB04-014 GNAAMP pragma Universal_Data not effective in subprogram body

  Problem:    When the pragma Universal_Data is given inside the body of a
              library subprogram it has no effect.

  Status:     This problem was fixed in 3.17 on 2003-03-07

  Workaround: Put the pragma after the subprogram body.

KP-316a1-B918-018 Case statements unsupported for large integer types on GNAAMP

  Problem:    The GNAAMP compiler rejects case statements with an expression
              of a type with a range exceeding that of 16-bit integers.

  Status:     This problem was fixed in 3.17 on 2003-01-28

  Workaround: Add IF statements to replace any alternatives covering values
              outside a 16-bit range and convert the expression of the case
              statement to type Integer.
              command line arguments.

KP-316a1-8210-011 Behavior of gnatkr inconsistent with compiler

  Problem:    When krunching file names, the compiler preserves any extension,
              but gnatkr only preserves .ads/.adb. The output of gnatkr should
              be compatible with the compiler behavior.

  Status:     This problem was fixed in 5.01 on 2003-05-27

  Workaround: Do not include the extension in the string given to gnatkr if
              it is other than one of the standard (.ads/.adb) values.

KP-316a1-7330-001 Incorrect type description for mod types printed by debugger

  Problem:    A problem in the compiler when the debugging information format
              is DWARF2 is causing the debugger to print the type description
              for mod types as "<n-byte integer>" (where n is a positive
              integer).

  Status:     This problem was fixed in 5.01 on 2003-03-27

  Workaround: Compile the application using a different debugging format,
              such as stabs, if possible, or simply ignore or reinterpret
              the confusing message.

KP-316a1-6228-002 User-defined "=" incorrectly hides tagged primitive equality

  Problem:    The presence of a user-defined "=" operator with a parameter
              of a tagged type that does not override the normal primitive
              equality of that type can incorrectly hide the primitive
              equality, resulting in failure to resolve legal uses of the
              primitive equality operator.

  Status:     This problem was fixed in 5.02 on 2003-09-26

  Workaround: Change the name of the offending user-defined "=" operator
              to avoid the clash with the type's primitive equality.

KP-316a1-CC04-009 Last parameter in GNAT.Table may be set incorrectly

  Problem:    In an instance of GNAT.Table, if Set_Item is used to write
              past the end of the table and if the necessary space has
              already been allocated, the Last variable will not be modified
              and will reflect the previous value.

  Status:     This was fixed in 5.02 on 2003-12-04

  Workaround: Do not write past the end of the table using Set_Item or
              use Set_Last to force the update of the Last variable.

KP-316a1-C909-009 Gigi 999 abort with over-aligning discriminated records

  Problem:    If an alignment larger than the default stack alignment is
              specified for a discriminated record, the compilation will
              get an internal compiler error.

  Status:     This was fixed in 3.17 on 2004-02-03.

  Workaround: Avoid specifying excessive alignment for such types.
