=======================================================
Known problems in GNAT version 3.15a1 as of Feb 9, 2003
=======================================================

Copyright (c) 2001-2003, Ada Core Technologies

The following is a listing of known problems in release 3.15a1. Except where
specifically noted, all these problems have been corrected in version 3.16,
which means they are corrected in any wavefront issued subsequent to the
date above, and in the final 3.16 release (which is not yet scheduled or
available). The status line in some cases (eventually all entries will be
in this format) 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.

KP-315a1-C113-003 Compiler crashes on X.S (X.S'Length)

  Problem:    Compiler aborts on an indexed component where the prefix is
              record component that depends on a discriminant, and the
              index is a non-static universal integer attribute.

  Status:     This problem was fixed in 3.16 on 2003-01-14.

  Workaround: Qualify the attribute reference with the base type of the index.

KP-315a1-C109-005 Compiler crash on illegal aggregate

  Problem:    Compiler aborts when an array aggregate for a type with
              static bounds and subaggregates with others_clauses has an
              incorrect number of elements.

  Status:     This problem was fixed in 3.16 on 2003-01-09.

  Workaround: Do no write such an illegal aggregate.

KP-315a1-C107-012 Spurious semantic errors with redundant use type clause

  Problem:    If a use clause for type T appears in a local scope within
              a use clause for the package that declares T, the primitive
              operations on T cease being use-visible on exit from the scope.

  Status:     This problem was fixed in 3.16 on 2003-01-07.

  Workaround: Remove redundant use_type clause.

KP-315a1-C103-005 GDB uninitialized section index internal error

  Problem:    On Tru64, debugging certain applications sometimes causes
              the following internal error: "gdb-internal-error:
              sect_index_data not initialized".

  Status:     This problem was fixed in 3.16 on 2003-01-04.

  Workaround: Upon detection of the internal error, GDB asks the user
              whether to quit the session, and if a core file should
              be created. Answer "n" to both questions to ignore the
              internal error.

KP-315a1-C102-001 Debugger symbol table internal error warning on Tru64

  Problem:    On Tru64, GDB sometimes emits the following warning:
              "warning: (Internal error: pc 0x3ff800203a8 in read in
              psymtab, but not in symtab.)". This warning occurs when
              debugging applications containing some C++ code compiled
              with debugging information.

  Status:     This problem was fixed in 3.16 on 2003-01-03.

  Workaround: Do not compile the C++ code with debugging information.

KP-315a1-BC31-001 GNAAMP crashes on function returning packed Boolean array

  Problem:    The GNAAMP compiler fails when trying to compile a return
              statement within a function returning a packed Boolean array.

  Status:     This problem was fixed in 3.16 on 2003-01-02.

  Workaround: Replace the function with a procedure taking an out parameter
              of the packed array type.

KP-315a1-BC24-006 Unexpected constraint error from ABS operator with -gnato

  Problem:    If overflow checking is enabled, then in certain cases the
              ABS operator may generate a Constraint_Error exception when
              the result is in fact in range.

  Status:     This problem was fixed in 3.16 on 2003-01-08

  Workaround: Suppress overflow checking for the affected ABS operator.

KP-315a1-BC20-001 Compiler crash on Enum_Rep attribute for a renaming

  Problem:    Compiler crashes when using the Enum_Rep attribute on a variable
              defined as the renaming of an Enumeration literal.

  Status:     This problem was fixed in 3.16 on 2002-12-20.

  Workaround: Use an assignment instead of a renaming.

KP-315a1-BC18-012 GNAAMP blows up on generating debug info for inlinings

  Problem:    Certain entities in inlined units may cause the GNAAMP back end
              to fail when generating debugger symbol table information.

  Status:     This problem was fixed in 3.16 on 2003-01-07.

  Workaround: Compile the offending unit without -g, or suppress any inlining.

KP-315a1-BC18-011 Missing decl-ids for inline-referenced entities on GNAAMP

  Problem:    The GNAAMP back end is not emitting DST decl-ids for symbols
              declared in package bodies that are referenced by inline
              expansions outside of the package.

  Status:     This problem was fixed in 3.16 on 2003-01-07.

  Workaround: Compile the offending unit without -g, or suppress any inlining.

KP-315a1-BC18-007 Cannot debug applications running as Windows services

  Problem:    It is not possible to attach to applications running as Windows
              services on Windows with GDB 5.1.1. GDB will just refuse to
              attach to the service.

  Status:     This problem was fixed in 3.16 on 2002-12-22.

  Workaround: GDB 4.x, distributed with GNAT 3.14, can debug Windows services.

KP-315a1-BC18-003 Unexpected CE for array assignment

  Problem:    In some cases, an assignment of an array object whose index
              type is an enumeration type to which an enumeration rep
              clause has been applied, will raise an incorrect constraint
              error exception.

  Status:     This problem was fixed in 3.16 on 2002-12-23.

  Workaround: Replace the array assignment with an equivalent loop

KP-315a1-BC17-014 String constants not properly exported on AAMP

  Problem:    String constants declared at the library level are not marked
              as exported by the GNAAMP compiler, leading to link errors.

  Status:     This problem was fixed in 3.16 on 2002-12-18.

  Workaround: Change the string constant to a string variable or define
              a function to return the string value.

KP-315a1-BC16-013 Problem with small record subtypes with rep clauses

  Problem:    On some targets, if a variant record has all fields specified
              with a record rep clause and a has size clause and a record
              subtype is made that would have a smaller size, if that size
              is a power-of-two and the specified size for the record type
              is not, then if there is another record that has a field whose
              type is that subtype and, using a record rep clause, it is not
              placed at a multiple of its alignment, access to the record
              may cause the compiler to get an Gigi abort 999.

  Status:     This problem was fixed in 3.16 on 2002-12-22.

  Workaround: Remove one of the conditions above.

KP-315a1-BC12-007 GDB displays infinity as 0.0 on HPUX.

  Problem:    Infinities floating-point quantities on HPUX are displayed as
              0.0, or some other incorrect value.

  Status:     This problem was fixed in 3.16 on 2002-12-17.

  Workaround: If you are suspicious of a particular floating-point value,
              and it happens to be stored in a variable in memory (as
              opposed to a register), you can a command like
              "x/x VAR'address" to look at the underlying integer
              representation. True zero is represented as all 0's.

KP-315a1-BC11-017 Breakpoint command sequence crashes GDB

  Problem:    Certain breakpoint command sequences (as set by the 'commands'
              command) can cause GDB to crash, or otherwise misbehave,
              especially if they involve function calls or if they cause
              errors.

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

  Workaround: When this problem arises, try to avoid function calls (and,
              of course, erroneous constructs) in breakpoint commands. If
              this is not feasible, encapsulate the desired command sequence
              in a user-defined command, and call that in the breakpoint
              command sequence.

KP-315a1-BC11-004 Spurious error on instantiation of protected object

  Problem:    Compiler rejects an instantiation of a package where the formal
              type is used as a private component of a protected object, when
              the actual is a private type whose full view is an unconstrained
              type with discriminants.

  Status:     This was fixed in 3.16 on 2002-11-04.

  Workaround: Make the actual non-private.

KP-315a1-BC10-014 -j0 crashes gnatmake

  Problem:    Invoking gnatmake with -j0 crashes gnatmake with
              an assertion error, instead of giving an error
              message.

  Status:     This problem was fixed in 3.16 on 2002-12-11.

  Workaround: Never use -j0 (this is meaningless in any case).

KP-315a1-BC10-003 Memory leak with deleted tasks

  Problem:    In the VxWorks target, there is a task's semaphore that
              is not deallocated.

  Status:     This problem was fixed in 3.16 on 2002-06-12.

  Workaround: Deallocate manually the required semaphore.

KP-315a1-BC05-011 GDB return command does not work

  Problem:    The 'return' command in GDB, which is supposed to exit from
              the function instantiation in the current frame, does
              essentially nothing.

  Status:     This problem was fixed in 3.16 on 2002-12-07.

  Workaround: Do an 'up' to the calling frame (to which you desire
              to return), and then issue the return command.

KP-315a1-BC04-001 Infinite loop in GNAT.Dynamic_Tables

  Problem:    When the product of Table_Initial by Table_Increment
              is less than 100, there is an infinite loop in
              GNAT.Dynamic_Tables when the table is extended
              beyond its initial size.

  Status:     This problem was fixed in 3.16 on 2002-12-04.

  Workaround: Make sure that Table_Initial * Table_Increment >= 100

KP-315a1-BB28-014 Missing backtrace information on x86

  Problem:    In some cases, the stack traceback reported by GNAT is
              truncated on x86 platforms. This is due to the fact that
              some call instructions are not correctly checked.

  Status:     This problem was fixed in 3.16 on 2002-11-30.

  Workaround: Use GDB to get a full stack traceback.

KP-315a1-BB27-011 gnatlink -Xlinker and gnatlink's standard options

  Problem:    if gnatlink's -Xlinker option is followed by a standard
              gnatlink option, this option is not passed to the linker.

  Status:     This problem was fixed in 3.16 on 2002-11-30.

  Workaround: Do not use gnatlink in this case but call directly the
              linker. The complete linker command line can be obtained by
              using gnatlink's -v option.

KP-315a1-BB27-009 Spurious constraint-error on imported disciminated object

  Problem:    Compiler treats as constrained an object of an unconstrained
              discriminated type that has an address clause and is used as
              in_out actual in a call.

  Status:     This was fixed in 3.16 on 2002-12-05.

  Workaround: Introduce a temporary to hold the value returned by the
              subprogram.

KP-315a1-BB27-007 Spurious error on instance with class-wide parameter

  Problem:    Compiler rejects the use of an access parameter of a class-wide
              type that is the actual in an instance, when the specific type
              has a discriminant and the subprogram with the access parameter
              overrides an operation inherited from the specific type.

  Status:     This problem was fixed in 3.16 on 2002-11-27.

  Workaround: Introduce a subtype for the class-wide type, and use it both
              in the instance and in the overriding subprogram.

KP-315a1-BB27-003 Bad optimization of two dimensional array bound compare

  Problem:    If there is an explicit comparison of the 'First or 'Last
              attributes of different dimensions of the same array object,
              the compiler incorrectly always yields a value of True.

  Status:     This problem was fixed in 3.16 on 2002-11-28.

  Workaround: Assign the value of one of the attributes to a temporary and
              compare the value of the temporary with the other attribute.

KP-315a1-BB26-016 Alternative file names cause back end failure on AAMP

  Problem:    The use of pragma Source_File_Name for files with nonstandard
              suffixes causes gnaampmake to pass the gcc -x switch to the
              AAMP back end, resulting in a failure since this switch is
              not supported in the AAMP compiler.

  Status:     This problem was fixed in 3.16 on 2002-12-03.

  Workaround: Files with nonstandard suffixes must be renamed to use
              the default source file suffixes.

KP-315a1-BB26-008 Can't use Ada.Command_Line.Environment after OS_Lib.Setenv

  Problem:    On Windows platform it is not possible to use the services
              in Ada.Command_Line.Environment after using GNAT.OS_Lib.Setenv.

  Status:     This problem was fixed in 3.16 on 2002-11-27.

  Workaround: Use the GNAT.OS_Lib.Getenv routine instead.

KP-315a1-BB25-004 Problem with conversions of a multiplication to Duration

  Problem:    If a variable of integral type whose size is 16 bits or smaller
              is multiplied by a constant and then converted to Duration
              (or a similar fixed-point type), the value may be taken as
              zero.

  Status:     This problem was fixed in 3.16 on 2002-12-10.

  Workaround: Store the result of the multiplication into a temporary variable.

KP-315a1-BB23-003 Compiler aborts on address clause for initialized type

  Problem:    Compiler aborts on a unit compiled with front-end inlining, if
              an object with a default initialization has an address clause
              that is a call to the function To_Address.

  Status:     This problem was fixed in 3.16 on 2002-11-26.

  Workaround: Introduce a temporary to hold the address, before the object
              declaration.

KP-315a1-BB22-002 Problem with assignments of complex controlled objects

  Problem:    Assignment an object of a discriminated tagged type
              having controlled components with the result of a classwide
              function could lead to a crash when the controlled component
              was deeply nested.

  Status:     This problem was fixed in 3.16 on 2002-11-28.

  Workaround: A typical controlled component is an unbounded string. Using
              a bounded string instead solves the problem.

KP-315a1-BB21-022 Compiler aborts on aggregate as actual in library instance

  Problem:    Compiler aborts when a library-level instantiation has an actual
              that is an aggregate that contains an allocator.

  Status:     This was fixed in 3.16 on 2002-12-06.

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

