============================================================
Known problems in GNAT version 5.02a1 as of January 13, 2005
============================================================

Copyright (c) 2004-2005 Ada Core Technologies

The following is a listing of known problems in release 5.02a1. Except
where specifically noted, all these problems have been corrected in
version 5.03, which  means they are corrected in any wavefront issued
subsequent to the date above, and in the final 5.03 release (which is
not yet scheduled or available). The status line indicates the date the
problem was fixed (in ISO format YYYY-MM-DD). This can be used to
determine if a given wavefront has the fix identified in the entry.

KP-502a1-DC23-009 Temporary files not removed when program terminates

  Problem:    In some circumstances, temporary files created by IO
              packages (when the file name is the empty string) are
              not deleted when the program terminates.

  Status:     This was fixed in 5.03 on 2005-01-04

  Workaround: Remove these temporary files manually.

KP-502a1-DC20-012 Problem with ceiling locking in the Ravenscar run time

  Problem:    If a program used task priorities within the range of
              System.Interrupt_Priority, there was a potential transient
              lack of synchronization between the priority value used by
              the GNAT run time and the priority at the kernel level. This
              problem only affected the Ravenscar run times.

  Status:     This was fixed in 5.03 on 2005-01-12

  Workaround: Avoid assigning priorities to task within the range of
              System.Interrupt_Priority.

KP-502a1-DC17-015 Missing obsolescent feature warning for constrained

  Problem:    The use of constrained on private types permitted by RM J.4
              was not being flagged as an obsolescent feature when the
              -gnatwj flag was set.

  Status:     This was fixed in 5.03 on 2004-12-17

  Workaround: Manually inspect the code for any use of this particular
              obsolete use of constrained.

KP-502a1-DC17-009 Race condition locking protected object in Ravenscar run time

  Problem:    When locking a protected object, some data was stored within
              the object before locking it. There is a very small window
              where a race condition can occur if another task tries to
              execute a protected operation on the same protected object.
              It affects only the Ravenscar run times.

  Status:     This was fixed in 5.03 on 2005-01-06

  Workaround: Avoid this race condition, by ensuring that no other task can
              intefere with the locking operation, or obtain updated copies
              of s-taprob.adb and s-tposen.adb.

KP-502a1-DC17-003  Crash on packed array with private ancestor

  Problem:    Compiler aborts on a reference to a derived packed array
              which is the full view of a private type in a generic
              package, when an instance of the generic is used as a formal
              package in another generic unit.

  Status:     This was fixed in 5.03 on 2004-12-18

  Workaround: Remove pragma Pack from the array type.

KP-502a1-DB29-002 Duplicate asm symbols for aggregate with allocators

  Problem:    Assembler reports duplicate symbols on an aggregate for
              an array of an access-to-array type, when the aggregate is
              given in named notation.

  Status:     This was fixed in 5.03 on 2004-11-23

  Workaround: Use positional notation for the aggregate.

KP-502a1-DB27-008 GDB set varsize-limit interferes with set var

  Problem:    The abbreviation 'set var VALUE', which in the public version
              of GDB is short for 'set variable VALUE', is ambiguous in
              GNAT GDB (due to the existence of 'set varsize-limit').

  Status:     This was fixed in 5.03 on 2004-11-27

  Workaround: Use 'set variable' rather than 'set var'.

KP-502a1-DB27-007 GDB problem with some structs in non-Ada mode

  Problem:    When trying to print a non-scalar-typed (struct or union)
              field of a struct or union where the size given in the
              debugging data for the field is larger than that of the
              field's type, GDB fails with an error message when in
              non-Ada mode.  This is a side-effect of changes to allow
              packed fields of non-scalar types in Ada.

  Status:     This was fixed in 5.03 on 2004-11-27

  Workaround: Try switching to Ada mode before printing the field.

KP-502a1-DB24-012 Compiler failure when -gnatdA used without -gnatR

  Problem:    Use of the -gnatdA debug switch in conjunction with -gnatc,
              but without any -gnatR switch could cause a compiler crash.
              The -gnatdA switch forces representation information to be
              output for internal entities.

  Status:     This was fixed in 5.03 on 2004-11-25

  Workaround: The -gnatdA switch should imply -gnatR3m, and with this fix
              it does successfully do this in all cases. To work around the
              problem for now, specify -gnatR3m explicitly.

KP-DB14-002   Spurious error on overloaded protected operation

  Problem:    Compiler might reject a call to a protected function when the
              protected object contains a procedure or entry of the same name.

  Status:     This was fixed in 5.03 on 2004-11-15

  Workaround: Rename operations to avoid the overloading.

KP-502a1-DB08-008 Incorrect warnings for assigned but not read tagged variable

  Problem:    When a variable of a tagged type is assigned to but not
              otherwise referenced, the assignment might be treated as
              a source reference. This prevents emission of a warning
              that the variable is assigned but never read. This also
              produces an incorrect warning if a pragma Unreferenced applies.

  Status:     This was fixed in 5.03 on 2004-11-08

  Workaround: Remove pragma Unreferenced to prevent the incorrect warning
              from being produced.

KP-502a1-DB08-006 ASIS DDA problem with array components

  Problem:    In case of a nested array structure (array of arrays), when
              extracting one Array_Component from another Array_Componet,
              ASIS DDA creates the inner component in such a way, that for
              the first component its first bit value is always true. This
              may be wrong in case if representation clauses are applied

  Status:     This was fixed in 5.03 on 2004-11-08

  Workaround: When decomposing nested array structures, use the First_Bit
              value for the first outer component to compute the exact layout
              of the inner components.

KP-502a1-DB02-008 Unable to debug protected type entries

  Problem:    Debugging information for protected type entries is
              missing, and prevents the debugger from being able
              to debug these protected entries.

  Status:     This was fixed in 5.03 on 2004-11-05

  Workaround: Implement the entry as a call to a regular procedure,
              and debug that procedure.

KP-502a1-DB01-009 Incorrect behaviour of default stream-oriented attributes

  Problem:    The default implementation of stream-oriented attributes for
              discriminated records with default discriminants and
              controlled components depending upon discriminants was
              incorrect and could produce a hang or an exception at run time.

  Status:     This was fixed in 5.03 on 2004-12-08

  Workaround: Do not use the default implementation of stream-oriented
              attributes for such types.

KP-502a1-DA29-015 libgcc_s not found when using -bargs -shared

  Problem:    GNAT 5 executables could not always start executing when
              gnatbind was invoked with -shared, because the shared GCC
              library libgcc_s.so could not be found.

  Status:     This was fixed in 5.03 on 2004-11-10

  Workaround: Specify the directory of libgcc_s.so in the environment
              variable LD_LIBRARY_PATH, or equivalent for the platform.

KP-502a1-DA28-001 Unable to break on nested procedure on mips-irix

  Problem:    The debugger is unable to insert a breakpoint inside a nested
              procedure when the breakpoint location is specified using the
              procedure name. The debugger reports that the function is
              not defined.

  Status:     This was fixed in 5.03 on 2004-10-28

  Workaround: Specify the breakpoint location using the FILE:LINE syntax.

KP-502a1-DA21-002 ASIS DDA problem with derived record types

  Problem:    For a type that is derived from some record type, the ASIS
              Data Decomposition Annex returns the representation information
              not for the derived type, but for its ancestor record type.
              But the representation of the derived type may be different in
              case if there is a representation clause that is applied only
              to this derived type, but not to its ancestor record type

  Status:     This was fixed in 5.03 on 2004-10-22

  Workaround: In case of a derived type, analyze the corresponding
              representation clauses (if any) to compute the correct
              representation manually.

KP-502a1-DA19-013 Missing accessibility check on protected object

  Problem:    Compiler fails to reject an access reference to an operation
              of a local protected object when the corresponding access
              type is global to the reference.

  Status:     This was fixed in 5.03 on 2004-10-19

  Workaround: Do not write illegal access references to protected operations.

KP-502a1-DA18-009 Incomplete validity checks on floating-point expressions

  Problem:    Validity checks on arithmetic expressions appearing on the
              right-hand side of an assignment check the validity of the
              operands but not the result of the operation.

  Status:     This was fixed in 5.03 on 2004-10-21

  Workaround: If range checks on floating-point values are required,
              use constrained floating-point types.

KP-502a1-DA18-002 False warning on pragma Unreferenced for accept formal

  Problem:    If there are multiple accept statements for a single entry,
              and an accept has a legitimate pragma Unreferenced for a formal,
              then if this formal is referenced in a separate accept later
              on, an incorrect warning about the pragma Unreferenced is given.

  Status:     This was fixed in 5.03 on 2004-10-15

  Workaround: Use pragma Warnings (Off) to suppress the false warning.

KP-502a1-DA15-008 Crash on illegal conversion in 'Access reference

  Problem:    When an illegal type conversion of the form
              Subtype_Mark_1 (Subtype_Mark_2) occurs in the prefix
              of a 'Access attribute reference, the compiler may crash
              instead of diagnosing the illegal construct.

  Status:     This was fixed in 5.03 on 2004-10-15

  Workaround: Do not write such illegal type conversions.

KP-502a1-DA11-027 Debugger fails with dec_thread_init error message

  Problem:    When debugging on Tru64 a program that does not use
              tasking, using commands related to tasking such as
              "info tasks" for instance confuses the debugger.
              Subsequent commands may fail with a "dec_thread_init:
              unable to find __pthread_dbg_symtable" error message.

  Status:     This was fixed in 5.03 on 2004-10-12

  Workaround: Do not call tasking related commands when debugging
              a program that does use tasking.

KP-502a1-DA11-013 Compiler crash on unchecked deallocation, protected types

  Problem:    Compiler aborts when deallocating an array type with a
              component type that is is a private type whose full view is
              a task or protected type with discriminants.

  Status:     This was fixed in 5.03 on 2004-10-11

  Workaround: Make the component type non-private.