KP-315a1-BB21-020 Compiler reject 'Range attribute in a component association

  Problem:    Compiler rejects an array aggregate where a choice is given
              by a 'Range attribute.

  Status:     This problem was fixed in 3.16 on 2002-11-20.

  Workaround: Use a discrete range instead.

KP-315a1-BB20-010 Spurious error on nested generic with defaults

  Problem:    Compiler rejects an instantiation of a nested generic unit
              with box default formal subprograms that are the formals of the
              enclosing generic, when the inner unit is instantiated with
              explicit parameters.

  Status:     This problem was fixed in 3.16 on 2000-11-21.

  Workaround: Use explicit names for the defaults of the inner generic.

KP-315a1-BB19-023 Unreferenced pragma does not suppress unassigned warnings

  Problem:    In some situations, a pragma Unreferenced does not suppress
              warnings about no value being assigned.

  Status:     This problem was fixed in 3.16 on 2002-11-30.

  Workaround: The warnings can be ignored. If it is important to suppress
              the warnings, a pragma Warnings (Off, xxx) where xxx is the
              entity in question can be used.

KP-315a1-BB19-014 Top frame is not listed in backtrace on Solaris

  Problem:    On Solaris, the top frame is not returned by traceback query
              functions. This affects among other things gnatmem tool which
              is unable to compute the full backtrace in GMEM mode.
.
  Status:     This problem was fixed in 3.16 on 2002-11-22.

  Workaround: For general backtrace querying use a nested subprogram
              to call Call_Chain which will then report the enclosing
              subprogram as top frame. In the case of gnatmem, the tool
              correctly reports memory leaks, but does not localize them
              effectively. If necessary obtain a new version of gnatmem
              that corrects this problem.

KP-315a1-BB19-009 Compiler fails to reject null statement in private part

  Problem:    Compiler does not diagnose a null statement in the private
              part of a package declaration.

  Status:     This problem was fixed in 3.16 on 2002-11-19.

  Workaround: Do not write such incorrect code.

KP-315a1-BB18-001 Internal Error when object directory not accessible

  Problem:    On Unix, when the object directory of the main project file
              is not accessible (not "executable") an internal error is
              reported (triggered by exception Directory_Error).

  Status:     This problem was fixed in 3.16 on 2002-11-18.

  Workaround: Make the object directory "executable".

KP-315a1-BB17-003 Wrong delay on Windows when OS clock is resynchronized

  Problem:    On Windows if the clock is resynchronized (for example based on
              an NTP server or for a DST adjustment) a delay statement can
              wait more time than expected.

  Status:     This problem was fixed in 3.16 on 2002-11-25.

  Workaround: Disable all clock adjustment (DST and NTP) on the system.

KP-315a1-BB16-003 Compiler crash on incomplete subtype

  Problem:    Compiler crashes on a component declaration whose type mark
              is a constrained subtype of an incomplete discriminated type.

  Status:     This problem was fixed in 3.16 on 2002-11-19.

  Workaround: Use an explicit constraint on the parent type in the component
              declaration.

KP-315a1-BB14-009 Compiler crash on initialization of private protected type

  Problem:    Compiler aborts on a discriminated private type whose full view
              is derived from another private type whose full view is a
              discriminated protected type.

  Status:     This problem was fixed in 3.16 on 2002-11-14.

  Workaround: Make ancestor type non-private.

KP-315a1-BB14-007 Bad Size for object of primitive type not rejected

  Problem:    The size specified for an object with a primitive (scalar or
              access) type must be a power of 2 multiple of the storage
              unit size (e.g. 8, 16, 32, or 64 on a typical byte addressed
              architecture). The compiler previously would accept other
              values but ignore them, leading to unexpected results.

  Status:     This problem was fixed in 3.16 on 2002-12-01.

  Workaround: Avoid the specification of unsupported incorrect values
              for the size of an object.

KP-315a1-BB13-011 Improper allocation of exception objects in GNAAMP

  Problem:    Zero space is being allocated for exception objects (other than
              the predefined exceptions in Standard) due to lack of size and
              layout determination for the internal type Standard.Exception.
              This can result in failures during registration of exceptions
              at elaboration time.

  Status:     This problem was fixed in 3.16 on 2002-11-13.

  Workaround: Edit the elaboration code associated with exceptions to ensure
              proper allocation size and copying of an exception's data,
              or avoid dependences on any packages declaring exceptions.

KP-315a1-BB13-002 Constraint error not raised on stream operation

  Problem:    No constraint error is raised on some targets when using stream
              operations on a discriminated record with a string component
              constrained by the discriminant that has an incorrect length.
              length.

  Status:     This problem was fixed in 3.16 on 2002-10-20.

  Workaround: Write explicit checks for the component length.

KP-315a1-BB12-016 Compiler crash on generic bodies in subunit

  Problem:    Compiler aborts when a subprogram in a generic body nested in
              a proper body accesses some unconstrained array declared in
              the spec of the parent package of the subunit.

  Status:     This was fixed in 3.16 on 2002-11-16.

  Workaround: Introduce a dummy variable of the array type before the package
              that contains the generic units.

KP-315a1-BB12-006 Incorrect gnatname results

  Problem:    In some circumstances, gnatname does not recognize valid
              Ada source files as correct input files.

  Status:     This problem was fixed in 3.16 on 2002-11-13.

  Workaround: Generate the configuration file (gnat.adc) or the project
              file manually with the correct package Naming.

KP-315a1-BB12-003 Incorrect value in nested indexed assignment

  Problem:    A wrong value is stored on an assignment to an indexed component
              of a packed array, when the index expression is itself an
              indexed reference to another packed array.

  Status:     This was fixed in 3.16 on 2002-11-26.

  Workaround: Introduce a separate temporary for the index expression.

KP-315a1-BB11-017 Incorrect code for arrays with Long_Integer indexes on AAMP

  Problem:    The GNAAMP back end is generating a conversion from 32-bit
              integer to 16-bit integer for indexing arrays whose index
              type is a 32-bit integer type. Also the back end should be
              generating the INDEX. macro for indexing of arrays rather
              than directly generating instructions such as REFSXU/ASNSXU.

  Status:     This problem was fixed in 3.16 on 2002-11-15.

  Workaround: Avoid index values that require more than 16 bits.

KP-315a1-BB11-015 Code for unconstrained array allocators is wrong in GNAAMP

  Problem:    The GNAAMP back end is failing to generate a constraint
              descriptor for allocators of unconstrained-access-to-array
              types.

  Status:     This problem was fixed in 3.16 on 2002-11-12.

  Workaround: Use an access-to-constrained-array allocator.

KP-315a1-BB11-014 Unchecked_Deallocation does not use DEALL_IN_HP macro on AAMP

  Problem:    The GNAAMP back end is not generating the macro DEALL_IN_HP.
              for calls to instances of Unchecked_Deallocation.

  Status:     This problem was fixed in 3.16 on 2002-11-12.

  Workaround: The macro can be generated by the user declaring an imported
              procedure that maps to the macro. However, no workaround is
              needed at present since the AAMP deallocate routine is currently
              a no-op.

KP-315a1-BB10-005 Asis.Declarations.Corresponding_Base_Entity problem

  Problem:    If in the renaming declaration the name after 'renames'
              has a complex structure (is a function call or indexed or
              selected component), Corresponding_Base_Entity blows up when
              applied to an Element representing such a renamed declaration.

  Status:     This problem was fixed in 3.16 on 2002-11-11.

  Workaround: Use other ASIS queries to get manually the base entity
              from the renaming declaration

KP-315a1-BB11-005 Asis.Declarations.Corresponding_Declaration problem

  Problem:    For a library-level generic instantiation, if the name of
              the program unit is an expanded defining name,
              Corresponding_Declaration works correctly when applied
              to the instantiation Element, but it returns a junk result
              when applied to the Element representing the corresponding
              expanded body.

  Status:     This problem was fixed in 3.16 on 2002-11-11.

  Workaround: Do not apply Corresponding_Declaration to expanded
              generic bodies. Instead, go up to the corresponding
              instantiation (by applying Enclosing_element) and
              use Corresponding_Declaration for the instantiation Element

KP-315a1-BB10-001 Missing Adjust calls in some view-conversion assignments

  Problem:    When assigning part of a controlled object by using view
              conversions, an Adjust call may be missing when the target
              type was controlled, had controlled components and was
              derived from a type with controlled components.

  Status:     This problem was fixed in 3.16 on 2002-11-21.

  Workaround: Avoid view conversions in assignments for controlled
              types matching the above description.

KP-315a1-BB08-010 Side effect on loop bound that is subcomponent of global

  Problem:    If a loop bound is a subcomponent of a global variable, a
              modification of that variable within the loop may incorrectly
              affect the execution of the loop.

  Status:     This problem was fixed in 3.16 on 2002-08-16.

  Workaround: Introduce a constant to hold the loop bound.

KP-315a1-BB07-023 Bad handling of network paths in Normalize_Pathname

  Problem:    Under Windows, the functions GNAT.OS_Lib.Normalize_Pathname
              and GNAT.Directory_Operations.Format_Pathname do not handle
              network paths (starting with \\) properly.

  Status:     This problem was fixed in 3.16 on 2002-11-08.

  Workaround: Avoid calling these functions when using a network drive,
              or append a \ character after calling them.

KP-315a1-BB06-007 Missing reference for named entry in aggregate

  Problem:    When an aggregate used named notation, the component
              names were not recorded as cross-references, resulting
              in missed references in gnatfind and gnatxref.

  Status:     This problem was fixed in 3.16 on 2002-11-07.

  Workaround: When searching for all references to a component of a record
              use a normal text search to ensure that all references are
              found.

KP-315a1-BB06-005 GNAAMP crashes on string literal assignment with -g

  Problem:    When compiling with -g, the GNAAMP back end crashes when
              encountering a string literal assigned to a formal string
              parameter.

  Status:     This problem was fixed in 3.16 on 2002-11-06.

  Workaround: Avoid using the -g switch on units with such string literals.

KP-315a1-BB06-002 Stream_IO on VMS truncation

  Problem:
  Status:
  Workaround: See KP-315a1-B607-017

KP-315a1-BB05-012 GNAAMP crashes when compiling generic units with -g

  Problem:    The GNAAMP back end tries to traverse the entities of a
              generic unit when generating debugger symbol tables,
              but fails because such entities are not processed by
              the back end and so they don't have associated back end
              symbol table information.

  Status:     This problem was fixed in 3.16 on 2002-11-05.

  Workaround: Avoid compiling generic units with the -g switch.

KP-315a1-BA28-013 gnatmake does not always build all mains

  Problem:    When gnatmake is invoked with several mains, if a main
              procedure B is in the closure of another preceding main procedure
              A, B may not be bound and linked.

  Status:     This problem was fixed in 3.16 on 2002-10-28.

  Workaround: Reorder the mains on the command line or in the project file
              so that no main procedure is in the closure of another preceding
              main procedure.

KP-315a1-BA22-007 Constraint_Error nested discriminant access with -O2

  Problem:    An assignment to a component of discriminated component of a
              discriminated object raises constraint_error if unit is compiled
              with the -O2 optimization setting.

  Status:     This was fixed in 3.16 on 2002-12-22.

  Workaround: Compile the unit at a lower optimization level, or make the
              assignment in two steps.

KP-315a1-BA22-006 Spurious error on constant initialized with slice.

  Problem:    Compiler rejects a constant declaration whose expression is a
              slice of a record component, if the record has a representation
              clause that may indicate a non-standard alignment on some target.

  Status:     This problem was fixed in 3.16 on 2002-10-23.

  Workaround: Remove "constant" from declaration, or introduce a variable
              to hold the slice and initialize the constant.

KP-315a1-BA22-005 Spurious error on stack-checking in overloaded protected op

  Problem:    Compiler rejects a return statement from an overloaded protected
              operation when its homonym has a different return type.

  Status:     This problem was fixed in 3.16 on 2002-10-22.

  Workaround: Introduce an explicit temporary to hold the return expression,
              and return the temporary.

KP-315a1-BA18-012 Some configuration pragmas not taken into account

  Problem:    Some configuration pragmas (such as Extend_System) are not
              processed when they are in a config pragma file specified with
              a switch -gnatec=.

  Status:     This problem was fixed in 3.16 on 2002-10-18

  Workaround: Add the pragmas directly in the sources or use gnat.adc.

KP-315a1-BA18-005 Timed accept statements fail with negative values in VxWorks

  Problem:    When using a timed accept statement, if the deadline for the
              time out has already passed then the timeout will never occur.

  Status:     This problem was fixed in 3.16 on 2002-10-12

  Workaround: Test against negative values before performing a timed accept
              statement, or use 3.14a1, since this problem is only present in
              version 3.15

KP-315a1-BA17-008 Compiler does not recognize pragma Volatile on full view

  Problem:    Compiler rejects a call to an operation when the actual has
              pragma volatile, and the formal is a private type where only
              the full view is declared volatile.

  Status:     This problem was fixed in 3.16 on 2002-10-17

  Workaround: Add pragma to partial view of type.

KP-315a1-BA14-008 Spurious constraint error on conversion of null string

  Problem:    Constraint error is raised in call whose actual is a conversion
              of a concatenation, one of whose operands is a type conversion
              of a null string to the predefined type string.

  Status:     This problem was fixed in 3.16 on 2002-10-14.

  Workaround: Remove conversion to String.

KP-315a1-BA14-005 Library dir same as Object dir

  Problem:    It was possible to specify a library directory identical
              to the object directory in a project file, using a declaration
              such as:
                 for Library_Dir use ".";
              This was not detected and consequently the library was not
              built correctly.

  Status:     This problem was fixed in 3.16 on 2002-10-15

  Workaround: Make sure that the specified library directory is different
              from the object directory

KP-315a1-BA14-003 Cannot set the stack size for a tasking program on Windows

  Problem:    It is not always possible to set the stack size of a tasking
              program on Windows. This is due to a problem in the gnatlink
              handling of the options to set the stack size.

  Status:     This problem was fixed in 3.16 on 2002-10-15.

  Workaround: Call GNU/linker directly passing the right options.

KP-315a1-BA14-002 Asis.Text.Is_Text_Available problem

  Problem:    Asis.Text.Is_Text_Available returns True for normalized
              associations

  Status:     This problem was fixed in 3.16 on 2002-11-28

  Workaround: Use Asis.Elements.Is_Part_Of_Implicit together with
              Is_Text_Available check to detect if the text image and the
              text span is available for a given Element

KP-315a1-BA11-011 Spurious constraint error in private protected operation

  Problem:    A constraint error may be raised when an operation declared
              in a protected body accesses a private component that is an
              an array of discriminated records.

  Status:     This problem was fixed in 3.16 on 2002-11-11.

  Workaround: Make operation public by adding a declaration to the
              protected type itself.

KP-315a1-BA11-009 Bogus size error on subtype with zero-size field

  Problem:    It is possible, in the presence of certain representation
              clauses, for the compiler to complain about a size of a
              subtype being too large (even though there is no size rep
              clause) if the subtype is a constrained subtype of a variant
              record and contain a zero-sized field as its last component.

  Status:     This problem was fixed in 3.16 on 2002-10-13.

  Workaround: Remove the zero-sized field, or place a dummy field after it

KP-315a1-BA11-006 ASIS classifies some GNAT-specific pragmas as An_Unknown_Pragma

  Problem:    Some GNAT-specific pragmas are classified by a query to
              Asis.Elements.Pragma_Kind as An_Unknown_Pragma whereas
              they are of An_Implementation_Defined_Pragma kind

  Status:     This problem was fixed in GNAT 3.16 on 2002-10-14.

  Workaround: For An_Unknown_Pragma, get the pragma name image and analyze
              it to check if it is the name of one of the GNAT-defined
              pragmas

KP-315a1-BA10-001 Compiler rejects concatenation of strings for array

  Problem:    If the component type of an array type is a string subtype,
              the compiler rejects an expression for the type which is the
              concatenation of string literals.

  Status:     This problem was fixed in 3.16 on 2002-10-15.

  Workaround: Qualify the strings with the component type, or use an
              aggregate.

KP-315a1-BA06-006 Compiler fails to diagnose duplicate task bodies

  Problem:    The compiler does not reject a second task body provided
              for a given task type.

  Status:     This problem was fixed in 3.16 on 2002-10-06.

  Workaround: Remove the illegal second body

KP-315a1-BA01-009 Failure to recognize side effects when .all used

  Problem:    In a reference such as a.all.b.all, in some cases the
              compiler would not recognize that the value of this
              expression changes if a is modified, and hence could
              generate incorrect code. This occurs only when explicit
              dereferences are present (not a usual style of writing).

  Status:     This problem was fixed in 3.16 on 2002-10-03.

  Workaround: Remove the unnecessary explicit qualification when a
              record component is accessed with a prefix that is of an
              access type (e.g. rewrite the above example as a.b.all).

KP-315a1-BA01-002 Crash on aggregate assigned to slice

  Problem:    Compiler crashes on a slice assignment of an aggregate, when
              a bound of the slice is given by a function call, and the
              aggregate has an others_clause.

  Status:     This problem was fixed in 3.16 on 2002-10-01.

  Workaround: Capture bound into a separate temporary, and use temporary
              in the slice.

KP-315a1-B930-018 Failure to diagnose access of volatile variable

  Problem:    In the construction a.b'access where a is an access to an
              object of a volatile record type, there was no diagnosis of
              the error of generating an access type that referenced a
              non-volatile type (see RM C.6(12)). The error was always
              diagnosed in the case of a.all'access, but the implicit
              dereference caused the check to be omitted

  Status:     This problem was fixed in 3.16 on 2002-10-03.

  Workaround: Fix the illegal code involved, or alternatively use the
              Unrestricted_Access attribute which does not have this
              restriction. Note however that the restriction serves
              a useful purpose, since references via the newly created
              pointer may not preserve the volatile property.

KP-315a1-B930-011 gnatmake crash extending project file with no source dirs

  Problem:    When the main project file specified to gnatmake is extending
              another project file and there are no source directories
              (specified by "for Source_Dirs use ();"), gnatmake crashes
              with an internal error.

  Status:     This problem is fixed in 3.16.

  Workaround: Remove the declaration "for Source_Dirs use ();".

KP-315a1-B929-004 Misuse of Base attribute not properly diagnosed

  Problem:    The compiler improperly allowed the base attribute to be
              applied to other than scalar types, in violation of the
              clear restriction in the Ada 95 RM.

  Status:     This problem was fixed in 3.16 on 2002-10-03.

  Workaround: Fix the illegal code by removing the useless base attribute.

KP-315a1-B927-009 Debugger crash when running or attaching to a program.

  Problem:    On Tru64, the debugger sometimes crashes while running
              or attaching to a program containing some C++ code
              compiled with debugging information.

  Status:     This problem was fixed in 3.16 on 2003-01-01.

  Workaround: Do not compile the C++ code with debugging information.

KP-315a1-B925-023 Compiler crash on slice whose prefix is a thin pointer

  Problem:    The compiler may abort on a slice reference where the
              prefix is an access type which is forced to be stored in
              a single word via a record representation clause.

  Status:     This problem is fixed in 3.16.

  Workaround: Copy the value of the access type into a temporary variable.

KP-315a1-B925-001 Spurious error on universal expression in comparison

  Problem:    Compiler rejects a universal expression that is an operand of
              a comparison, when the operator is overloaded, and one candidate
              interpretation is a subtype that is not use-visible.

  Status:     This was fixed in 3.16 on 2002-09-26

  Workaround: Qualify universal expression with expected type.

KP-315a1-B924-015 Asis.Declarations.Corresponding_Subprogram_Derivation problem

  Problem:    Corresponding_Subprogram_Derivation blows up for some
              arguments

  Status:     This problem was fixed in GNAT 3.16 on 2002-10-20.

  Workaround: Manually compute the subprogram from which the given subprogram
              is derived, using other structural and semantics queries dealing
              with derived type definitions.

KP-315a1-B924-013 Asis.Expressions.Corresponding_Name_Declaration problem

  Problem:    For names defined by "multi-level" renaming declarations
              Asis.Expressions.Corresponding_Name_Declaration may return
              the declaration corresponding to the entity being renamed
              instead of returning the renamed declaration

  Status:     This problem was fixed in 3.16 on 2002-09-28.

  Workaround: Use comparison of name images to check what declaration
              is returned. Use manual traversing of the syntax structure
              to get to the renaming declaration

KP-315a1-B924-012 Compiler crash on call to inherited renamed operator

  Problem:    Compiler aborts on a call to an inherited operation whose
              parent is a function that renames an intrinsic operator.

  Status:     This problem is fixed in 3.16.

  Workaround: Use an explicit renaming to override the inherited operation.

KP-315a1-B923-010 GDB fails to attach properly on Solaris and IRIX

  Problem:    GDB fails when attaching to a running process that uses
              tasking on Solaris and on IRIX 6.x (using pthreads).
              There are various manifestations: messages about "invalid
              thread handle", failure to indicate a current task, and
              failure of the 'task' command.

  Status:     This problem was fixed in 3.16 on 2002-10-11.

  Workaround: First, use the 'file' command or start GDB with
              'gdb PROGRAM' so that GDB knows before attaching what the
              executable file is. On IRIX, the GDB 3.15a1 release
              will fail to report the current task properly, but the
              task command works normally. For the 3.14 releases, the task
              command will not work, but you can still use breakpoints
              and the continue command, which is often sufficient to get
              to a point where 'info tasks' works and where you can do
              backtraces of the task in which the break occurs.

KP-315a1-B921-002 Failure to range check Val attribute for character type

  Problem:    This is actually a manifestation of the problem described
              below under B921-001. If the Val attribute is applied to the
              doubly derived character type, a required range check may not
              be performed (since the base type bounds incorrectly indicate
              that no check is required).

  Status:     This problem is fixed in 3.16.

  Workaround: If the range check here is essential (a very unlikely event),
              then directly derive the second character type as described
              below under B921-001.

KP-315a1-B921-001 Wrong bounds for doubly derived character type

  Problem:    If a type is derived from Standard.Character with explicit
              bounds and then a second type is further derived from this
              first type, the bounds of the base type of the second type
              are incorrectly set to match the bounds of the first subtype.

  Status:     This problem is fixed in 3.16.

  Workaround: It is unlikely that this would matter in any real program, but
              if the problem is encountered, simply derive the second type
              directly from Standard.Character with appropriate bounds.

KP-315a1-B920-006 Asis.Statements.Label_Names problem

  Problem:    In some situations Asis.Statements.Label_Names may return
              an empty list when the argument statement has label(s)

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: traverse the text image of the enclosed construct to
              locate all the labels

KP-315a1-B918-004 Potential memory leak from class-wide controlled function

  Problem:    When the return statement of a classwide function is a
              direct call to a function returning a specific type with
              controlled components, the returned value is adjusted but
              not finalized on the callee side. When the controlled
              component is an unbounded string this can lead to a
              memory leak.

  Status:     This problem is fixed in 3.16.

  Workaround: Use an intermediate local variable to hold the result of
              the call that was on the return statement.

KP-315a1-B916-005 Compiler abort on Solaris

  Problem:    Passing a very elaborate expression to pragma Storage_Size
              may result in a gigi abort.

  Status:     This problem was fixed in 3.16 on 2002-09-26.

  Workaround: Assign desired size to a temporary variable then pass that
              value to pragma Storage_Size.

KP-315a1-B915-001 Range not properly checked in Priority pragma

  Problem:    For a priority pragma appearing in a task definition, the
              range of priorities allowed is restricted to those defined
              by the subtype Priority. In GNAT 3.15a1, values in the range
              of Any_Priority were incorrectly accepted and no exception
              was raised when such values were out of range of Priority.

  Status:     This problem is fixed in 3.16.

  Workaround: Do not use out of range priority values in priority pragmas
              within task definitions. Follow the RM required rule that
              the priority must be in the range of subtype Priority.

KP-315a1-B913-003 Windows environment string is null in -mwindows mode

  Problem:    When building an application without console on Windows
              (-mwindows option) the environment string (envp) passed to
              the main procedure is null. So the environment cannot be
              accessed through the Ada.Command_Line.Environment unit.

  Status:     This problem is fixed in 3.16.

  Workaround: Interface to the C getenv() routine to retrieve the environment
              context.

KP-315a1-B913-002 Asis.Declarations.Generic_Actual_Part problem

  Problem:    In some situations this query may blow up when
              Normalized is set ON

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Use manual analysis of the instantiation and the corresponding
              generic declaration to construct the normalized associations