KP-502a1-DA07-034 Unexpected language switch while debugging

  Problem:    The debugger sometimes unexpectedly switches the language
              to the wrong one. This can happen when debugging procedures
              that never return.

  Status:     This was fixed in 5.03 on 2004-10-28

  Workaround: Force the language back to the correct value, using
              the "set lang" command.

KP-502a1-DA07-030 Stack tracebacks could raise a segmentation violation

  Problem:    In some very rare cases it is possible that computing the
              stack tracebacks (either using the -bargs -E or via the
              GNAT.Traceback API) raises a segmentation violation. This
              is due to the fact that the stack unwinding termination
              test was not correct.

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

  Workaround: Do not store stack tracebacks in exceptions in this situation

KP-502a1-DA07-029 gnatclean too agressive to delete files

  Problem:    gnatclean is too agressive when deleting files in library
              directories. For example, it will delete a library file
              that the user has no permission to modify.

  Status:     This was fixed in 5.03 on 2004-10-07

  Workaround: Do not use gnatclean when you have no permission to delete
              some files in a library directory.

KP-502a1-DA07-026 Wrong results from Pred attribute

  Problem:    If F'Pred is applied to a floating-point value of type F
              that is exactly a negative power of 2, the result is
              wrong (exponent is one too high).

  Status:     This was fixed in 5.03 on 2004-10-08

  Workaround: Either avoid the use of this predicate in this situation,
              or test specifically for this case and correct the result.

KP-502a1-DA07-024 Wrong results from fixed-point division

  Problem:    In very rare cases, the result of dividing one 64-bit fixed-
              point type by another may be incorrect. We have not been able
              to demonstrate a specific example, but an obscure error in one
              of the run-time library support routines used in this case has
              been found and fixed, so it is likely that there do exist some
              cases where this bug is triggered.

  Status:     This was fixed in 5.03 on 2004-10-17

  Workaround: Convert the values to long floating-point to get reasonably
              accurate results, or obtain the fixed run-time version.

KP-502a1-DA07-008 Incorrect value printed by debugger for variant record

  Problem:    The debugger sometimes prints an incorrect value for
              variant record objects. This only happens when dwarf-2
              is used as the debugging format.

  Status:     This was fixed in 5.03 on 2004-10-12

  Workaround: Use the stabs debugging format if possible. Or write
              a small procedure that prints the value of an object
              of this variant record type, and call this procedure
              from the debugger.

KP-502a1-DA07-006 Spurious error on aliased tagged variable as in-out actual

  Problem:    Compiler rejects an in-out parameter that is a variable V of
              a tagged type, when the formal is class-wide, and an address
              clause overlays V with an unrelated object.

  Status:     This was fixed in 5.03 on 2004-10-07

  Workaround: Introduce a temporary to capture the address of V, and use the
              temporary in the subsequent address clause.

KP-502a1-DA06-002 ASIS DDA Type_Model_Kind may be overpessimistic for arrays

  Problem:    A call to Asis.Data_Decomposition.Type_Model_Kind may return
              A_Complex_Dynamic_Model for a DDA array component even if this
              component is static.

  Status:     This was fixed in 5.03 on 2004-10-06

  Workaround: Traverse the type structure manually for more accurate
              detection of the type model kind.

KP-502a1-DA05-014 Array move/compare with atomic components malfunctions

  Problem:    Although the RM is not entirely clear on this issue, it would
              seem that an array compare or assignment should go element by
              element if the components are atomic (and the array is itself
              not atomic). This was not the case, and as a result memory
              accesses that were longer or shorter than the size of the
              atomic component could occur.

  Status:     This was fixed in 5.03 on 2004-10-08

  Workaround: Use an explicit loop to compare or assign arrays in this case
              so that the expected atomic access is respected.

KP-502a1-DA05-012 Compiler crash on empty file for subunit

  Problem:    Compiler aborts if the compilation unit for a subunit is
              empty or contains a unit unrelated to the parent unit.

  Status:     This was fixed in 5.03 on 2004-10-05

  Workaround: Do not write an illegal subunit.

KP-502a1-DA04-003 Spurious elaboration circularity with instances

  Problem:    Compiler occasionally cannot bind a program involving multiple
              calls in elaboration code that invoke subprograms declared in
              nested instances in child units.

  Status:     This was fixed in 5.03 on 2004-10-15

  Workaround: As with other spurious elaboration problems, add pragmas
              to suppress elaboration checks on some unit, to break
              reported circularity.

KP-502a1-D928-011 Wrong result of Asis.Text on A_Case_Path elements

  Problem:    Asis.Text queries Element_Span and Element_Image return the
              wrong span/image beginning for A_Case_Path elements

  Status:     This was fixed in 5.03 on 2004-09-29

  Workaround: Manually traverse the enclosing case statement element and/or
              the image thereof to get the correct result.

KP-502a1-D928-006 Wrong diagnosis of unreachable code

  Problem:    In certain unusual cases (the most common case is when a
              goto references an immediately following label), the
              compiler will incorrectly diagnose code as unreachable
              and generate a wrong warning.

  Status:     This was fixed in 5.03 on 2004-09-28

  Workaround: Restructure the code to avoid the use of goto statements
              and labels (this error can only occur when goto statements
              are used in unusual ways).

KP-502a1-D925-002 Problem with related actuals in instantiation

  Problem:    Compiler may reject an instantiation where the actual for
              a formal type T is private, a subsequent formal is an
              array of T, and the generic is a formal package of another
              generic unit.

  Status:     This was fixed in 5.03 on 2004-10-02

  Workaround:  Make component type non-private.

KP-502a1-D923-021 Problem with aggregate assignment and -fstack-check

  Problem:    When -fstack-check is specified, wrong code may be generated
              for aggregate assignments or declarations of aggregate using
              an aggregate value if they involve function calls.

  Status:     This was fixed in 5.03 on 2004-10-06

  Workaround: Break up the assignment into component assignments or use
              component-wise initialization.

KP-502a1-D921-005 Debugger cannot print a subtype of a 64-bits fixed point

  Problem:    When trying to print an object which type is a subtype of a
              64-bits fixed point type, the debugger reports <error type>.

  Status:     This was fixed in 5.03 on 2004-09-24

  Workaround: Either use dwarf-2 debugging information, or use a new fixed
              point type instead of a subtype.

KP-502a1-D918-002 Asis.Data_Decomposition.Position problem

  Problem:    If the argument Asis.Data_Decomposition.Position is a record
              component that itself is a subcomponent of another record
              component, this query returns not the byte offset starting from
              the enclosing component, as it is requires by the DDA
              specification but the offset starting from the whole composite
              type.

  Status:     This was fixed in 5.03 on 2004-09-24

  Workaround: When decomposing a composite type, subtract the position of
              the enclosing record component from the result returned by
              Position query.

KP-502a1-D916-012 Crash with stack checking on actual that is a function call

  Problem:    Compiler aborts if a library-level instance has an actual that
              includes a function call returning a composite type, and the
              unit is compiled with -fstack-check.

  Status:     This was fixed in 5.03 on 2004-09-22

  Workaround: Compile unit without -fstack-check, or wrap the instance in
              a regular library package.

KP-502a1-D915-012 ASIS and gnatelim problems with expanded subprogram body

  Problem:    For expanded generic subprogram body, ASIS query
              Asis.Extensions.Acts_As_Spec may return True, and
              Asis.Declarations.Corresponding_Body may return Nil_Element.
              gnatelim may generate wrong pragmas for expanded subprograms.

  Status:     This was fixed in 5.03 on 2004-09-16

  Workaround: Check that the Element represents an expanded subprogram body
              and use other ASIS queries to compute the corresponding
              declaration Element. For gnatelim, manually correct the result
              list of pragmas.

KP-502a1-D913-010 GNAT.Sockets.Check_Selector returns incorrect status

  Problem:    GNAT.Sockets.Check_Selector does not return a consistent
              status, and may hang, if an error condition occurs.

  Status:     This was fixed in 5.03 on 2004-09-15

  Workaround: Make sure all the socket descriptors passed to Check_Selector
              are open, valid socket descriptors.

KP-502a1-D911-001 Can not get stack traceback on Windows using shared runtime

  Problem:    The stack traceback information is not properly computed
              when using the GNAT shared runtime on Windows (-bargs -shared).

  Status:     This was fixed in 5.03 on 2004-09-11

  Workaround: Build the program using the static runtime (-bargs -static).

KP-502a1-D909-001 Static link of objects using dwarf-2 to the VxWorks kernel

  Program:    When using dwarf-2 debugging information, statically linking the
              generated object to a VxWorks kernel fails and the linker
              reports overlapping sections.

  Status:     This was fixed in 5.03 on 2004-09-24

  Workaround: Either use Tornado's dynamic loader or use stabs debugging
              information (-gstabs+).

KP-502a1-D907-018 Can not link program using GNAT.Dynamic_HTables

  Problem:    Building a program using GNAT.Dynamic_HTables fails
              during the link. The error message reports that
              a unit "depends on gnat.dynamic_htables (spec) which no
              longer exists".

  Status:     This was fixed in 5.03 on 2004-09-07

  Workaround: Build the program using the gnatmake -a command line
              switch. This forces GNAT.Dynamic_HTables to be built.

KP-502a1-D904-001 Packed arrays as components not properly initialized

  Problem:    If a small (64 bits or less) fixed length packed array
              appears as a component of a record, and is not explicitly
              initialized, then some operations, notably array compares
              may malfunction due to lack of proper ininitalization.

  Status:     This was fixed in 5.03 on 2004-09-03

  Workaround: Explicitly initialize such components, using an appropriate
              aggregate value.