KP-315a1-B912-005 Spurious error on type reference in generic grand-child

  Problem:    Compiler rejects a declaration in a generic grand-child, when
              the type is declared in a parent generic, and the type mark is
              given with a fully qualified name that starts from the non-
              generic ultimate ancestor.

  Status:     This problem was fixed in 3.16 on 2002-09-12

  Workaround: Remove redundant qualification and use direct name of type.

KP-315a1-B912-004 GNAT STUB does not work with directory info

  Problem:    When the GNAT driver is invoked with command stub and
              the input path is given with directory information,
              either the output is put in the current directory
              if the default GNAT naming scheme is used, or the command
              fails if another naming scheme is used.

  Status:     This problem is fixed in 3.16.

  Workaround: Invoke GNAT STUB in the directory of the input.

KP-315a1-B911-007 Undefined symbols for instantiation of generic in child unit

  Problem:    If the generic unit in a library-level instantiation is declared
              in a child unit that needs a body, but the generic itself has
              none, the binding file contains undefined symbols that prevent
              the link.

  Status:     This problem was fixed in 3.16 on 2002-10-13.

  Workaround: Force a body for the generic, e.g. by adding a dummy procedure.

KP-315a1-B910-011 Compiler crashes if complex priority expression is used

  Problem:    If a Priority or Interrupt_Priority pragma has a complex
              non-static expression, the compiler may crash.

  Status:     This problem is fixed in 3.16.

  Workaround: Define the priority value as a global constant, or use a
              discriminant to set the priority value.

KP-315a1-B909-011 GDB fails to read a core file on Tru64 5.1A

  Problem:    GDB fails to read a core file, and prints some messages
              reporting errors such as unknown core file section types,
              endianness mismatch, or failure to find the general-purpose
              registers. The name of the executable that generated the
              core file and the signal name that caused the crash are
              also incorrect.

  Status:     This problem is fixed in 3.16.

  Workaround: Reproduce the problem while executing the program under
              the control of the debugger. The signal will be trapped
              by the debugger, and the execution will stop at the
              location of the crash.

KP-315a1-B908-001 Invalid out parameters can result in erroneous execution

  Problem:    If an OUT mode parameter is not initialized and never set,
              then the value can be invalid on return, and, contrary to
              the requirements of the RM, accessing this invalid value
              can result in erroneous behavior.

  Status:     This problem is fixed in 3.16.

  Workaround: Avoid accessing invalid values. Only programs with bounded
              errors can encounter this problem, so eliminating the
              error will eliminate the problem.

KP-315a1-B906-002 Program not terminating under OpenVMS with ASTs

  Problem:    Under OpenVMS in some cases, when mixing "select ... or
              terminate" constructs and the AST_Entry attribute, the
              program will not terminate properly.

  Status:     This problem is fixed in 3.16.

  Workaround: Call GNAT.OS_Lib.OS_Exit to exit the program.

KP-315a1-B905-012 Tornado debugger crash after second connection attempt.

  Problem:    The Tornado cross-debugger sometimes crashes at the end
              of the second unsuccessful attempt to connect to the
              target using the "target wtx <target-name>" command.

  Status:     This problem is fixed in 3.16.

  Workaround: Restart the debugger before making a new attempt. Also,
              make sure the target server is properly connected to the
              target agent before retrying.

KP-315a1-B902-017 Compiler crash with Pragma Atomic on unconstrained array

  Problem:    If Pragma Atomic is applied to an unconstrained array type,
              the compiler will abort, usually with an access violation or
              equivalent.

  Status:     This problem is fixed in 3.16 and the appropriate error
              message will be produced.

  Workaround: Remove the illegal pragma.

KP-315a1-B902-004 Validity checking fails for OUT parameters

  Problem:    If an OUT mode parameter is not initialized and never set
              then a reference to the parameter on return from the call
              will not cause a Constraint_Error when validity checking
              is enabled.

  Status:     This problem is fixed in 3.16

  Workaround: Avoid referencing invalid values from OUT parameters

KP-315a1-B830-008 Crash on reference to discriminant of subcomponent

  Problem:    Compiler aborts on a reference to a discriminant of subcomponent
              of a discriminated type, when the subcomponent is constrained
              by the discriminant of the enclosing type.

  Status:     This problem was fixed in 3.16 on 2002-08-31.

  Workaround: Use a temporary to hold subcomponent, and reference the
              discriminant of the temporary.

KP-315a1-B826-003 Compiler crashes on slice of subcomponent with rep clause

  Problem:    On some targets, the compiler aborts on an expression of the
              form a.b.c (x..y), when the types of a and b have a record
              representation clause.

  Status      This was fixed in 3.16 on 2002-09-15.

  Workaround: Remove representation clauses, or introduce a temporary for
              the prefix of the slice.

KP-315a1-B825-003 Compiler sometimes crashes when -gnatVi is specified

  Problem:    Compiler might generate the bug box for some sources
              when run with "Validity checks for in mode parameters"
              (-gnatVi) switch.

  Status:     This problem was fixed in 3.16

  Workaround: Do no use -gnatVi on a problematic source.

KP-315a1-B823-014 Compiler hang on syntax error

  Problem:    The compiler goes into an infinite loop when compiling an
              instance of a compilation unit whose generic body has an
              invalid name on the end line.

  Status:     This problem was fixed in 3.16 on 2002-08-24

  Workaround: Fix syntax error. Compile each unit separately to detect
              errors on generic unit itself.

KP-315a1-B823-013 GDB bomb on printing array in record

  Problem:    In some cases, GDB fails when printing an array of variant
              records when the variant branches all have equal size.

  Status:     This is fixed in 3.16

  Workaround: Print the record in C mode (using 'set lang c' first).

KP-315a1-B823-001 Compiler crash on variable declaration of private subtype

  Problem:    Compiler crashes on a variable declaration of a private
              subtype without discriminants when the full view of the
              parent type is a mutable type with components that depend
              on the discriminants.

  Status:     This is fixed in 3.16.

  Workaround: Use the parent type in the declaration.

KP-315a1-B822-003 Compiler crash on instantiation that is a private child unit

  Problem:    Compiler crashes when a unit in the context of the current
              compilation is a private child unit that is an instantiation.

  Status:     This is fixed in 3.16.

  Workaround: Make the child unit non-private.

KP-315a1-B820-011 Spurious error on selected component in instance

  Problem:    Compiler rejects a selected component in an instance of a
              child unit, when the prefix is a formal derived type whose
              parent is a private extension declared in the parent unit,
              the selector is in the private extension, and the actual
              is derived from the partial view of the parent.

  Status:     This is fixed in 3.16.

  Workaround: Make the parent type into a non-private record extension.

KP-315a1-B820-005 Combining -gnatc and -gnats switches (also -gnatz)

  Problem:    Despite the documentation to the contrary, combining
              either -gnatc or -gnats with other switches does not
              work, even if the stated rule about putting c/s first
              is followed. Also -gnatz/-gnatzr/-gnatzc may not be
              combined with any other switches, and this was not
              documented.

  Status:     All three cases are fixed in 3.16

  Workaround: Do not combine any of these switches with other switches.
              Use them on their own and use separate switches for other
              required options.

KP-315a1-B819-009 Crash on 64-bit arithmetic with -gnatN and -gnato

  Problem:    If a program that performs 64-bit signed integer arithmetic
              is compiled with both -gnatN and -gnato, then the compiler
              may crash during compilation.

  Status:     This is fixed in 3.16.

  Workaround: Eliminate either -gnatN or -gnato for the unit in question

KP-315a1-B819-005 Spurious error on default parameter in generic

  Problem:    Compiler rejects a default parameter in a call within a
              generic body, when the default is an entity global to the
              generic, and its type is private.

  Status:     This is fixed in 3.16.

  Workaround: Make the parameter explicit.

KP-315a1-B819-004 Compiler crash for exception handler in accept statement

  Problem:    Compiler crashes on a reference to an entry formal that
              appears within an exception handler for the corresponding
              accept statement.

  Status:     This is fixed in 3.16.

  Workaround: Wrap the statements in the accept within a block that includes
              the exception handler.

KP-315a1-B814-013 GDB fails to fetch floating-point registers on IRIX

  Problem:    When using pthreads on IRIX 6.x, GDB sometimes fails to
              fetch the proper thread's floating-point registers, or
              even to fetch floating-point registers at all in some
              cases (giving an internal error message). This can disrupt
              backtraces, and the display of floating-point local
              variables and parameters (when they are in registers).

  Status:     This is fixed in 3.16

  Workaround: When this condition occurs, GDB is simply not usable for
              displaying floating-point values. Other types of
              variable and parameter will generally still print.
              Compiling with -O0 will sometimes help, because of a
              different handling of floating-point values.

KP-315a1-B814-003 Relative delay difference under VxWorks

  Problem:    Under VxWorks systems, the number of clock ticks used to
              perform a relative delay for non-tasking programs is too
              small (by one tick) in some cases.

  Status:     This is fixed in 3.16

  Workaround: Increment the delay value

KP-315a1-B809-001 Timed entry calls fail with negative values under VxWorks

  Problem:    When using a timed entry call with a negative value under
              VxWorks, the timeout will never occur.

  Status:     This is fixed in 3.16

  Workaround: Test against negative values before performing a timed entry
              call, or use 3.14a1, since this problem is only present in
              version 3.15

KP-315a1-B808-011 Nested discriminant checks can cause compiler crash

  Problem:    Some cases of discriminant checks for nested discriminated
              records can cause the compiler to crash. This can never
              result in the generation of incorrect code.

  Status:     This problem was fixed in 3.16 on 2002-10-03.

  Workaround: Suppress discriminant checking for the affected code

KP-315a1-B808-010 Side effect on loop bound that is subcomponent of global

  Problem:    If a loop bound is a subcomponent of a global variable, a
              modification of that variable in the loop may affect execution
              of the loop.

  Status:     This problem was fixed in 3.16 on 2002-08-16

  Workaround: Introduce a constant to hold loop bound.

KP-315a1-B808-002 Failure to properly initialize chars_ptr values

  Problem:    The type chars_ptr, declared in Interfaces.C.Strings is
              intended to be equivalent to char*, but objects of the
              type are not always initialized to Null_Ptr as required
              by RM B.3.1(22).

  Status:     This is fixed in 3.16

  Workaround: Provide explicit initializations using Null_Ptr.

KP-315a1-B808-001 Spurious constraint error on slice with modular index

  Problem:    A constraint error is raised on an assignment of a slice
              that is converted to an array type whose index is mod 2**16,
              when the upper bound of the slice is close to 2**16.

  Status:     This is fixed in 3.16.

  Workaround: Use a signed integer type: range  0 .. 2**16 -1 for the index.

KP-315a1-B804-001 Dynamic_Tables.Set_Item does not increase the table's length

  Problem:    GNAT.Dynamic_Tables.Set_Item does not increase the table's
              length. Items are not appended properly into the table.

  Status:     This is fixed in 3.16.

  Workaround: Use Increment_Last and add manually the item at the end of the
              table instead.

KP-315a1-B802-014 GDB symbol-table corruption on HPUX.

  Problem:    When non-gcc code is linked into a GNAT executable on
              HPUX, it is possible for symbols to get lost. This is
              manifested by messages such as
                Internal: global symbol `foo' found in bar.c psymtab
                but not in symtab.

  Status:     This is fixed in 3.16.

  Workaround: Compile the offending modules using GCC.

KP-315a1-B802-010 Exception on aggregate for type with mutable component

  Problem:    An exception may be raised on an initialization for a constant
              of a record type with a component of a mutable type, when the
              initialization expression is an aggregate and the corresponding
              component is smaller than the larger variant of the type.

  Status:     This is fixed in 3.16.

  Workaround: Declare a variable and use an assignment to initialize it.

KP-315a1-B802-004 Crash on discriminant renamings and rep clauses

  Problem:    If RT is a record type with several discriminants and a
              specified layout, defining a discriminated subtype of RT
              with discriminant renamings sometimes causes a compiler
              crash.

  Status:     This is fixed in 3.16.

  Workaround: Remove the parent layout specification or decrease the number
              of discriminant renamings in the subtype definition.

KP-315a1-B801-005 Incorrect GDB output for 'print &variable'

  Problem:    In some cases, GDB gives an error ("Attempt to take address
              of non-lval") when attempting to evaluate expressions such
              as var'access (or &var in C syntax), when var happens to
              have the GDB type reference-to-something (which GCC sometimes
              assigns to certain formal parameters, dynamic-sized arrays,
              and renamings, among others).

  Status:     This is fixed in 3.16.

  Workaround: In these cases, just printing var (without 'access) will
              include the reference address. Also, switching to C mode
              before printing may give the correct value.

KP-315a1-B729-014 No_Implicit_Heap_Allocators did not check initializations

  Problem:    Library level variables of variable size generate calls to
              allocate memory for the length of the variable as determined
              at run-time. These calls were not excluded in the presence of
              pragma Restrictions (No_Implicit_Heap_Allocators).

  Status:     This is fixed in 3.16.

  Workaround: If you are using this restriction, then avoid declarations of
              library level variables of dynamic or unknown length.

KP-315a1-B726-021 Compiler crashes on Null as default in inherited function

  Problem:    Compiler aborts if an inherited function has a parameter of an
              an access type with Null as a default expression.

  Status:     This was fixed in 3.16 on 2002-07-31

  Workaround: Introduce a constant of the access type, and use the constant
              as a default.

KP-315a1-B726-014 GDB problem with temporary breakpoint command lists

  Problem:    Command lists associated to temporary breakpoints in GDB
              are not executed. Trying to work-around the problem by
              using normal breakpoints and including in the command-list
              an extra command to clear this breakpoint causes warnings
              or errors in GDB during the execution of the command list,
              sometimes leading to a GDB crash.

  Status:     This is fixed in 3.16.

  Workaround: Use command lists with normal breakpoints, and avoid
              deleting a breakpoint within its commands list.

KP-315a1-B726-011 Alignment ignored for small packed array type

  Problem:    If a packed array type is represented as a modular type (when
              the size is 64 bits or less and known at compile time), then
              an alignment clause for the type is accepted but ignored. It
              should have been rejected.

  Status:     This problem is fixed in 3.16, by now not only accepting
              the alignment clause, but also respecting it properly. See
              new feature B725-007 for further details.

  Workaround: Do not attempt to specify the alignment, or ensure that the
              bounds are not known at compile time.

KP-315a1-B726-008 Internal error 999 with slices and packed records

  Problem:    If an array of fixed size is embedded in a packed record
              and a slice is taken of the record on machines that enforce
              strict alignment, the compiler can fail with an internal Gigi
              abort 999.

  Status:     This problem is fixed in 3.16.

  Workaround: Either do not pack the record or recode the slice reference
              as an explicit loop.

KP-315a1-B726-004 Invisible operation causes spurious ambiguity.

  Problem:    An operator whose operands are literals is rejected as ambiguous
              if there is a non-visible operator of the same result type in
              the context.

  Status:     This problem was fixed in 3.16 on 2002-08-05

  Workaround: Qualify the literal expression with the expected type.

KP-315a1-B725-015 False violations of No_Implicit_Heap_Allocations

  Problem:    In some cases, declaring a variable with a nominally
              unconstrained subtype (e.g. String) could register as
              a violation of this restriction, even when in fact the
              generated code had no heap allocation.

  Status:     This is fixed in 3.16.

  Workaround: Provide explicit static bounds in the declaration of the object.

KP-315a1-B725-001 Incorrect handling of call with unconstrained arrays in GDB.

  Problem:    A 'call' or 'print' command in GDB may fail if it involves a
              call to a subprogram that takes an unconstrained array.

  Status:     This is fixed in 3.16.

  Workaround: Change the subprogram to take a pointer to an unconstrained
              array instead of the array itself.

KP-315a1-B724-013 Spurious error on xor with packed boolean arrays

  Problem:    The compiler rejects an xor operation where the right operand
              is a slice of a packed boolean array.

  Status:     This was fixed in 3.16 on 2002-07-24

  Workaround: Qualify the slice with the packed array type.

KP-315a1-B724-012 Renamed enumeration literals are not treated as static

  Problem:    If an enumeration literal is renamed as a function, a call to
              this function is not treated as static.

  Status:     This was fixed in 3.16 on 2002-07-24

  Workaround: Define a constant of the enumeration type instead

KP-315a1-B724-004 Incorrect determination of ASIS compilation unit kind

  Problem:    ASIS incorrectly classifies compilation units that are function
              declarations as procedure declarations

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: If ASIS compilation unit is of A_Procedure kind, apply
              Unit_Declaration query and check the Declaration_Kind of the
              top unit Element

KP-315a1-B722-002 Handling of posix classes in GNAT.Regpat

  Problem:    Regular expressions that contain expressions like [:alnum:]
              and similar classes are incorrectly parsed

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Replace these classes by their equivalent. For instance,
              replace [:alnum:] with [a-zA-Z0-9]

KP-315a1-B718-010 PM does not detect overloading with multiple extensions

  Problem:    With multiple extension projects (project A extends project B
              which itself extends project C), the Project Manager
              was not detecting valid source overloading.

  Status:     This problem was fixed in 3.16 on 2002-07-18

  Workaround: Always overload a source from the project immediately
              extended, making unchanged copies if necessary.

KP-315a1-B718-014 Problem with long file names on VMS

  Problem:    Programs manipulating very long file names on VMS may crash
              with a buffer overflow.

  Status:     This problem was fixed in 3.16 on 2002-10-14.

  Workaround: Do not use filenames longer than 255 characters on VMS.

KP-315a1-B718-002 Compiler loops on illegal unit in context

  Problem:    Compiler loops when a unit in the context of the current
              compilation unit has serious syntax errors.

  Status:     This is fixed in 3.16.

  Workaround: Compile with -gnatdO switch to display error messages
              as they occur, in order to diagnose the faulty unit.

KP-315a1-B717-009 Spurious error on discriminated protected component

  Problem:    Compiler rejects a component of a type extension that is
              a discriminated protected type, when the discriminant has a
              default value.

  Status:     This was fixed in 3.16 on 2002-07-17

  Workaround: Remove the default value for the discriminant

KP-315a1-B717-004 Compiler crash on derivation of private discriminated type

  Problem:    Compiler crashes on a derivation from a discriminated private
              untagged type, if its full view is tagged.

  Status:     This is fixed in 3.16.

  Workaround: Make the partial view tagged, or replace derivation with
              a subtype declaration.

KP-315a1-B716-007 Problem with Florist routine Posix.To_Posix_String

  Problem:    The Florist utility Posix.To_Posix_String does not correctly
              convert strings with a range that does not begin with 1.

  Status:     This was fixed in 3.16 on 2002-07-16.

  Workaround: Only use Posix.To_Posix_String to convert strings with a
              range beginning with 1.

KP-315a1-B713-002 Using an extending project file without mapping file

  Problem:    There are cases when using an extended project file,
              without a mapping file, when the wrong sources may be
              selected. To avoid this, switch -C (use mapping file)
              will be implied in the presence of any extended project file.

  Status:     This problem was fixed in 3.16 on 2002-07-15

  Workaround: Use switch -C when using extended project files

KP-315a1-B712-014 Cascaded error messages from bad accept statement

  Problem:    If an accept statement does not have a syntactically
              correct identifier following the accept keyword, then
              poor error recovery can result in cascaded error
              messages.

  Status:     This is fixed in 3.16.

  Workaround: Correct the syntactically incorrect accept statement and
              ignore the cascaded error messages, which will disappear
              when the accept statement is corrected.

KP-315a1-B712-012 Incorrect documentation of -gnatn switch

  Problem:    The documentation implies that inlining of pragma Inline
              routines within a unit is done even if -gnatn is not
              specified, but this is incorrect. If neither of the
              options -gnatn or -gnatN is specified, then pragma
              Inline has no effect.

  Status:     This is fixed in 3.16.

  Workaround: This is a documentation error only. If you want inlining to
              occur, then you must use -gnatn even if the inlining is within
              a single unit.

KP-315a1-B712-005 Asis problem with Numeric_Error

  Problem:    ASIS does not represent the obsolete renaming of Constraint_Error
              as Numeric_Error. For the references to Numeric_Error
              Corresponding_Name_Definition returns the defining occurrence
              of Constraint_Error.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Take this behavior into account when writing ASIS tools.

KP-315a1-B709-008 Project Manager crashes if name of project cannot be found

  Problem:    For syntactically incorrect project files, when the Project
              Manager cannot find the name of the project, it may fail
              with an assertion error or similar problem.

  Status:     This is fixed in 3.16.

  Workaround: Avoid this syntactic error when preparing project files.

KP-315a1-B709-004 Discriminant check failures with rep clause on x86

  Problem:    Representation clauses for discriminants of record types
              sometimes lead to code generation errors for discriminant
              checks on x86. These in turn lead to spurious discriminant
              check failures and thus to unexpected exceptions.

  Status:     This is fixed in 3.16.

  Workaround: Remove the offending representation clauses or arrange for
              the faulty discriminant checks not to occur, e.g. by using
              -gnatp or by adding the appropriate Suppress pragma around
              the triggering code.

KP-315a1-B703-007 Misleading warning from unchecked conversion with -gnatf

  Problem:    If -gnatf is used and an unchecked conversion has an unsigned
              enumeration type as the source and a larger type as the
              destination, then the warning message incorrectly claims
              that sign extension will occur instead of zero extension.

  Status:     This is fixed in 3.16.

  Workaround: Ignore the warning. The error is only in the wording of the
              warning message, the actual unchecked conversion is performed
              as expected with zero extension.

KP-315a1-B701-017 Source dirs not registered in project files

  Problem:    When a source directory in a project file is explicitly
              specified as a single directory, and is also part of
              a directory tree (dir/**) later in the list of source
              directories, the subtree under this directory is not
              included in the list of source directories.

  Status:     This is fixed in 3.16.

  Workaround: Specify all individual source directories after
              the directory trees specified with the /** notation.

KP-315a1-B701-009 Invisible variables in GDB

  Problem:    When variables in an expression match one or more global
              variables and also a non-local, non-global symbol (i.e.,
              a symbol from an enclosing subprogram), the latter symbol,
              which should have precedence, is ignored.

  Status:     This is fixed in 3.16.

  Workaround: Find the symbol by using 'up' commands to get to the
              frame where the desired symbol is local.

KP-315a1-B701-003 Extra recompilation when using gnatmake -u -f -a

  Problem:    Using gnatmake -f -a -u will always recompile the GNAT run time
              file s-stalib.adb.

  Status:     This is fixed in 3.16.

  Workaround: Do not use the -a switch if this extra recompilation is
              a problem (often it will not matter).

KP-315a1-B628-006 Compiler crashes on generic unit compiled with inlining

  Problem:    Compiler crashes when compiling a generic unit with the -gnatn
              switch enabled.

  Status:     This was fixed in 3.16 on 2006-07-01

  Workaround: Do not compile a generic unit with inlining, which serves
              no purpose in this case.

KP-315a1-B627-008 Failure to suppress null checks for access parameters

  Problem:    Suppressing access checks does not suppress the check for
              null access parameters. It is clear in the RM that this is
              an access check, and should thus be suppressed. Furthermore
              in 3.15a1, suppressing accessibility checks on the specific
              formal entity does suppress these null checks, it should not
              do so.

  Status:     This is fixed in 3.16.

  Workaround: For now, suppress Accessibility_Checks naming the formal entity
              in question. This should not work, but as noted above, does in
              fact suppress these checks in 3.15a1.

KP-315a1-B627-007 Illegal pragma Suppress/Unsuppress not diagnosed

  Problem:    RM 11.5(7) requires that a pragma Suppress in a package
              spec that names an entity must refer to an entity in the
              package. This was not enforced (it should also be enforced
              by analogy for pragma Unsuppress).

  Status:     This is fixed in 3.16.

  Workaround: Ensure that any pragma Suppress or Unsuppress in a package
              spec obeys the RM restriction.

KP-315a1-B627-004 GNAT LINK should put the executable in the exec dir

  Problem:    When using GNAT LINK with a project file to create
              an executable, it is placed in the object directory, not
              the exec directory.

  Status:     This is fixed in 3.16.

  Workaround: Use gnat make -l instead of gnat link.

KP-315a1-B624-017 Packed record components not updated through procedure call

  Problem:    If PR is a packed record with a component C, passing PR.C as
              an out or in-out parameter in a procedure call sometimes leaves
              the component unchanged.

  Status:     This is fixed in 3.16.

  Workaround: Leave the record unpacked or copy the component in and out
              of the subprogram explicitly.

KP-315a1-B620-011 GNAT command on VMS does not return proper status value.

  Problem:    The GNAT command on VMS does not always return a failure status
              when a subcommand fails. Depending on the failure mode it
              will usually return a code which on VMS would be considered
              a success (for example an odd number) by DCL.

  Status:     This is fixed in 3.16.

  Workaround: Explicitly test $status builtin variable.

KP-315a1-B620-009 Local Unsuppress not properly undone on exit

  Problem:    A local Unsuppress pragma may not properly be undone at
              the end of the local scope, leaving checks unsuppressed
              even if they were suppressed in the outer scope.

  Status:     This is fixed in 3.16.

  Workaround: Provide an additional explicit suppress pragma in the
              outer scope (introducing an additional block).

KP-315a1-B620-008 Crash on local All_Checks Suppress when entity specified

  Problem:    A local Suppress or Unsuppress pragma will fail causing a
              compiler crash if All_Checks is specified with an entity
              name present.

  Status:     This is fixed in 3.16.

  Workaround: Provide separate pragmas listing the explicit checks that
              are to be suppressed or unsuppressed.

KP-315a1-B619-012 Spurious error on allocator for private controlled type

  Problem:    Compiler generates a spurious error on an allocator in a
              generic instantiation when an actual is a private type derived
              from another private type whose full view is a controlled type.

  Status:     This is fixed in 3.16.

  Workaround: Make the type derivation public.

KP-315a1-B618-013 Binder and linker switches with gnatmake and several mains

  Problem:    When invoking gnatmake with a project file and several mains,
              the default switches from packages Binder and Linker are used,
              instead of the specific switches for each main, if they exist.

  Status:     This is fixed in 3.16.

  Workaround: Invoke gnatmake with only one main.

KP-315a1-B618-007 Compiler rejects homonyms with Import_Procedure on VMS.

  Problem:    Compiler rejects a pragma Import_Procedure if there is a
              visible function with the same name and parameter profile as
              the procedure.

  Status:     This was fixed in 3.16 on 2002-06-20

  Workaround: Use different names for function and procedure.

KP-315a1-B618-004 Wildcards don't work with GNAT LIST on VMS.

  Problem:    GNAT LIST /OUTPUT=(SOURCES,DEPEND) *.ALI returns
              Can't find library info for "*.ali"

  Status:     This is fixed in 3.16.

  Workaround: Invoke GNAT LIST individually for every .ALI file, e.g.
              using a DCL command script.

KP-315a1-B617-014 Linker does not properly handle "-Xlinker xyz" option

  Problem:    The linker does not properly handle the -Xlinker option. This
              breaks other settings done by GNAT. For example, the default
              stack size for tasking programs on Windows is not set properly.

  Status:     This is fixed in 3.16.

  Workaround: Use the -Wl,xyz option instead.

KP-315a1-B615-002 ASIS Corresponding_Representation_Pragmas problem

  Problem:    Corresponding_Representation_Pragmas may return an incomplete
              list of representation pragmas (all but the first attribute
              definition clauses may be lost). It can also include in the
              result list the fake attribute definition clause created for
              an 'at mod' expression from a record representation clause.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Use manual traversing of the declaration sequence to get
              the list of representation clauses applied to a given
              declaration

KP-315a1-B614-015  GNAT computes a <= b incorrectly in partially static case

  Problem:    GNAT may compute a <= b incorrectly if a is a static constant
              and the lower bound of the type of b is also constant.

  Status:     This problem was fixed in GNAT 3.16 on 2002-06-16

  Workaround: Write b >= a instead.

KP-315a1-B614-004 Compiler rejects child instance in context clause

  Problem:    Compiler rejects a unit whose context clause includes both
              a child unit that is an instance, and another unit that with's
              this child instance.

  Status:     This problem was fixed in GNAT 3.16 on 2002-07-10

  Workaround: Remove one of the with_clauses, or wrap subprogram instance
              in a package.

KP-315a1-B613-018 Configuration pragmas file incompletely copied on VMS

  Problem:    On VMS, when a temporary config pragmas file is created
              and one config pragmas file is copied, not all the lines
              may be copied.

  Status:     This is fixed in 3.16.

  Workaround: Put all configuration pragmas on the first line.

KP-315a1-B612-006 Problem printing NaN values

  Problem:    When printing a NaN value or using the 'Image or 'Img attribute,
            , wrong output is generated or a Constraint_Error is raised.

  Status:     This is fixed in 3.16.

  Workaround: Prevent processing of NaN values by testing for X /= X (true
              for Nans) or using the 'Valid attribute.

KP-315a1-B613-011 Visibility problems with extension of System.

  Problem:    The predefined concatenation operators declared in the extension
              of System for OpenVMS are not visible in a renaming declaration.

  Status:     This is fixed in 3.16.

  Workaround: Introduce an explicit declaration for the concatenation
              operator where needed.

KP-315a1-B610-020 Compiler crashes on attribute 'Img applied to entry index

  Problem:    Compiler aborts when the index of an entry family is prefix
              to an 'Img attribute reference, and the index is declared with
              a range attribute.

  Status:     This is fixed in 3.16.

  Workaround: Introduce an explicit discrete type for the index, and use
              it in the entry formal part.

KP-315a1-B610-012 Debugger can crash after catching an abort.

  Problem:    On Solaris, GDB can crash, or at least fail, when the
              user catches an 'abort' by means of 'break exception' and
              then attempts to continue. The error is non-deterministic,
              due to a race condition in the runtime.

  Status:     This is fixed in 3.16

  Workaround: Avoid plain 'break exception' when task aborting is a
              possibility.

KP-315a1-B609-001 Compiler crashes on use of entry index in declaration

  Problem:    Compiler aborts when the index of an entry family is used as
              the initial value of a local variable in an entry body.

  Status:     This is fixed in 3.16.

  Workaround: Use an assignment statement to initialize the variable.

KP-315a1-B607-020 Compiler generates spurious warning on conversion

  Problem:    Compiler generates a spurious warning that a conversion of a
              boolean value is redundant, when the conversion  appears within
              a larger condition whose type is derived from boolean.

  Status:     This is fixed in 3.16.

  Workaround: Ignore warning.

KP-315a1-B607-019 Compiler crash on repeated nested instantiations

  Problem:    Compiler crashes on a unit that contains multiple instantiations
              of a package that itself contains two nested instantiations of
              Generic_Elementary_Functions with the same actual.

  Status:     This was fixed in 3.16 on 2002-07-17.

  Workaround: Make a single instantiation visible to both sites.

KP-315a1-B607-017 Stream_IO on VMS truncation

  Problem:    When trying to read or write using Stream_IO on VMS,
              the buffer size must be a multiple of the file size or
              truncation will occur.

  Status:     This problem was fixed in 3.16 on 2002-06-07.

  Workaround: Use appropriate buffer size.

KP-315a1-B606-007 Compiler generates spurious unused warnings on packages

  Problem:    Compiler generates a spurious warning that no entities from a
              withed package are referenced, when there is a renaming of a
              predefined operator declared in the package.

  Status:     This problem is fixed in 3.16.

  Workaround: Ignore warning, or suppress warnings on the package.

KP-315a1-B605-010 Compiler crashes on an illegal Elaborate_All pragma

  Problem:    Compiler aborts if an Elaborate_All pragma has no argument.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Do not write such an illegal pragma.

KP-315a1-B604-001 Compiler crashes on illegal Elaborate_All pragma.

  Problem:    Compiler aborts if an Elaborate_All pragma mentions a unit
              that does not appear in a previous with-clause.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Do not write such an illegal pragma.

KP-315a1-B531-009 Detach on GDB causes inferior to crash on Tru64.

  Problem:    When GDB is attached to a process on Tru64, and the last action
              before detaching the process is stopping at a breakpoint, the
              newly detached inferior immediately gets a SIGTRAP.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: If feasible, instead of detaching, remove all breakpoints and
              other stops, set all signals to be passed through without
              stopping or printing, and then simply continue.

KP-315a1-B530-008 Missed range check on real conversion

  Problem:    If the argument to a numeric conversion is an unconstrained
              floating-point type (e.g. Float or some other predefined
              type in Standard), then range checks are missed in some
              cases, and Constraint_Error is not raised when it should be.

  Status:     This problem is fixed in GNAT 3.16

  Workaround: Avoid conversion of out of range values, or if the check is
              absolutely required, then use an explicit range check before
              the conversion.

KP-315a1-B530-008 Compiler crashes on indirect call with gnatVi

  Problem:    The compiler aborts on a call through an access-to-subprogram,
              when validity checks on in-parameters are enabled.

  Status:     This problem is fixed in GNAT 3.16

  Workaround: Compile the unit with those validity checks disabled.

KP-315a1-B529-011 Problem with No_Implementation_Attributes Restrictions

  Problem:    The use of the No_Implementation_Attributes pragma can result
              in error messages if exceptions are declared.

  Status:     This problem is fixed in GNAT 3.16

  Workaround: Do not use this Restrictions pragma in units that declare
              exceptions.

KP-315a1-B528-004 Compiler crashes on assignment to packed array with -gnatVo

  Problem:    The compiler aborts on an assignment to a packed array component,
              when validity checks on operators are enabled.

  Status:     This problem is fixed in GNAT 3.16

  Workaround: Compile the unit with those validity checks disabled.

KP-315a1-B524-005 Spurious error message on packed array assignment

  Problem:    The compiler rejects an assignment statement to a packed
              slice whose prefix is a packed array component.

  Status:     This problem was fixed in GNAT 3.16 on 2000-05-25.

  Workaround: Introduce a temporary for the prefix, and write two
              independent assignments.

KP-315a1-B520-007 Bad size of some variant records with two with'ed types

  Problem:    If a variant record has a default value for the discriminant
              and has a variant whose first and second fields both are
              of a type with'ed from another package and whose size is variable
              (but not a function of the discriminant) and an object is
              made of the unconstrained type, the size of the object will
              only count the size of the first field. This wrong size
              will be used for 'Size, allocation, and block moves.

  Status:     This problem was fixed in 3.16 on 2002-10-09.

  Workaround: Do not create mutable objects of the above type. Either use
              constrained types, or use access types in this case.

KP-315a1-B516-006 Failure to diagnose bad alignment for scalar type

  Problem:    Scalar types cannot be given less than their natural
              alignment (e.g. a four byte integer with a natural
              alignment of 4 cannot have an alignment of 2 or 1
              specified), but an attempt to specify such a value
              for the alignment was silently accepted and ignored.

  Status:     This problem was fixed in 3.16 on 2002-05-23

  Workaround: Remove the faulty alignment clause.

KP-315a1-B516-001 Bad handling of small path in Base_Name

  Problem:    Calling GNAT.Directory_Operations.Base_Name with
              Path'Length smaller than Suffix'Length may result in accessing
              invalid addresses in memory.

  Status:     This problem is fixed in GNAT 3.16

  Workaround: Test the length of Path before calling Base_Name

KP-315a1-B515-012 Spurious problems with Use_Type clauses

  Problem:    If a use_type clause appears before a package that contains
              visible operators for the type, and a later use clause applies
              to the package in the same declarative part, there may be
              spurious visibility errors that can result in compiler aborts.

  Status:     This problem is fixed in GNAT 3.16

  Workaround: Move the use_type clause after the package in question, or
              use a use_package clause instead.

KP-315a1-B515-011 Error message about labels and binding contours

  Problem:    If certain constructs are used in a block containing a label
              to which there is a goto before its definition, the error
              message "label `name' used before containing binding contour"
              may be generated.

  Status:     This problem was fixed in 3.16 on 2002-12-24.

  Workaround: This message prevents the assembler being called, but in fact
              the code generated is correct. Use -S to generate the assembler
              file (ignoring the message), then use gcc to assemble the
              resulting (.s) assembler file.