KP-502a1-D903-019 Problem with aliased arrays passed as arguments

  Problem:    Wrong code may be generated for calls to subprograms when
              the actual parameter corresponding to a constrained array
              formal parameter is an aliased array of a constructed
              subtype whose nominal subtype is unconstrained.

  Status:     This was fixed in 5.03 on 2004-10-08

  Workaround: Explicitly pass the slice defined by the constructed
              subtype instead of the whole array.

KP-502a1-D903-018 Ambiguity with inherited operation

  Problem:    Compiler rejects an instance where an operation inherited
              from a type derived from an actual is a homograph of an
              explicit subprogram.

  Status:     This was fixed in 5.03 on 2004-09-04

  Workaround: Rename either operation.

KP-502a1-D903-012 Compiler crashes on aggregate in default expression

  Problem:    When an aggregate or string literal is used as the
              default expression for a record component, if the
              record type is derived and the derived type has a
              representation clause, a compiler crash may occur.

  Status:     This was fixed in 5.03 on 2004-09-03

  Workaround: Declare a constant outside of the record declaration
              and use that constant as the default expression.

KP-502a1-D902-015 Spurious visibility error with formals with box

  Problem:    Compiler improperly rejects a context clause mentioning two
              packages P1 and P2 that contain unrelated instantiations,
              where P1 has a use_clause on some other package P that is
              used as an actual for a formal package with a box in the
              instantiation within P2.

  Status:     This was fixed in 5.03 on 2004-09-10

  Workaround: Interchange the with_clauses for P1 and P2.

KP-502a1-D902-013 Excessive polling points with full inlining

  Problem:    Compiler inserts multiple polling points for the same
              subprogram when both fron-end and back-end inlining are
              enabled.

  Status:     This was fixed in 5.03 on 2004-09-02

  Workaround: Compile unit a single inlining mode.

KP-502a1-D830-014 Segmentation fault at runtime on string comparisons

  Problem:    On the Alpha architecture, wrong code may be generated
              for string comparisons in functions declaring big local
              variables, resulting in a segmentation fault at runtime.

  Status:     This was fixed in 5.03 on 2004-09-30

  Workaround: Isolate the string comparison in its own function.

KP-502a1-D827-011 Wrong code generated with inlining and stack checking

  Problem:    The compiler may generate wrong code on an instantiation
              that is compiled with front-end inlining and stack-checking.

  Status:     This was fixed on 2005-08-30

  Workaround: Compile offending unit without the fstack-check flag.

KP-502a1-D827-006 Problem with packed arrays inside records

  Problem:    On big-endian platforms, wrong code may be generated at high
              optimization levels (-O2 and above) when an aggregate value
              is assigned to a record containing a bit-packed array whose
              size is not a multiple of the storage unit.

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

  Workaround: Additionally pass -fno-strict-aliasing on the command line.

KP-502a1-D825-003 Crash on SPARC/Solaris for generic array subtype

  Problem:    The compiler may segfault on an array type declaration whose
              index is a subtype instantiated from a generic package, under
              certain conditions relating to the size of the objects.

  Status:     This was fixed in 5.03 on 2004-12-08

  Workaround: Use the generic subtype instead of the instantiated one as the
              array index.

KP-502a1-D819-009 SALs and pragma Restrictions (No_Finalization)

  Problem:    Binding a Stand-Alone Library with sources that include
              a pragma Restrictions (No_Finalization) fails.

  Status:     This was fixed in 5.03 on 2004-08-27

  Workaround: Avoid pragma Restrictions (No_Finalization) in Stand-Alone
              Libraries.

KP-502a1-D818-007 Problem with validity checking of packed in out parameter

  Problem:    If an indexed component is passed to a subprogram, where
              the array is a bit-packed formal in out array, and validity
              checking is turned on, then wrong code may be generated
              typically resulting in an incorrect constraint error. This
              may also cause compiler bombs in some circumstances.

  Status:     This was fixed in 5.03 on 2004-09-04

  Workaround: Assign the parameter value to a temporary, call the subprogram
              and assign the resulting updated value back.

KP-502a1-D817-014 Case of the drive letter in Windows path name

  Problem:    When using Normalize_Pathname, the case of the drive letter
              was not consistent when Case_Sensitive is True (the default).
              It is now forced to upper case.

  Status:     This was fixed in 5.03 on 2004-08-18

  Workaround: Do not depend on the case of the drive letter, if
              Case_Sensitive is True.

KP-502a1-D816-004 Excess parameter on heap deallocation causes ctree errors

  Problem:    On the AAMP target only, an unchecked deallocation of an
              access-to-unconstrained-array value passes excess parameter
              information to the underlying run-time routine. This will
              cause an address to remain on the stack following the call
              and the ctree tool will warn that the call has extra
              parameters.

  Status:     This was fixed in 5.03 on 2004-08-17

  Workaround: Ignore the warning from ctree, or if the extra stack data
              is problematic for some reason, then it's necessary to edit
              the assembly and ensure that only the array address portion
              of the unconstrained array access value is loaded on calls
              to the DEALL_IN_HP macro.

KP-502a1-D812-007 Warning after opening core file on HP/UX

  Problem:    GDB sometimes prints a "Couldn't find general-purpose
              registers in core file" when opening a core file on HP/UX.

  Status:     This was fixed in 5.03 on 2004-09-10

  Workaround: This warning can be ignored.

KP-502a1-D812-006 Wrong order of libraries on IRIX

  Problem:    In some circumstances, when sources of a library project
              include pragmas Linker_Options, there are undefined symbols
              in the library, on IRIX.

  Status:     This was fixed in 5.03 on 2004-08-16

  Workaround: Add an attribute Library_Options with the necessary options
              in the library project.