KP-315a1-B514-013 Missing cross-reference for body stub

  Problem:    A body stub does not generate a cross-reference entry in
              gnatxref output.

  Status:     This problem was fixed in GNAT 3.16 on 2002-05-16

  Workaround: Use grep or some other search utility if it is important
              to locate all references including body stub references.

KP-315a1-B507-013 Initialize_Scalars suppresses warnings

  Problem:    In some cases, the use of the pragma Initialize_Scalars
              can cause suppression of warnings about unassigned and
              unreferenced variables.

  Status:     This problem is fixed in GNAT 3.16

  Workaround: This only affects warnings, so no work around is required.

KP-315a1-B507-002 Read directory does not read all entries on Windows

  Problem:    When the directory holds more than 32767 entries, procedure
              Read only returns the first 32767.

  Status:     This problem is fixed in GNAT 3.16

  Workaround: Arrange files into directories so that this limit is not
              exceeded.

KP-315a1-B506-012 No entities warning missing if -gnatc not specified

  Problem:    In some cases, the warning about no entities of a with'ed
              package being referenced was suppressed if -gnatc was not
              specified.

  Status:     This problem is fixed in GNAT 3.16

  Workaround: This only affects warnings, so no work around is required.

KP-315a1-B506-011 Missing warnings in -gnatc mode

  Problem:    Some warnings for uninitialized variables were improperly
              suppressed in -gnatc (semantics only) mode.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Generate code to get a full list of warnings.

KP-315a1-B506-008 Wrong handling of empty string in Argument_String_To_List

  Problem:    The function GNAT.OS_Lib.Argument_String_To_List returns
              an array of one string containing garbage when the parameter
              is an empty String.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Test the value of the string before calling
              Argument_String_To_List.

KP-315a1-B505-001 Bad warnings if missing semicolon

  Problem:    A missing semicolon message (or a message about a violation
              of a restriction) can cause bad warnings about unassigned
              variables if the variable in question is initialized by a
              call to a function with a default parameter.

  Status:     This is fixed in 3.16.

  Workaround: Ignore the warnings, which will disappear when the real
              errors are corrected.

KP-315a1-B502-005 Incorrect unreferenced parameter warning with requeue

  Problem:    A requeue statement effectively accesses the parameters that
              are passed to the new entry, but this access was not noted by
              the compiler, and an inappropriate warning can be generated
              complaining that a parameter is unreferenced.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Ignore the warning, or use pragma Warnings (Off) to suppress
              the incorrect warning message.

KP-315a1-B429-013 Wrong variable printed by GDB

  Problem:    When two quantities, both having enumeration types, are present
              in the same nest of scopes in an object file, GDB gets confused
              and will sometimes fail to print a local variable in favor of
              an outer enumeration literal.

  Status:     This problem is fixed in GNAT 3.16

  Workaround: info locals will print all local variables' values.

KP-315a1-B429-007 Wrong variant record field value printed by GDB

  Problem:    Inspecting the value of a variant record sometimes yields the
              wrong value for fields placed after a field whose size is
              variable.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Write a small debug routine that prints the value of such
              records, and invoke it from GDB using "call" or "print".

KP-315a1-B426-004 Compiler loop on an import declaration

  Problem:    Compiler goes into an infinite loop if the entity in a
              pragma Import is a homonym of an entity in Standard.

  Status:     This problem is solved in GNAT 3.16.

  Workaround: Choose different name for imported entity.

KP-315a1-B425-007 Gigi 999 abort on MIPS with FP compare and large subprogram

  Problem:    On MIPS targets, if a subprogram uses a large stack frame and
              has a floating-point comparison that is moved out of a loop,
              the compiler may produce an internal error with a Gigi 999
              abort code.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Avoid the above conditions or compile without optimization.

KP-315a1-B419-020 Spurious error when compiling with -fstack-check

  Problem:    Compiler reports a spurious error on a call that returns
              an unconstrained discriminated type with compile-time known
              size, when unit is compiled with stack-checking and dynamic
              elaboration checks.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Compile the unit without stack checking.

KP-315a1-B419-015 Compiler crash on allocator for discriminated task

  Problem:    Compiler crashes on an allocator for a discriminated task
              if the default for the discriminant is a function call.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Capture the function call in a constant and use the constant
              as the default.

KP-315a1-B418-004 Compiler crash on aggregate in nested instance

  Problem:    Compiler crashes on an aggregate that is the expression
              in a constant declaration appearing within a multiply nested
              instantiation.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Remove constant keyword from declaration.

KP-315a1-B418-002 Wrong reports from debug pools on constrained arrays

  Problem:    Debug_Pool reports spurious allocation errors on arrays
              denoted by fat pointers, that is to say pointers to
              constrained subtypes of an unconstrained array type.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Do not use debug_pools on programs with such arrays.

KP-315a1-B416-005 Gigi abort 999 with 0-length fields

  Problem:    On targets where a divide-by-0 causes a trap, a reference to
              a field of zero size in a packed record may cause the compiler
              to abort with a Gigi abort 999.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Eliminate the zero-size field.

KP-315a1-B416-004 Spurious error on concatenation with aggregate in instance

  Problem:    Compiler generates a spurious type error on an overloaded
              concatenation operator applied to an aggregate and an object
              of the element type, appearing in an instantiation.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Introduce a separate variable for the aggregate.

KP-315a1-B415-008 Wrong of order of elaboration with some controlled types

  Problem:    The compiler might not obtain the proper elaboration order if
              a controlled type T declared in package P has an explicit
              Initialize procedure, an other type T2 declared in P2 has a
              component of type T, and an object of type T2 is created in
              package P3.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Add an Elaborate_All pragma for P1 in the declaration of P2.

KP-315a1-B415-002 Exception not raised when Remove_Dir fails

  Problem:    When a directory can not be removed with Remove_Dir, the call
              silently fails instead of raising an exception, as stated in
              the specification.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: After Remove_Dir, verify with Is_Directory if the directory
              still exist, and thus, if it has been properly removed.

KP-315a1-B410-001 Lines displayed by GDB off by one for expanded output

  Problem:    When debugging expanded output (compiled with -gnatDG), what
              GDB displays as the next line to execute is actually the one
              following the next to execute.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Add a blank line at the beginning of the expanded sources of
              interest after their compilation.

KP-315a1-B408-001 Alignment problems with unaligned arrays

  Problem:    If an array component in a record is misaligned by use of
              pragma Pack or a record representation clause, then when
              a slice of this array is passed as a parameter, it must
              be copied to preserve the correct alignment for the called
              subprogram. This is not always done, and on machines where
              strict alignment is required (e.g. Sparc), a bus error can
              result.

  Status:     This problem is fixed in GNAT 3.16

  Workaround: Avoid misaligned arrays, or copy the array explicitly

KP-315a1-B405-012 Apostrophe now accepted after "project" in project files

  Problem:    The apostrophe between the reserved word "project" and
              the name of a project level attribute was rejected by
              the parser, although it is the legal way to refer to
              an attribute of the current project file.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Use variables instead of project level attributes in
              expressions.

KP-315a1-B405-020 Spurious visibility error with expanded name in instance

  Problem:    The compiler emits a spurious error message in an instance, on
              an expanded name of the form Par.Gen.Loc, where Gen is the
              enclosing generic unit, and there is a local entity with the
              same name that hides the unit.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Rename the local variable so it does not hide the enclosing
              generic unit.

KP-315a1-B404-013 Compiler crash on illegal initialization

  Problem:    Compiler aborts on an object declaration with initialization
              if the object appears subsequently in a pragma Import_Object.

  Status      This was fixed in 3.16 on 2002-04-09.

  Workaround: Remove illegal initialization.

KP-315a1-B404-004 Exception message corruption if lower bound is not 1.

  Problem:    The exception message stored within exception occurrences
              raised via Ada.Exceptions.Raise_Exception is corrupted when
              the lower bound of the Message string argument is not 1.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Adjust the Message argument so that the lower bound is 1
              (for example by declaring a local string type and converting
              the argument to this type).

KP-315a1-B401-002  Compiler crashes on illegal attribute in index constraint

  Problem:    Compiler crashes on an index constraint given by a attribute
              which is not 'Range.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Do not write such an index constraint. Use the 'Range attribute
              declaring an appropriate subtype if necessary.

KP-315a1-9929-006 Compiler crashes on illegal instantiation with related types

  Problem:    Compiler crashes on in instantiation where the return type
              of the actual subprogram is derived from that of the formal.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Do not write such an illegal instantiation.

KP-315a1-9929-004 Compiler crashes on allocator with controlled aggregate

  Problem:    Compiler crashes if an allocator with a aggregate for a
              complex controlled type is used as an actual in a call.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Introduce an explicit variable for the allocator and use the
              variable in the call.

KP-315a1-9927-013 Incorrect rejection of expression that overflows

  Problem:    If the compiler determines at compile time that evaluation
              of an non-static expression will cause overflow, then in some
              cases the expression is considered illegal, rather than
              generating a warning.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Avoid the overflow (it will generate an exception in any
              case, so is almost certainly an error).

KP-315a1-9927-011 Compiler crash on selected component in protected object

  Problem:    Compiler crashes on an assignment to a component in the variant
              part of a record which is a private component of a discriminated
              protected type, when the protected type is the full view
              of a limited private type.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Make the protected type non-private.

KP-315a1-9927-003 Compiler crash when compiling with -gnatc -gnatt

  Problem:    Compiler crashes when compiling in semantics-only/generate-tree
              mode and the unit contains a renaming_as_body,

  Status:     This problem is fixed in GNAT 3.16

  Workaround: Dp not compile such a unit in this mode, instead, compile
              such a unit in full.

KP-315a1-9927-002 Compiler abort with -gnatt

  Problem:    Compiler aborts in build-tree mode, on a renaming_as_body that
              appears after the renaming entity is already frozen.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Move the renaming earlier, or else do not compile this unit
              with -gnatt.

KP-315a1-9926-005 Compiler does not flag all violations of HI-E restrictions

  Problem:     When compiling a unit with No_Run_Time, the compiler does not
               flag all possible violations of the pragma, when non-static
               concatenations or packed array operations are involved.

  Status:      This problem is fixed in GNAT 3.16.

  Workaround:  Remove violations one at a time.

KP-315a1-9926-004 Expect Non_Blocking_Spawn problem with spaces in arguments

  Problem:    Expect Non_Blocking_Spawn does not properly handle arguments
              containing spaces. An argument with a space will be handled as
              two separate arguments.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Add quotes around arguments with spaces.

KP-315a1-9925-028 Incorrect rejection of legal expression

  Problem:    If the compiler determines at compile time that evaluation of
              an expression will cause division by zero, then the expression
              is considered illegal even if it is not static.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Avoid the division by zero (it will generate an exception in
              any case, so is almost certainly an error).

KP-315a1-9925-025 Pragma Page causes compiler error for case statement

  Problem:    If pragma Page appears in place of a case statement alternative
              and the case expression is known at compile time, a compiler
              error may be generated.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Remove the pragma Page, or ensure that the case expression
              value cannot be determined at compile time.

KP-315a1-9925-013 Debug_Pools fails to diagnose improper dereference of array

  Problem:    When using the Debug_Pools package, the run-time fails to
              diagnose an improper indexing of an access to array that was not
              properly allocated.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Write an explicit dereference for the indexing operation..

KP-315a1-9921-002 Spurious initialization of imported entities

   Problem:   If an entity of an access type has a pragma import and an
              address clause, default initialization is not suppressed
              for the imported entity.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Use a renaming instead of an address clause.

  Problem:
KP-315a1-9919-010 GNAT project inheritance does not work properly

  Problem:    Variables in the extended project are not accessible
              from the extending project.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Avoid the use of extended projects if variables must be
              accessed from the extending project.

KP-315a1-9918-014 Compiler loops on use of task discriminant as array index

  Problem:    The front-end goes into an infinite loop when a task discriminant
              is used within a local subprogram as the index to a global array.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Compile the task body without constraint checks, or use the
              same constrained subtype for the discriminant and the array.

KP-315a1-9915-008 Compiler loops on an instance of a formal package

  Problem:    Compiler goes into an infinite loop on the instance of a formal
              package that contains local arrays constrained with ranges

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Use a type mark for the index.

KP-315a1-9911-008 Incorrect warning for Inline_Always

  Problem:    In some cases, the compiler generates a warning message
              rather than an error message if a call to a subprogram
              to which a pragma Inline_Always applies cannot be inlined.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Generate the warning using -gnatwi, and treat the warning
              as an error.

KP-315a1-9911-007 Crash from Inline_Always with nested subprogram

  Problem:    Subprograms containing nested subprograms cannot be
              inlined. If pragma Inline_Always is applied to such
              a subprogram, the result is a compiler crash rather
              than an error message.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Do not use pragma Inline_Always for subprograms that
              contain nested subprograms (calls to such subprograms
              cannot be inlined in any case).

KP-315a1-9908-024 Wrong output of gnatfind -t

  Problem:    In some circumstances, gnatfind with switch -t will
              give reference to types unrelated to the query.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Avoid the use of -t, or simply ignore the unrelated
              references.

KP-315a1-9908-020 Spurious errors on private type from instantiation

  Problem:    Compiler complains about missing operations when the
              default for a formal subprogram has a parameter whose type
              is derived from a private type, whose full view is an array
              whose component type is a generic formal.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Make the array type in the generic package non-private.

KP-315a1-9908-017 Spurious errors with inlining and instances of child unit.

  Problem:    Compiler detects spurious ambiguities on a call to an overloaded
              operation from an instantiation of a generic child unit GC that
              is declared as a child unit of the non-generic ancestor of GC,
              when the unit containing the call is compiled with -gnatN.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Compile unit without inlining, or qualify the calls.