KP-502a1-D811-011 GNAAMP emits wrong code for conversion to Unsigned.Long

  Problem:    On the AAMP target only, conversions from a universal_integer
              expression to a 32-bit unsigned type are generated incorrectly
              (for example, Unsigned.Long (Int_Object'Size - 1)).

  Workaround: Assign the argument of the conversion to an object of the
              target type and replace the conversion with a reference
              of the object.

KP-502a1-D810-003 Incorrect result for Size_In_Storage_Elements for array

  Problem:    The Size_In_Storage_Elements may give incorrect (excessively
              large) values in some cases when applied to array types.

  Status:     This was fixed in 5.03 on 2004-09-04

  Workaround: Use the 'Object_Size attribute instead, dividing the result
              by Storage_Unit, or alternatively multiply the Component_Size
              by the number of elements, and similarly divide the result.

KP-502a1-D728-015 Crash on dispatching call in triggering alternative

  Problem:    Compiler crashes when the triggering alternative in an
              asynchronous select include a dispatching call.

  Status:     This was fixed in 5.03 on 2004-07-29

  Workaround: Capture result of dispatching call in temporary before the
              asynchronous select.

KP-502a1-D728-007 Missing line feed in debugger output

  Problem:    The GDB prompt may not be at the beginning of the line after
              a call to add-symbol-file. This would make GPS lose proper
              synchronization, resulting in unexpected behavior.

  Status:     This was fixed in 5.03 on 2004-07-30

  Workaround: In GDB, just type enter after the command. In GPS, use the
              interrupt menu when the prompt appears on the debugger
              console.

KP-502a1-D728-005 Compiler rejects parameterless protected call in 'Size

  Problem:    GNAT rejects the attribute reference 'Size when the prefix is
              a parameterless protected function call.

  Status:     This was fixed in 5.03 on 2004-07-28

  Workaround: Introduce a temporary to capture the result of the call.

KP-502a1-D728-004 Spurious error on 'Access in a generic body

  Problem:    GNAT rejects an attribute reference P'Access on a subprogram P
              when the reference appears in a generic body, the access type
              is declared outside of the body, and the subprogram is declared
              in the generic specification.

  Status:     This was fixed in 5.03 on 2004-07-28

  Workaround: Use the attribute Unchecked_Access instead.

KP-502a1-D728-002 Incorrect behavior for breakpoint on exit statement

  Problem:    When a breakpoint is set on a loop exit statement in GDB, the
              hit sometimes occurs at different location in the loop and in a
              state that does not match what would trigger the exit.
              This is independent of the optimization level, and most often
              happens when the exit statement is alone in a conditional arm.

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

  Workaround: Insert a dummy procedure call before the exit statement.

KP-502a1-D726-006 Spurious error on non-universal 'Size clause

  Problem:    GNAT rejects a size clause where the size is given by an
              expression of a specific integer type T, and the static value
              of the expression is out of the bounds of T.

  Status:     This was fixed in 5.03 on 2004-07-31

  Workaround  Wrap the expression in a conversion to a wider type.

KP-502a1-D726-002 Asis.Expressions.Corresponding_Expression_Type problem

  Problem:    Asis.Expressions.Corresponding_Expression_Type may blow up on
              aggregates (in particular, if the aggregate is an argument of
              a prefix call of a pradefined operation).

  Status:     This was fixed in 5.03 on 2004-11-17

  Workaround  Use other ASIS queries to compute the aggreagate type manually.

KP-502a1-D723-007 GNAAMP crashes compiling a slice comparison

  Problem:    On the AAMP target only, if an array slice is used in certain
              contexts, such as the right-hand side of a short-circuit
              control form, then the GNAAMP compiler may blow up.

  Status:     This was fixed in 5.03 on 2004-07-23

  Workaround: Replace the subexpression involving the slice with a
              reference to a Boolean variable initialized by the
              slice subexpression.

KP-502a1-D722-012 ASIS Enclosing_Element problem with generic associations

  Problem:    Asis.Elements.Enclosing_Element query may return a wrong result
              in case if its argument represents the actual parameter for
              a generic formal object and is itself from some expanded
              generic code.

  Status:     This was fixed in 5.03 on 2004-07-25

  Workaround: Use you own version of Enclosing_Element based on full traversal
              of the unit.

KP-502a1-D722-004 Failure building DLLs depending on static libraries

  Problem:    On Windows, in some cases, it is not possible to build a DLL
              depending on another static library. This is because of a
              problem in handling ordering of libraries.

  Status:     This was fixed in 5.03 on 2004-08-04

  Workaround: Call GCC directly with libraries put after all objects files.

KP-502a1-D722-002 Library project with no source dirs

  Problem:    When a library project contains an external library
              and the indication that there is no Ada source is given
              by "for Source_Dirs use ();", gnatmake crashes.

  Status:     This was fixed in 5.03 on 2004-07-22

  Workaround: Use "for Source_Files use ();" instead.

KP-502a1-D721-002 gnatpp problem with aggregates

  Problem:    gnatpp may incorrectly reproduce an aggregate if it contains
              a left parenthesis after '=>'

  Status:     This was fixed in 5.03 on 2004-07-22

  Workaround: Correct such an aggregate manually.

KP-502a1-D718-002 Unexpected errors for small array with large bounds

  Problem:    Allocating an array with an index low bound known at compile
              time to be greater than 16#8000_0000# sometimes unexpectedly
              raises Storage_Error at run time or produces a compilation
              error, even if the array is actually small.

  Status:     This was fixed in 5.03 on 2004-09-04

  Workaround: Lower the bound values or arrange for the compiler not to
              able to evaluate them at compile time, for instance by involving
              a function call in their assignment.

KP-502a1-D717-003 gnatpp problem with extension aggregate with 'null record'

  Problem:    gnatpp blows up on an extension aggregate if this aggregate
              contains no component association (that is, it
              contains 'null record').

  Status:     This was fixed in 5.03 on 2004-07-21

  Workaround: If possible, comment out or replace such an aggregate
              in the argument source and then put them back (with manual
              reformatting) it the result source generated by gnatpp.

KP-502a1-D717-003 gnatpp problem with extension aggregate

  Problem:    If an extension aggregate contains a qualified expression as
              its ancestor part, and the first component association after
              'with' does not start from the new line, gnatpp does not put
              a space between 'with' and this association.

  Status:     This was fixed in 5.03 on 2004-07-17

  Workaround: Add the needed space after 'with' manually.

KP-502a1-D716-004 Crash on x86 with -fPIC on array element assignment

  Problem:    The compiler aborts, on x86 when -fPIC is specified, on the
              assignment of elements of an array by the return value of a
              function.

  Status:     This was fixed in 5.03 on 2004-07-17

  Workaround: Use a temporary between the function call and the assignment.

KP-502a1-D714-007 GNAAMP crashes on array attribute with function call prefix

  Problem:    On the AAMP target only, the compiler blows up on array
              attributes applied to a function call.

  Status:     This was fixed in 5.03 on 2004-07-23

  Workaround: Assign the result of the function call to a constant of
              the array type and apply the attribute to the constant.

KP-502a1-D714-005 Crash on constrained access component to incomplete type

  Problem:    Compiler aborts on a use of a record component C of a
              discriminated type T, when T has a partial view, and the type
              of C is a constrained access type whose designated type is a
              subtype of the partial view of T.

  Status:     This was fixed in 5.03 on 2004-07-19

  Workaround: Use an unconstrained access type for the component.

KP-502a1-D713-013 Spurious constraint error on array equality with -gnatVo

  Problem:    A program that compares array objects for equality may raise
              constraint error if compiled with validity checks on operator
              and attribute values.

  Status:     This was fixed in 5.03 on 2004-07-14

  Workaround: Compile code without the -gnatVo option.

KP-502a1-D712-004 Missing error on illegal call without actuals

  Problem:    Compiler fails to reject a function name where a function call
              with actuals is expected, when the name is itself an actual in
              an enclosing call.

  Status:     This was fixed in 5.03 on 2004-07-12

  Workaround: Do not write such illegal code.

KP-502a1-D712-002 Crash on constrained access component to incomplete type

  Problem:    Compiler aborts when a record component has an access subtype
              constrained by a discriminant of the enclosing type, and the
              designated type is an incomplete discriminated type.

  Status:     This was fixed in 5.03 on 2004-07-16

  Workaround: Remove constraint from component declaration

KP-502a1-D709-019 Spurious error on formal package that is generic child

  Problem:    Compiler rejects a formal package that is an instantiation of
              a child unit, when its private part uses the full view of a type
              declared in an ancestor package.

  Status:     This was fixed in 5.03 on 2004-07-11

  Workaround: Make type in ancestor fully visible.

KP-502a1-D708-017 Unable to print slice of large string

  Problem:    The debugger is sometimes unable to print slices of very
              large strings, and aborts with an error message saying
              "cannot take slice of non-array".

  Status:     This was fixed in 5.03 on 2004-10-12

  Workaround: Use the "x /Nc" command to print the string, where
              N is the number of characters that need to be printed.

KP-502a1-D708-005 gnatpp problem with aggregate starting from 'null'

  Problem:    gnatpp blows up on a (record or array) aggregate if this
              aggregate starts with literal 'null'

  Status:     This was fixed in 5.03 on 2004-07-16

  Workaround: If possible, comment out or replace such an aggregate
              in the argument source and then put them back (with manual
              reformatting) it the result source generated by gnatpp.

KP-502a1-D707-008 Extra paren for multidimentional array aggregate from gnatpp

  Problem:    The output generated by gnatpp may have an extra "(" for
              a multidimentional array aggregate.

  Status:     This was fixed in 5.03 on 2004-07-08

  Workaround: Remove the wrong "(" from the gnatpp result manually.

KP-502a1-D707-002 Spurious error on inherited intrinsic comparison operator.

  Problem:    Compiler rejects a comparison operation on a derived type that
              inherits a user-defined intrinsic comparison from its parent.

  Status:     This was fixed in 5.03 on 2004-07-21

  Workaround: Declare explicit comparison operator for derived type.

KP-502a1-D706-021 Debugger crash when restarting execution

  Problem:    Rerunning the program being debugged after having changed
              the underlying executable can cause the debugger to crash.

  Status:     This was fixed in 5.03 on 2004-07-07

  Workaround: Exit the debugger before rerunning the program.

KP-502a1-D706-016 Spurious error on protected object containing tasks

  Problem:    Compiler generates an error message when compiling a single
              protected object whose private part has a task subcomponent.

  Status:     This was fixed in 5.03 on 2004-07-07

  Workaround: Use a protected type, and declare a single object of the type.

KP-502a1-D705-004 Compiler crashes on packed slice passed to subprogram

  Problem:    If there is a reference to a packed array slice within the
              expression of a procedure actual parameter, then the compiler
              can crash.

  Status:     This was fixed in 5.03 on 2004-09-29

  Workaround: Precompute the value of the actual into a temporary, then
              pass the temporary as the procedure parameter.

KP-502a1-D701-005 Sporadic wrong results on ppc-vxworks

  Problem:    In some extremely specific circumstances, the code compiled
              with -O2 for ppc-vxworks is interrupt unsafe for a short
              window of 2 or 3 instructions at the very end of a subprogram.
              This results in very sporadic failures like a function returning
              a wrong result once out of millions of calls.

  Status:     This was fixed in 5.03 on 2004-08-10

  Workaround: Lower the optimization level to at least -O1.

KP-502a1-D630-010 Compiler abort with -gnatn on inlining from child unit

  Problem:    Compiler aborts when the context of the compilation includes
              a child unit that contains an instantiation that exports
              an inlined function.

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

  Workaround: Compile unit without setting the -gnatn switch.

KP-502a1-D626-001 Extra paren for array aggregate from gnatpp

  Problem:    The output generated by gnatpp may have an extra "(" for
              an array aggregate if this aggregate is an initialization
              expression in an object declaration containing a constrained
              array definition

  Status:     This was fixed in 5.03 on 2004-07-06

  Workaround: Remove the wrong "(" from the gnatpp result manually.

KP-502a1-D625-009 Problem with assignment of controlled slices

  Problem:    Compiler may generate incorrect code for an overlapping slice
              assignment for an array of controlled types.

  Status:     This was fixed in 5.03 on 2004-06-26

  Workaround: Use a loop instead of a slice assignment.

KP-502a1-D625-007 Ada.Strings.Maps has an improper declaration

  Problem:    The declaration of package L in the spec of this package
              is extraneous and should not be present.

  Status:     This was fixed in 5.03 on 2004-06-24

  Workaround: This is in practice very unlikely to cause problems. Do not
              use this package, and if the presence of L causes ambiguities
              for references to another unit, use qualification to avoid
              the ambiguity.

KP-502a1-D625-005 Unexpected outputs with -bargs -E and traceback decorator

  Problem:    Traceback decorators returning a string longer than 1024 bytes
              sometimes trigger anomalous behavior at program termination time
              when -bargs -E is used and the termination is triggered by an
              unhandled exception.

  Status:     This was fixed in 5.03 on 2004-07-16

  Workaround: Adjust the traceback decorator to ensure it never returns a
              string longer than 1024 bytes.

KP-502a1-D624-009 Compiler aborts on circular type declaration

  Problem:    Compiler aborts when processing a completion of a private type
              T1 when one of its components is a private type T2 whose
              completion is a record type with a component of type T1.

  Status:     This was fixed in 5.03 on 2004-06-25

  Workaround: Do not write such illegal declarations.

KP-502a1-D623-017 Wrong code generated for assignment of packed subcomponents

  Problem:    Compiler may generate incorrect code for an assignment whose
              left-hand side has the form A.B.C (I), if A is a discriminated
              record, and B is declared in one of its variants.

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

  Workaround: Expand assignment into retrieval of packed array, assignment
              to its component, and storage of the full array into record.

KP-502a1-D622-014 Problem with tasking constructs and no abort restrictions

  Problem:    When using timed entry calls or select-or-terminate constructs
              and the following restrictions: No_Abort_Statements,
              Max_Asynchronous_Select_Nesting => 0, the time out code is
              never executed, or the terminate alternative is not handled
              properly.

  Status:     This was fixed in 5.03 on 2004-12-20

  Workaround: Do not use the mentioned restrictions in this context.

KP-502a1-D622-011 Compiler fails to reject illegal homonym

  Problem:    Compiler fails to reject an object declaration when the current
              scope includes a homonym that is a subprogram renaming
              declaration or a subprogram instance.

  Status:     This was fixed in 5.03 on 2004-06-25

  Workaround: Do not write such illegal declarations.

KP-502a1-D622-009 Compiler fails to reject illegal renaming of attribute

  Problem:    Compiler accepts a subprogram renaming declaration that
              renames an attribute reference, when the attribute reference
              is followed by expressions that mimic the presence of formal
              parameters.

  Status:     This was fixed in 5.03 on 2004-06-24

  Workaround: Do not use this illegal form.

KP-502a1-D618-021 Unnecessary secondary stack usage

  Problem:    If a function F returns a constrained array type T, and
              type T2 derives T, the inherited function F for T2 uses
              the secondary stack for its returned value.

  Status:     This was fixed in 5.03 on 2004-06-21

  Workaround: Introduce explicit declaration for F.

KP-502a1-D618-014 gnatlink -C with --RTS=

  Problem:    When gnatlink is invoked with a binder generated file in C,
              and when the main has been compile with a --RTS= switch,
              the compilation of the binder generated file may fail.

  Status:     This was fixed in 5.03 on 2004-06-21

  Workaround: Create the binder generated file in Ada when --RTS= is used.

KP-502a1-D618-006 abort 516 on record extension with packed private component

  Problem:    On some platforms, declaring a record extension with an
              additional component of a packed private type may trigger
              a gigi abort 516 compiler crash.

  Status:     This was fixed in 5.03 on 2004-07-04

  Workaround: Remove the pragma Pack on the type of the component included
              in the extension, or make that type not private.

KP-502a1-D617-011 Debugger fails to step into DLL

  Problem:    On Windows, stepping into a function exported by a DLL
              doesn't work. The debugger steps over the function call.

  Status:     This was fixed in 5.03 on 2004-06-23

  Workaround: Insert a breakpoint inside the function and continue.

KP-502a1-D617-010 Alignment problem with Ada.Storage_IO

  Problem:    On machines requiring strict alignment, the implementation
              approach used in Ada.Storage_IO may fail with a bus error
              if the alignment of Elmt is greater than 1.

  Status:     This was fixed in 5.03 on 2004-06-20

  Workaround: Ensure that the target buffer that is used in Read and
              Write calls has at least the alignment required by Item.

KP-502a1-D617-006 Problem with pragma atomic on derived type

  Problem:    If a type is derived from a type for which an alignment
              is given, and pragma Atomic is specified for the derived
              type, the alignment is inherited and not overridden as
              required for atomic access.

  Status:     This was fixed in 5.03 on 2004-06-17

  Workaround: Avoid the use of a derived type, instead redefine the
              type from scratch, or avoid the Alignment clause prior
              to the derivation.

KP-502a1-D615-007 Spurious error on inherited operation in formal package

  Problem:    In an instance, the compiler may reject the use of a primitive
              operation of a formal derived type that is the actual for a
              formal package of the instance.

  Status:     This was fixed in 5.03 on 2004-06-19

  Workaround: Introduce an explicit body for the operation.

KP-502a1-D611-008 Incorrect size for object not rejected

  Problem:    The size for an object must always be a multiple of the
              alignment. This results in a minimum acceptable size that
              is some multiple of the alignment. A size clause that
              attempts to set a smaller size should be rejected, but
              in some cases was accepted and then ignored. For example
              an object whose underlying length is 264 bits, if given
              a specific alignment of 16, requires a minimum size of
              384 (the smallest multiple of 8*16 that is not less than
              264). Any attempt to set a smaller size than 384 should
              be rejected.

  Status:     This was fixed in 5.03 on 2004-09-26

  Workaround: Do not write a size clause that violates the rule that the
              size of an object must be a multiple of its alignment.

KP-502a1-D608-009 Unable to switch from task to task in debugger on HP/UX

  Problem:    When debugging a program by using a core file that has
              been generated using the gcore utility, the debugger is
              unable to switch from task to task.

  Status:     This was fixed in 5.03 on 2004-06-08

  Workaround: Use the fixcore utility on your core file before using it
              in the debugger.

KP-502a1-D604-018 Crash from gnatbind when computing checksum

  Problem:    In some circumstances, when source consistency is checked
              and a source have had its time stamp modified after compilation
              gnatbind may crash.

  Status:     This was fixed in 5.03 on 2004-06-07

  Workaround: Recompile the sources with the changed time stamps.

KP-502a1-D603-021 HPUX 11.11 symbolic traceback crashes executable

  Problem:   When asking the translation between a trace back array and
             symbolic information, if the executable is found via the
             search path of the shell (e.g. PATH), then the symbolic
             translation crashes the executable with a message
             "No such file or directory".

  Status:     This was fixed in 5.03 on 2004-06-07

  Workaround: Link with the libaddr2line of the corresponding HP UX 11.00
              package. You will find this library in:
              lib/gcc-lib/hppa1.1-hp-hpux11.00/3.2.3.

KP-502a1-D603-001 Spurious error with convention C and derived boolean

  Problem:    Compiler rejects a pragma Convention (C) on a type derived
              from Boolean, if the context includes a library unit that is
              a subprogram with a Boolean parameter or a Boolean result.

  Status:     This was fixed in 5.03 on 2004-06-28

  Workaround: Place the subprogram within a package.

KP-502a1-D602-015 Bad handling of non-byte aligned bit-packed arrays

  Problem:    The documentation indicates that components need not be byte
              aligned in records, but in fact packed arrays longer than 64
              bits are an exception. Such component clauses are accepted,
              but either cause a compiler abort or wrong results.

  Status:     This was fixed in 5.03 on 2004-06-22 by adding
              an appropriate diagnostic and rejecting the component clause.

  Workaround: Large packed arrays must be byte aligned. Possible work arounds
              are to divide the array into several small arrays, none of which
              is longer than 64 bits, or to represent the entire record as a
              bit array and use bit slices as necessary.

KP-502a1-D602-014 gnatpp '-o' and '-of' options do not work

  Problem:    gnatpp does not create the result file when called with '-o'
              or '-of' option. This is the regression introduced on
              May 17, 2004.

  Status:     This was fixed in 5.03 on 2004-06-03

  Workaround: Use another gnatpp option for output file control and then
              rename the output file manually

KP-502a1-D529-001 External_Name parameter does not allow static string expr

  Problem:    The External_Name parameter of pragmas such as Import_Function
              requires a string literal, while the documentation indicates
              that a general static string expression (e.g. the concatenation
              of two static strings) should be allowed.

  Status:     This was fixed in 5.03 on 2004-06-12

  Workaround: Perform the concatenation manually and use a string literal
              instead of a static concatenation.

KP-502a1-D527-005 Compiler abort on instantiation with intrinsics

  Problem:    Compiler aborts when a generic with a private formal type T
              and two formal operators returning T, is instantiated with a
              private type whose actual subprograms are declared intrinsic,
              and the body of the generic includes expressions that combine
              both operators.

  Status:     This was fixed in 5.03 on 2004-06-02

  Workaround: Provide the trivial bodies for the subprograms, and mark them
              Inline or Inline_Always.

KP-502a1-D526-019 Wrong behavior on entry call failure in exception handler

  Problem:    Using a ZCX runtime library, an entry call to an about to
              terminate task from an exception handler sometimes triggers
              unexpected behavior like an exception raised from s-intman.adb
              instead of a regular Tasking_Error. This problem is sensitive
              to timing variations and so may not reproduce systematically.

  Status:     This was fixed in 5.03 on 2004-06-10

  Workaround: Use the alternate SJLJ runtime library.

KP-502a1-D524-013 Bogus elaboration circularity

  Problem:    If a type is declared that references a function in another
              unit, then in some cases declaring a variable of this type
              in the same unit will cause a bogus elaboration circularity
              with the unit claiming it needs to elaborate itself.

  Status:     This was fixed in 5.03 on 2004-06-12

  Workaround: Add an explicit Elaborate_All for the unit that declares
              the function.

KP-502a1-D521-006 GNAAMP compiler blows up on unchecked conversion to byte array

  Problem:    On the AAMP target only, an unchecked conversion from a value
              that is not a byte array to a packed byte array type causes
              the compiler to raise an exception.

  Status:     This was fixed in 5.03 on 2004-05-25

  Workaround: Declare an access type designating the byte array type and
              an unchecked conversion with System.Address as the source
              type and the access type as the target type. Replace the
              original conversion with an unchecked conversion from
              source_operand'Address to the access type, and dereference
              the result of the conversion.

KP-502a1-D518-011 Crash on aliased global declaration with variable bound

  Problem:    Declaring an aliased global array/string with a variable bound
              and an "others" initializer sometimes causes a compiler crash,
              whatever the optimization level.

  Status:     This was fixed in 5.03 on 2004-08-11

  Workaround: Declare an explicit subtype and an explicit temporary for the
              initializer.

KP-502a1-D517-010 Incorrect AAMP linker warning for universal modules

  Problem:    On the AAMP target only, the linker can issue an incorrect
              warning "Module xxx is linked outside DENV 0 but was not
              compiled with the UNIVERSAL_DATA option" even though the
              named module was compiled with universal addressing (-univ).

  Status:     This was fixed in 5.03 on 2004-05-19

  Workaround: The warning can be ignored if the indicated module was
              compiled with universal addressing. The warning can be
              avoided for any such modules by editing the .asm files
              to move the ".INFO 'Universal'" line in front of the
              "CU_BEGIN." directive, reassembling the modules, and
              relinking the program.

KP-502a1-D517-004 Restriction_Warning sets real restriction

  Problem:    If pragma Restriction_Warning is used, then the affected
              restrictions are handled correctly (warning but no error
              on violation) within the unit containing the pragma, but
              the binder still treats the unit as contributing a real
              restriction, and so the bind may fail with a fatal error.

  Status:     This was fixed in 5.03 on 2004-05-22

  Workaround: Compile twice, once with the pragma to get the warnings
              and once without, to get the file to be passed to the binder.

KP-502a1-D514-008 Corruption of finalization list

  Problem:    If several tasks perform assignments to (possibly different)
              controlled objects concurrently, the finalization list
              pointers that link all such objects may be incorrectly
              updated, leading to subsequent incorrect memory accesses.

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

  Workaround: In some cases this problem may be worked around by
              applying pragma Finalize_Storage_Only to the relevant
              controlled type.

KP-502a1-D508-002 Line too long msg when using -gnatyM

  Problem:    If the first line of a file is a line of minuses (like the
              GNAT source file header line), then an excessively long line
              following this may be diagnosed as too long, even if there
              is a -gnatyMnnn style switch to allow lines this long.

  Status:     This was fixed in 5.03 on 2004-05-08

  Workaround: Add a blank line at the start of the source file.

KP-502a1-D507-012 gnatelim eliminates exported subprograms

  Problem:    gnatelim eliminates subprograms that are not used in the Ada code,
              but that are exported in another language. Eliminate pragmas
              generated for such subprograms may cause link-time errors

  Status:     This was fixed in 5.03 on 2004-05-10

  Workaround: Remove wrong Eliminate pragmas from the configuration file

KP-502a1-D507-010 Compiler crash on out-of-range subtype in case alternative

  Problem:    If a subtype is declared with an upper bound outside of the
              range of its base subtype, and the name of the subtype is
              used as a choice in a case alternative, the compiler crashes.

  Status:     This was fixed in 5.03 on 2004-05-28

  Workaround: Correct the wrong bound in the subtype declaration.

KP-502a1-D506-002 New line incorrectly added to text_io append file

  Problem:    When a file is opened in append mode, and nothing is written
              to the file, then a new line is added when the file is closed.

  Status:     This was fixed in 5.03 on 2004-05-09

  Workaround: Avoid opening the file unless data is to be written.

KP-502a1-D505-018 Compiler complains about long lines in a configuration file

  Problem:    Compiler does not allow a configuration file to contain a line
              that is longer then 255 characters. This may lead to a problem
              for pragmas automatically generated by tools to be placed into
              the configuration file.

  Status:     This was fixed in 5.03 on 2004-05-09

  Workaround: Avoid long lines in the configuration file.

KP-502a1-D504-003 Undefined result for GNAT.OS_Lib.File_Time_Stamp

  Problem:    When the name of a non-existing file is passed to
              GNAT.OS_Lib.File_Time_Stamp, an undefined result is returned.

  Status:     This was fixed in 5.03 on 2004-05-05

  Workaround: First test whether the file exists with a call to
              Is_Regular_File.

KP-502a1-D428-003 Asm_Output for variable with known value causes gigi abort

  Problem:    Using a variable as an Asm_Output argument at a point where
              the variable has a compile known value triggers a gigi
              abort 516 internal compiler error.

  Status:     This was fixed in 5.03 on 2004-05-03

  Workaround: Arrange for the variable not to have a compile time known value
              at the point where it is used as an Asm_Output argument, for
              instance by assigning the value returned by a function call.

KP-502a1-D415-012 Unnecessary recompilation when No_Run_Time pragma used

  Problem:    When the No_Run_Time pragma is used, then in some cases, the
              compiler does unnecessary extra compilations.

  Status:     This was fixed in 5.03 on 2004-05-12

  Workaround: Use the preferred approach of configuring the run-time library
              to contain the required components.

KP-502a1-D415-011 Derived protected types incorrectly treated as unconstrained

  Problem:    Compiler rejects an array declaration when the component type
              is a derived protected type whose parent is discriminated, and
              the derivation provides discriminant constraints.

  Status:     This was fixed in 5.03 on 2004-04-15

  Workaround: Declare a constrained subtype rather than a derived type.

KP-502a1-D409-013 GNAAMP does not handle Link_Name arguments correctly

  Problem:    On the AAMP target only, the compiler doesn't correctly
              handle Link_Name arguments on interfacing pragmas (Import,
              Export), and a leading '*' character is emitted in the
              assembly for any references to the entity, which causes
              the MACASM assembler to fail.

  Status:     This was fixed in 5.03 on 2004-04-09

  Workaround: Use the External_Name argument on the pragma rather than
              giving a Link_Name argument.

KP-502a1-D408-005 Tru64 - Interrupting a program attached in the debugger.

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

  Status:     This was fixed in 5.03 on 2004-07-16

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

KP-502a1-D408-001 GDB incorrectly indexes packed array through pointer

  Problem:    If AP is an access value referencing a packed array, GDB
              gets incorrect values for AP(i), and for AP.all.

  Status:     This was fixed in 5.03 on 2004-04-08

  Workaround: You can still print the array itself with 'print AP.all'.

KP-502a1-D407-005 wrong date results in AAMP version of Ada.Calendar.Split

  Problem:    On the AAMP target only, when Ada.Calendar.Split is passed
              Time values corresponding to the first day of a month it
              returns incorrect results.

  Status:     This was fixed in 5.03 on 2004-04-07

  Workaround: Edit the Split function within the AAMP version of a-calend.adb
              and replace the <= test with < in the loop that determines the
              month, and recompile the unit with this modification.

KP-502a1-D326-014 Inability to interrupt a program attached in the debugger.

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

  Status:     This was fixed in 5.03 on 2004-03-30

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

KP-502a1-D326-001 Compiler crashes on packed slice in nested function call.

  Problem:    Compiler aborts when a slice of a bit-packed array is an actual
              in a function call, and the call is an actual of an enclosing
              procedure call.

  Status:     This was fixed in 5.03 on 2004-03-29

  Workaround: Introduce a temporary variable to hold value of slice.

KP-502a1-D325-004 Compiler crashes on equality with overloaded operands

  Problem:    Compiler aborts on an equality written as a function call, when
              the function renames a predefined equality, and both operands are
              overloaded function calls.

  Status:     This was fixed in 5.03 on 2004-03-26

  Workaround: Qualify the operands with the single matching type.

KP-502a1-D324-008 Problem debugging programs using tasks (alpha-tru64 5.1b)

  Problem:    When debugging a program that uses tasks, and trying to
              switch to an inactive task, the debugger sometimes prints
              a warning (Hit heuristic-fence-post without finding
              enclosing function for address ...). It is also unable
              to compute the full callstack for that task. This only
              occurs on Tru64 5.1b, earlier versions of Tru64 do not
              cause the problem to appear.

  Status:     This was fixed in 5.03 on 2004-03-31

  Workaround: Set a breakpoint in the task that needs to be examined,
              and continue the execution of the application until the
              breakpoint is hit.

KP-502a1-D323-008 Call in component definition leads to wrong elaboration order

  Problem:    The binder can choose an incorrect elaboration order when a call
              to a function in a withed unit occurs within the constraint of
              a record component.

  Status:     This was fixed in 5.03 on 2004-03-24

  Workaround: Declare a constant initialized to the result of the function
              prior to the component's record type, and use the constant
              in the component constraint in place of the function call.
              Alternatively, add a pragma Elaborate_All for the unit
              containing the function.

KP-502a1-D322-004 Minimal recompilation fails to recompile

  Problem:    Adding white space in the middle of a token such as
              an identifier or a reserved word did not trigger
              recompilation when using "gnatmake -m".

  Status:     This was fixed in 5.03 on 2004-03-30

  Workaround: Use gnatmake without -m

KP-502a1-D322-003 Compiler crashes on mutual inlining with -gnatN -O2

  Problems:   Compiler may abort when a package body which is not the main
              unit is compiled to obtain the bodies of inlined subprograms,
              and one of these subprograms has a call to an inlined function
              declared in the main unit.

  Status:     This was fixed in 5.03 on 2004-03-27

  Workaround: Compile this unit without front-end inlining, or remove pragma
              Inline from one of the operations involved.

KP-502a1-D319-016 Compiler or linker complains about correct Eliminate pragmas

  Problem:    Some (correct) Eliminate pragmas may cause wrong compiler or
              linker diagnostic.

  Status:     This was fixed in 5.03 on 2004-04-20

  Workaround: Remove pragmas causing generation of wrong diagnostic messages.

KP-502a1-D318-015 Cannot set breakpoint inside procedure with no spec

  Problem:    The debugger is unable to set a breakpoint inside a
              procedure if that procedure is a child unit with no
              corresponding spec.

  Status:     This was fixed in 5.03 on 2004-03-21

  Workaround: Add the spec for this procedure.

KP-502a1-D317-009 Long strings in configuration file cause gnatdist error

  Problem:    The use of long string literals (>50 characters) in a gnatdist
              configuration file can result in a compilation error of the
              form "this line is too long".

  Status:     This was fixed in 5.03 on 2004-03-24

  Workaround: Such long string frequently comes from a long directory name.
              Rename the directory or define a symbolic link when possible.

KP-502a1-D317-003 Uninitialized sect_index gdb-internal-error

  Problem:    On Tru64, GDB sometimes reports an internal error about an
              unitialized section when reading the symbols. The error
              message will be look like "sect_index_data not initialized"
              or "Section index is uninitialized".

  Status:     This was fixed in 5.03 on 2004-08-19

  Workaround: Ignore the error message, and continue the debugging session.

KP-502a1-D317-002 Use of -gnatN can cause undefined link symbol

  Problem:    A program may fail to link if the context of the main program
              includes a nested instantiation, the original generic package
              contains an inlined subprogram, and the whole program is compiled
              with front-end inlining.

  Status:     This was fixed in 5.03 on 2004-03-18

  Workaround: Remove Inline pragma from subprogram in generic package.

KP-502a1-D316-003 Compiler accepts illegal 'Tag attribute reference

  Problem:    It is illegal to apply a 'Tag attribute reference to an object
              of a specific tagged type (the attribute reference is legal for
              an object of a classwide type, or for a specific or classwide
              subtype). GNAT would accept an illegal 'Tag attribute reference
              when its prefix was a view conversion to a specific tagged type.

  Status:     This was fixed in 5.03 on 2004-02-22

  Workaround: Make the code legal by using a conversion to a classwide type
              instead of the conversion to a specific tagged type.

KP-502a1-D312-002 NT distribution lacks as.exe and ld.exe in bin directory

  Problem:    The tools as.exe and ld.exe are not present in the binary
              directory of the NT distribution. Certain tools, e.g. gnatdll,
              rely on them being found there.

  Status:     This was fixed in 5.03 on 2004-03-12

  Workaround: Copy these tools from
              <gnat root>\lib\gcc-lib\pentium-mingw32msv\3.2.3
              into <gnat root>\bin

KP-502a1-D309-019 GLADE does not use ada_source_path or ada_object_path files

  Problem:    When GLADE is built with a GNAT environment located in a
              directory different from the one used to invoke gnatdist
              ada_source_path or ada_object_path files are not taken into
              account.

  Status:     This was fixed in 5.03 on 2004-03-25

  Workaround: Use ADA_INCLUDE_PATH/ADA_OBJECT_PATH instead or rebuild GLADE
              with the GNAT environment used to invoke gnatdist.

KP-502a1-D308-004 Debug pools do not take implicit dereferences into account

  Problem:    When the GNAT.Debug_Pools.Debug_Pool storage pool is used
              to detect incorrect accesses to unallocated or deallocated
              memory locations, an implicit dereference that is the prefix
              of a selected component is not subject to checking.

  Status:     This was fixed in 5.03 on 2004-03-11

  Workaround: Replace implicit dereferences in selected components with
              explicit dereferences (e.g. change A.B to A.all.B).

KP-502a1-D305-009 Wrong debug information for subrange types in records

  Problem:    When using dwarf-2 debugging information and optimization,
              gdb reports wrong information when printing the types and
              values of fields in a record when their type is a subrange
              of an integral type.

  Status:     This was fixed in 5.03 on 2004-05-17

  Workaround: Use stabs+ debugging information, or compile with no optimization

KP-502a1-D304-003 GNAAMP fails on elements of a composite packed component

  Problem:    On the AAMP target only, the compiler blows up when generating
              code to address components of a composite record component
              that is packed on a nonword boundary.

  Status:     This was fixed in 5.03 on 2004-03-25

  Workaround: Avoid giving a pragma Pack on a record type that would put
              a composite component on a nonword boundary, or give an
              explicit component clause that positions the composite
              component on a word boundary.

KP-502a1-D302-007 GNAAMP gives incorrect code for 'Address of packed component

  Problem:    On the AAMP target only, when applying the Address attribute
              to a packed component, the compiler generates the address of
              first word of the containing object rather than the address
              of the word where the component starts.

  Status:     This was fixed in 5.03 on 2004-03-25

  Workaround: Adjust the address by adding the value of Obj.Component'Position
              to the result of 'Address (which will require using unchecked
              conversions or use of operations in System.Storage_Elements).

KP-502a1-D229-003 Asis.Extensions.Original_Line_Number problem

  Problem:    Asis.Extensions.Original_Line_Number blows up if for its argument
              Element Is_Text_Available is False

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

  Workaround: Manually check Is_Text_Available before applying this
              ASIS Extensions query

KP-502a1-D223-006 Problem with eliminating subprograms declared in blocks

  Problem:    If a pragma Eliminate is applied to a subprogram declared in a
              block statement, the compiler does not eliminate this subprogram.
              As a result, if the body of such a subprogram contains a call to
              some other eliminated subprogram, this call causes is considered
              as a bug and the corresponding diagnostic message is generated.

  Status:     This was fixed in 5.03 on 2004-02-24

  Workaround: Remove the Eliminate pragma the compiler complains about.

KP-502a1-D219-009 Incorrect diagnostic for out of range case choice

  Problem:    If a subtype name is used as a choice in a case statement, and
              the range of values for this subtype is outside the range of
              the subtype for the case statement, the diagnostic is placed
              on the declaration of this subtype, rather than on the choice.

  Status:     This was fixed in 5.03 on 2004-02-28

  Workaround: Correct the illegal choice in the case statement.

KP-502a1-D218-009 wrong backtrace in prologue (SPARC 64)

  Problem:    On SPARC v9 architectures, the debugger is not able to
              get a complete backtrace if the debuggee is stopped inside
              the prologue.

  Status:     This was fixed in 5.03 on 2004-02-24

  Workaround: Use nexti to skip the prologue.

KP-502a1-D216-010 Compiler crashes on x86 with -fPIC/Asm forcing const to mem

  Problem:    On x86 architectures, if you have a machine code insertion with
              a constraint of "m", the operand is a constant, and the -fPIC
              switch is used, the compiler will produce an internal error.

  Status:     This was fixed in 5.03 on 2004-02-18

  Workaround: Copy the constant to a variable and pass that variable as
              the input.

KP-502a1-D213-002 ASIS Corresponding_Generic_Element problem

  Problem:    ASIS Corresponding_Generic_Element returns Nil_Element when
              applied to the defining name from the formal package with
              a box.

  Status:     This was fixed in 5.03 on 2004-02-17

  Workaround: Use other ASIS structural and semantic queries to compute the
              corresponding generic element in this case.

KP-502a1-D212-001 ASIS Corresponding_Name_Definition problem

  Problem:    ASIS Corresponding_Name_Definition returns wrong result if it is
              applied to a reference to an implicit record component, and this
              reference is a part of expanded generic code, and the derived type
              declaration this component belongs to contain a discriminant
              constraint including generic formal object.

  Status:     This was fixed in 5.03 on 2004-02-12

  Workaround: Use other ASIS structural and semantic queries to compute the
              defining identifier.

KP-502a1-D211-008 Problem inserting a breakpoint inside a function

  Problem:    When inserting a breakpoint on a function, GDB sometimes
              incorrectly inserts the breakpoint after the first line
              of source code, instead of immediately before. This only
              is limited to powerpc targets.

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

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

KP-502a1-D206-010 GNAAMP generates incorrect code for fixed/integer division

  Problem:    On the AAMP target only, the compiler generates a DIV_FIXED
              macro for the division of a fractional fixed-point value by
              an integer, when it should generate an integer division.

  Status:     This was fixed in 5.03 on 2004-02-09

  Workaround: Convert the right Integer operand of the division to a
              fixed-point type.

KP-502a1-D203-002 -I option does not work in gnatelim

  Problem:    -I option does not work in gnatelim (it just does not have
              any effect)

  Status:     This was fixed in 5.03 on 2004-06-07

  Workaround: Use the project file to specify the source directories and
              call gnatelim through the GNAT driver.

KP-502a1-D202-019 GNAAMP gives invalid error on type with multiple discriminants

  Problem:    Using the GNAAMP compiler only, an incorrect error is issued
              when compiling a variant record type with more than one
              discriminant. The error message complains about missing
              parameters on a call to an internally generated function.

  Status:     This was fixed in 5.03 on 2004-02-12

  Workaround: Change the type to only have one discriminant and change the
              other discriminants to normal components if possible. If there
              are array components depending on those discriminants, it may
              be necessary to declare fixed-size array components large
              enough to account the maximum values of the discriminants.

KP-502a1-D202-017 GNAAMP complains about type mismatch on discriminated record

  Problem:    Using the GNAAMP compiler only, an invalid error message is
              issued when compiling the full type declaration for a private
              type with discriminants when the full type has an array
              component that depends on a discriminant. This only occurs
              when discriminants are declared on both the private and full
              types.

  Status:     This was fixed in 5.03 on 2004-04-14

  Workaround: If the discriminants are not required on the private type,
              then remove the private type's discriminant part. Otherwise,
              remove the private type and move the full type to the visible
              part.

KP-502a1-D202-015 GNAAMP generates incorrect code for indexing absolute array

  Problem:    On the AAMP target only, the compiler generates code for
              volatile rather than absolute addressing when assigning to
              an indexed element of an array object located by an address
              clause at an absolute address.

  Status:     This was fixed in 5.03 on 2004-02-04

  Workaround: Declare an access type for the array, and initialize an access
              object to the required absolute address (using a call to
              System'To_Address and an unchecked conversion to the access
              type). Use the access object for accesses to the object.

KP-502a1-D129-008 GNAAMP compiler blows up on indexing of absolute object

  Problem:    On the AAMP target only, the compiler fails when translating
              an indexed load from an object located by an address clause at
              an absolute address.

  Status:     This was fixed in 5.03 on 2004-02-04

  Workaround: Declare an access type for the array, and initialize an access
              object to the required absolute address (using a call to
              System'To_Address and an unchecked conversion to the access
              type). Use the access object for accesses to the object.

KP-502a1-D123-022 GNAAMP suppresses Block_End INFO records for blocks with -O1

  Problem:    On the AAMP target only, the back end deletes Block_End INFO
              records for block statements when compiling with optimization.

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

  Workaround: Compile the unit without optimization.

KP-502a1-D119-009 GDB ppc: wrong float return value after 'finish'

  Problem:    On PPC targets, after doing a 'finish' in a function returning
              a 32-bits float type, GDB prints a wrong return value if the
              host and the target have a different floating-point
              representation.

  Status:     This was fixed in 5.03 on 2004-04-28

  Workaround: Modify the code to store the return value in a variable and print
              this variable.

KP-502a1-D116-011 GNAAMP fails on 32-bit indexing of packed byte arrays

  Problem:    On the AAMP target only, the compiler blows up when indexing
              a packed array of bytes with a 32-bit index type.

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

  Workaround: Use a 16-bit index type for the array.

KP-502a1-D116-001 ASIS Corresponding_Declaration problem

  Problem:    ASIS Corresponding_Declaration query blows up if applied to
              a renaming-as-declaration.

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

  Workaround: Compute the result of this function manually by using other
              ASIS structural and semantic queries.

KP-502a1-D112-005 Wrong value observed for a global object with Size clause

  Problem:    When a Size clause applies to an initialized library level
              variable, the value observed from client units before other
              assignments take place may differ from the initialization
              value.

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

  Workaround: Remove the Size clause or apply it to the object's subtype.

KP-502a1-D109-003 GDB segfaults when reading changed symbol file

  Problem:    When an executable is changed while GDB is being used to
              debug it, GDB will detect the change when next asked to
              run the program and will then attempt to reload the
              changed file. If the user has set watchpoints or
              conditional breakpoints, and if changes in the symbols
              defined in the executable file render the watched expressions
              or conditional expressions incorrect, GDB may corrupt its
              own data structures and crash.

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

  Workaround: This is not generally a serious problem, since it occurs only
              when re-starting a program, so that little work gets lost by
              having to restart GDB. In the rare event you anticipate
              the such an error in advance, delete the offending watchpoints
              or breakpoints or remove the offending conditions before
              a 'run' command that would cause the executable to be reloaded.

KP-502a1-D106-011 Compiler error if null system.ads file

  Problem:    Compiler aborts after long series of error messages if
              empty system.ads file is in the path.

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

  Workaround: Remove incorrect system.ads file, and make sure that the
              correct system.ads file is on the path.

KP-502a1-D105-004 gnatpp blows up on a record or private extension

  Problem:    If a record or private extension follows a discriminant
              constraint, gnatpp generates a wrong output and it may hang up
              or blow up on big sources.

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

  Workaround: If possible, comment out or replace the corresponding constructs
              in the argument source and then put them back (with manual
              reformatting) it the result source generated by gnatpp.

KP-502a1-D105-003 gnatpp blows up on a qualified expression

  Problem:    If a qualified expression contains a character literal as an
              expression, gnatpp generates a wrong output and it may hang up
              or blow up on big sources.

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

  Workaround: Comment out or replace the corresponding constructs in the
              argument source and then put them back (with manual reformatting)
              it the result source generated by gnatpp.

KP-502a1-D104-002 Debugger prints enumeration types as integers

  Problem:    In a program built with dwarf-2, GDB is unable to print
              the value of variables whose type is derived from an
              enumeration type. The value is printed as an integer
              rather than an enumerated type.

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

  Workaround: Compile the program with stabs instead of dwarf-2.

KP-502a1-D104-001 gnatpp blows up on range constraint

  Problem:    If a range constraint is a component of a delta or digits
              constraint, gnatpp corrupts the reformatted source (the result
              is not a correct Ada code) and may itself to hang up.

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

  Workaround: Comment out the corresponding constructs in the argument source
              and then put them back (with manual reformatting) it the result
              source generated by gnatpp.

KP-502a1-CC19-012 VxWorks stack check not working for the environment task

  Problem:    On VxWorks, the actual stack size of the environment task
              was not known. Hence, stack checking was not working
              correctly.

  Status:     This was fixed in 5.03 on 2004-03-16

  Workaround: Avoid compiling units belonging to the environment task with
              the -fstack-check switch.

KP-502a1-CC15-005 Problem with step/next with stack allocation

  Problem:    In the debugger, when doing a step over/into a line
              the inferior may not stop on the expected location
              if in this line an object is allocated on the stack.
              This problem is powerpc-specific.

  Status:     This was fixed in 5.03 on 2004-02-24

  Workaround: Use a breakpoint to step over/into this kind of lines.

KP-502a1-CB30-006 Debugger does not stop at exception breakpoint

  Problem:    On x86-linux RedHat 9, setting a breakpoint on a specific
              exception such as Constraint_Error for instance does not
              always cause the debugger to stop when such exception is
              raised.

  Status:     This is not fixed yet

  Workaround: Insert a breakpoint on all exceptions instead of setting
              a breakpoint on a specific one.

KP-502a1-CB27-002 Incorrect elaboration handling for renamed subprogram

  Problem:    If a renamed subprogram is called from elaboration code,
              and the static (default) model of elaboration is used, the
              compiler attempts to place an implicit elaborate all on the
              unit containing the renamed subprogram, rather than on the
              unit containing the renaming declaration. This can result
              in an incorrect elaboration order, since this attempt is
              ignored if there is no WITH for the referenced unit.

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

  Workaround: Include a WITH statement for the unit containing the renamed
              subprogram to the unit containing the call.

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

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

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

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

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

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

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

  Workaround: Use the name of the renamed object.

KP-502a1-CB10-008 GNAAMP fails on Inline_Always subprograms in generic instance

  Problem:    On the AAMP target only, the linker gets an unresolved reference
              when linking a program with calls to a generic instance if the
              called subprograms are marked as Inline_Always.

  Status:     This was fixed in 5.03 on 2004-10-18

  Workaround: Remove the Inline_Always pragma for the offending subprogram.

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

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

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

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

KP-502a1-CA23-013 Compiler crashes on constrained array aggregate

  Problem:    If a constrained array type is declared in one package, and an
              aggregate with an 'others' choice for that array type is used
              in another package, an internal compiler error is triggered if
              the compiler is running in configurable run-time mode.

  Status:     This was fixed in 5.03 on 2004-02-17

  Workaround: Replace the others choice by an explicit choice list.

KP-502a1-CA15-012 Improper code for complex nested record case with inlining

  Problem:    If a record has a size of 64 bits and that record is placed
              as a field of another record and misaligned using a record
              representation clause on a machine with strict alignment
              requirements and a function is passed the first record type
              and accesses the inner fields and that function is inlined,
              internal aliasing information will be incorrect and may cause
              instructions to be improperly scheduled resulting in incorrect
              data being referenced.

  Status:     This was fixed in 5.03 on 2004-03-04

  Workaround: Use -fno-strict-aliasing.

KP-502a1-C915-015 Compiler crashes on dead case statement with -Wuninitialized

  Problem:    If the optimization level is -O1 or higher and the switch
              -Wuninitialized is used. Then the compiler may crash on an
              internal error in function build_Insn_Chain if there is a
              case statement in dead code.

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

  Workaround: Remove the dead code or avoid the use of -Wuninitialized

KP-502a1-C625-001 waveInOpen/waveOutOpen have wrong specs

  Problem:    The specs, as defined in the Win32Ada binding (Win32-Mmsystem),
              are not correct. The third parameter is defined as a
              LPCWAVEFORMAT but it must be a LPCWAVEFORMATEX.

  Status:     This was fixed in 5.03 on 2004-03-03

  Workaround: Define and import the right specs in your application

KP-502a1-C516-015 GDB is unable to print slice of very large array

  Problem:    Some Ada code uses an idiom in which a pointer whose type
              indicates that it is pointing to a very large, fixed-size
              array is actually pointing (by means of an unchecked
              conversion) to a small array.  Attempting to slice the
              pointed-to array causes GDB to fetch the entire huge
              array, regardless of the size of the slice, causing GDB
              to run out of memory.

  Status:     This was fixed in 5.03 on 2004-06-28

  Workaround: Convert the pointer to a pointer-to-smaller-array, and
              then slice that.

KP-502a1-C205-006 GDB does not see local exceptions

  Problem:    GDB never sees an exception that is local to a subprogram
              or block.

  Status:     This was fixed in 5.03 on 2004-07-07

  Workaround: Although you cannot stop specifically on a locally defined
              exception, you can still stop on all exceptions, or set
              a breakpoint in an exception handler for the exception.

KP-502a1-BA03-015 Store conditional on page GDB is watching (IRIX)

  Problem:    When debugging a program with GDB on IRIX, if one sets a
              watchpoint anywhere on a page on which the debugged program
              attempts to execute a store conditional (sc) instruction,
              the program will receive a fault.

  Status:     This behavior is unavoidable on IRIX. A description was
              added to the GDB documentation on 2004-06-18.

  Workaround: Place breakpoints before and after the code that performs
              the store conditional instructions (typically part of a
              locking sequence). At the first, disable the watchpoint,
              and re-enable it at the second.

KP-502a1-B604-006 Compiler crashes if function returns type with size overflow

  Problem:    If a function returns a type whose size is a constant but
              where the constant cannot fit within the bounds of the type
              used to represent the size, a call to that function would
              cause the compiler to crash. Instead, we now issue an error
              message.

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

  Workaround: Since this always corresponds to a case where the returned
              value would overflow storage, this should be fixed by choosing
              a more appropriate return type.

KP-502a1-B503-008 Programs with instrumented allocation crash in read-only dir

  Problem:    If a program was compiled with -lgmem instrumented allocation
              scheme for use with gnatmem, it will crash if launched from
              read-only directory.

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

  Workaround: Ensure that the directory is user-writable.