KP-315a1-9908-009 Excessive stack growth with backtraces on HP-UX 11.00

  Problem:    The computation of backtraces on HP-UX 11.00 uses the HP
              system unwinding library. This library performs, for internal
              purposes, memory probes that might be interpreted as accesses
              to yet unallocated stack by the kernel in some cases. In these
              cases, the stack is expanded on demand so that the accesses can
              be statisfied, which potentially leads to useless excessive
              stack growth.

  Status:     This is not fixed (it is a problem in HP code).

  Workaround: Bound the stack size, using the shell "ulimit" facility or
              arranging for a call to setrlimit to happen at the very
              beginning of the program. The latter can be achieved by way
              of a main program in C.

KP-315a1-9907-018 Use of -d switch in gnatxref can cause a failure

  Problem:    If the -d switch is used in gnatxref, then in some cases
              gnatxref may crash.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Avoid the use of -d if this causes a crash.

KP-315a1-9906-011 Compiler abort with intrinsic "+" on a private type

  Problem:    Compiler aborts on use of an intrinsic "+" defined on
              on a type derived from a private type, whose full view
              has explicit bounds.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Write the operator as a regular function and inline it
              or make the type involved non-private.

KP-315a1-9906-009 Compiler abort with intrinsic "abs"

  Problem:    Compiler aborts on use of a user-defined "abs" operator.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Write the operator as a regular function and inline it.

KP-315a1-9906-006 Compiler abort with intrinsic "rem" on a private type

  Problem:    Compiler aborts when a user-defined "rem" operator is defined
              on a private type.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Write the operator as a regular function and inline it,
              or make the type involved non-private

KP-315a1-9905-003 gnatfind's handling of directory names with spaces

  Problem:    gnatfind and gnatxref do not properly handle directory
              names that contain spaces.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Avoid the use of spaces in directory names.

KP-315a1-9901-005 gnatmake -s with project files

  Problem:    If switch -s was used with gnatmake and a project files,
              some of the switches inside the project files and on the
              command line were not taken into account resulting in the
              unnecessary recompilation.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Put all the compiler switches in package Builder of the
              main project file.

KP-315a1-9825-002 Potential buffer overflow when creating temporary files

  Problem:    Under Linux only, when creating temporary files with
              Ada.Text_IO, there is a possible buffer overflow if the
              environment variable TMPDIR is longer than 1000 characters.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Use mkstemp() directly, or check the contents of TMPDIR
              before creating a temporary file.

KP-315a1-9825-001 Compiler crashes on ambiguous dereference in assignment

  Problem:    Compiler aborts when the left-hand side of an assignment is
              an ambiguous explicit dereference.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Do not use this illegal construct.

KP-315a1-9824-002 Incorrect alignment values for object of class-wide type

  Problem:    If the 'Alignment attribute is applied to an object of a
              class-wide type, then the alignment of the class-wide type
              itself is returned instead of the alignment of the underlying
              object.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: If this functionality is required, then either define a
              primitive function to return the alignment, or include a
              component in the record that is set to the required alignment.

KP-315a1-9823-007 Incorrect handling of X'Class'Size

  Problem:    In some cases, a reference to X'Class'Size may generate a
              spurious error complaining that a subtype mark is misused.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: X'Class'Size has the same value as X'Size, so simply replace
              the reference with X'Size.

KP-315a1-9823-007 Incorrect handling of X'Class'Alignment

  Problem:    In some cases, a reference to X'Class'Alignment may generate
              an "unimplemented attribute" message.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: X'Class'Alignment has the same value as X'Alignment, so simply
              replace the reference with X'Alignment.

KP-315a1-9821-007 GLADE incorrect behavior with specific GNAT installation

  Problem:    If GNAT is built with prefix A (for instance, "/usr/gnat")
              and installed in directory B (for instance, "/usr/gnat-3.15a")
              with string A included in string B, GNATDIST behaves
              incorrectly with flag -a.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Remove version A or install A and B in the same directory or
              choose strings A and B such that A is not included in B.

KP-315a1-9821-003 GNAT.Expect.Non_Blocking_Spawn does not handle exec failure

  Problem:    When GNAT.Expect.Non_Blocking_Spawn is used to spawn an
              invalid command, the failure is not properly detected,
              leading to random behavior.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Make sure, using e.g GNAT.OS_Lib.Locate_Exec_On_Path, that
              the command exists before launching it.

KP-315a1-9819-012 Incoherency in size affecting GNAT.Debug_Pools

 Problem:     The computation of the size of classwide objects is
              slightly overestimated compared to the size of the
              corresponding object of a definite type. This leads
              the GNAT.Debug_Pool to report incorrect information when
              an object is allocated with a simple access type and
              deallocated with an access to classwide.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Allocate objects directly with the same access to
              classwide as used for deallocation or avoid using the
              GNAT.Debug_Pool in such a context.

KP-315a1-9818-010 Incorrect result on inlining call with conversion

  Problem:    GNAT may produce an incorrect result when an actual for an
              in_parameter in an inlined call is a type conversion.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Do not compile the corresponding unit with -gnatN, or introduce
              a temporary for the conversion.

KP-315a1-9814-003 Spurious conformance errors in renaming_as_body

  Problem:    GNAT incorrectly rejects a renaming_as_body that is subtype
              conformant but not fully conformant with the renamed entity.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Make the renaming_as_body declaration fully conformant.

KP-315a1-9813-007 Documentation example font size too small in html files

  Problem:    The html files distributed with the standard binary
              distributions are using a font size that is too small
              making the examples hard to read.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: The complete documentation package coming with the 3.15a
              release has been fixed. Downloading this package and
              replacing the html files in the doc directory solves
              the problem.

KP-315a1-9809-003 Compiler crash from use of Wide_Character as discriminant

  Problem:    If the type of a discriminant is Wide_Character or is a type
              derived from Wide_Character, then the compiler may crash.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: If this usage is really required, use a 16-bit unsigned integer
              type as the discriminant, with appropriate conversions.

KP-315a1-9806-004 Incorrect No_Elaboration_Code indication from gnatbind

  Problem:    If the -r switch is used for gnatbind to request a list of
              restrictions which are not violated by any unit in a partition,
              then this list may contain No_Elaboration_Code when in fact
              one or more units in the partition do have elaboration code.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Ignore the No_Elaboration_Code line if present in the binder
              output when -r is used. To determine if a program can indeed
              be compiled with this restriction, place the corresponding
              pragma in the configuration pragmas file, and see whether
              successful recompilation is possible.

KP-315a1-9805-005 Bad warnings from convention Default and External

  Problem:    These conventions were documented as equivalent to C, but
              generated warnings anyway on non-VMS systems.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Ignore the warnings. The conventions are properly accepted.
              It is simply the warning that is incorrect.

KP-315a1-9801-003 Bogus warning from Ada.Task_Attributes

  Problem:    On some targets, in some situations, the instantiation of
              Ada.Task_Attributes may get a false warning about alignments.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Ignore the warning, no functional problems correspond to this
              warning (since the unchecked conversion in question is not
              used in instantiations which generate the warning), or use
              pragma Warnings (Off) to suppress the warnings.

KP-315a1-9729-005 Missing GDB 5.0 documentation

  Problem:    Only the GDB 4.17 documentation is currently distributed
              with GNATPRO, even on platforms where GDB 5.0 is the only
              debugger provided.

  Status:     This problem is not fixed yet.

  Workaround: Use the GDB 4.17 documentation, as the changes made in the
              documentation are only minor.

KP-315a1-9725-016 GDB incorrectly prints variant record values

  Problem:    When printing variant records, GDB prints the wrong
              variant part of the record. This is caused by problems
              in both GNAT and GDB.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Add to your application a procedure that prints an image of
              the variant record, and call it directly from GDB to print
              the contents of the record.

KP-315a1-9724-004 Asis.Expressions.Corresponding_Name_Definition problem

  Problem:    ASIS specific problem. For the names defined by
              exception renaming declarations and generic renaming
              declarations, Asis query Corresponding_Name_Definition
              does not return the defining name from this renaming
              declaration, but the defining name from the definition
              of the entity being renamed.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Take this behavior into account when writing ASIS tools.

KP-315a1-9722-012 Problem with biased types as arguments

  Problems:   On most architectures, if a subprogram has an argument of biased
              type (an integer type where the specified size is not wide enough
              to represent a range starting at zero but is wide enough to
              represent the specified range) that has a size smaller than
              that of Integer, that operand will be passed incorrectly.

  Status:     This problem is fixed in GNAT 3.16 on 2002-12-25.

  Workaround: Avoid operands of such types.

KP-315a1-9721-018 Command line arguments handled incorrectly on AAMP

  Problem:    In the AAMP port of GNAT, there are no command line arguments
              available, but GNAT tried to set them anyway, causing program
              termination. Similarly, an extra parameter is left on the
              stack in an attempt to return an unwanted result.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Modify TINIT63 assembly code to push appropriate default
              values (zero for argc and null for arg and envp) and
              ignore the extra pushed value.

KP-315a1-9717-003 'Address may return wrong value for packed array field

  Problem:    In some cases and on some machines, using 'Address on a field
              that is a packed array may return the address of a temporary.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Take the address of the record directly.

KP-315a1-9716-015 Gnatdist on NT needs to have write access to the registry

  Problem:    Gnatdist on NT checks for the registry with write access and
              crash if users does have have the correct permissions.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Give users the permission to write into the registry
              database. Note that gnatdist does not modify the registry.

KP-315a1-9711-020 No output for block entities from -gnatR

  Problem:    The -gnatR listing (representation information) does not
              include entities defined within blocks.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: To determine the representation used, move the declaration
              outside the block, or create an equivalent declaration outside
              the block to examine the layout.

KP-315a1-9707-001 Wrong process status returned by Expect.Close on Windows

  Problem:    On Windows, GNAT.Expect.Close does not return the process
              status. The status is -1 even if the process execution was
              successful.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Ignore the return status.

KP-315a1-9503-001 Illegal use of 'Access applied to storage pools

  Problem:    The compiler is allowing 'Access to be applied to an access
              type's storage pool, which is illegal because storage pools
              are not aliased objects.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Avoid this illegal usage. If there is a need for getting an
              access value designating a storage pool, then the attribute
              Unrestricted_Access can be used.

KP-315a1-9430-021 Improper code generation for packed nested records

  Problems:   On some machines, it is possible that code will be improperly
              generated in the case of a packed record that contains a
              single field that is a nonpacked record and which, in turn,
              contains a single field that is also a non-packed record if
              a subprogram has an object of that type as an argument and
              passes the innermost object to another subprogram.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Make an explicit copy of the object and pass that as the
              parameter, copying it back if necessary.

KP-315a1-9307-014 Missing symbol for renamed variable in block

  Problem:    GDB sometimes does not find variable renamings local to a
              block. This is due to incorrect debugging information output
              by the compiler.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Use the full original name of the renamed entity in these
              cases.

KP-315a1-8624-003 Small programs using asynchronous transfer of control hangs

  Problem:    On multiprocessor systems, a small program using delays and
              asynchronous transfer of control may hang during termination.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Add a delay statement before the termination of the program.
              This problem only appears in small test cases, not in real
              applications.

KP-315a1-8606-014 Operations in Ada.Real_Time do not check arithmetic overflow

  Problem:    The operators defined in Ada.Real_Time do not check for
              arithmetic overflow.

  Status:     This problem is fixed in GNAT 3.16.

  Workaround: Recompile a-reatim.adb with overflow checks (-gnato).

KP-315a1-8308-003 GNAT packages have reserved names

  Problem:    Some predefined units in the library (children of Ada, System,
              and Interfaces) depend on children of GNAT. This means that an
              application using GNAT as a name for its own package may not
              be able to be compiled.

  Status:     This problem was fixed in GNAT 3.16 on 2002-10-26.

  Workaround: Avoid the use of the name GNAT as a package in your program,
              and do not attempt to define any children of GNAT.

KP-315a1-7331-002 Debug symbol compression not implemented

  Problem:    Although the -gnatC switch was implemented in the compiler
              to compress debug information, it had minimal effect, and
              was not in any case ever implemented in GDB. Thus this has
              never really worked, and never really been used.

  Status:     The -gnatC switch is removed permanently in GNAT 3.16
              2002-10-12.

  Workaround: Do not use the -gnatC switch (which has never fully worked
              anyway in the sense that GDB has never handled the result).
