Janus/Ada 3.1.1 Bug ListBugs are found in the Janus/Ada compiler unless otherwise noted.
- If an object name containing a type conversion and following dot notation or indexing is passed to an In Out or Out parameter, the compiler will crash (typically with a GP fault). Such a call could look like:
This type of conversion can be necessary in cases involving child packages and private components. It will work in other cases (i.e. assignment, in parameters, etc.)Get (Edit, Dialog_Type(Edit.Parent).Point_Size);
(Found in versions 3.1.1 and 3.1.1a)- Discriminant parts which conform properly may be reported as incorrect if the partial view has inherited discriminants or components.
(Found in versions 3.1.1 and 3.1.1a)- A discrete range which contains a call on a primitive function of a tagged type will cause the compiler to crash. Work around the problem by putting the result of the primitive function into a temporary object, then using that in the discrete range.
(Found in versions 3.1.1 and 3.1.1a)- If a non-simple component (such as a dynamic array) has controlled subcomponents, finalization may fail or cause a GP fault.
(Found in versions 3.1.1 and 3.1.1a)- (Corder) If Corder has been run previously on a program, and a unit contains subunits, Corder may fail to load the subunits and GP fault.
(Found in version 3.1.1a)- If the function version of Ada.Strings.Fixed.Trim (and Ada.Strings.Wide_Fixed.Trim) is called with a string whose 'First value is not 1, an incorrect answer may be returned.
(Found in version 3.1.1a)- (Syntax) The wrong source code was used to construct Syntax.Exe; therefore, several old bugs reappeared. The most important of these are:
(Found in version 3.1.1a, Windows 95/NT only)
- Some legal real numbers are rejected.
- Pretty printer indentation after a "null record" is incorrect.
- Some Ada 95 pragmas aren't recognized.
- The compiler may generate an internal error for a renames-as-body of a function. The problem is most likely for a rename of a generic function instantiation. Work around the problem by using a full subprogram body rather than the renames.
(Found in versions 3.1.1 and 3.1.1a)- Janus3 or Janus4 may generate an internal error if the new-style address clause is used.
for Something'Address use Expr;
Use the old style address clause with the compiler versions listed below.
for Something use at Expr;
(Found in versions 3.1.1, 3.1.1a, and 3.1.1b)- If a function returns an object of a limited controlled type, the generated code will call Adjust, which doesn't exist for limited controlled types. Some other routine will be called, with varying results.
(Found in versions 3.1.1, 3.1.1a, and 3.1.1b)- Storage_Error may be raised when an object is returned from a function whose return type is an unconstrained discriminated type, most likely occurring for class-wide types. The problem will be intermittent, as the allocator is using an uninitialized size.
(Found in versions 3.1.1, 3.1.1a, and 3.1.1b)- If 'Access is used on a renamed subprogram, the compiler will generate internal errors. Use 'Access on the original subprogram to work around the problem.
(Found in versions 3.1.1, 3.1.1a, and 3.1.1b)- The discriminants for a stand-alone task object are not initialized properly; random values may be read. (Found in versions 3.1.1, 3.1.1a, and 3.1.1b)
- Array length checking used the Ada 83 rule, rather than the more restrictive Ada 95 rule. This means that some multi-dimensional array assignments which ought to raise Constraint_Error were allowed.
(Found in versions 3.1.1, 3.1.1a, and 3.1.1b)- (Windows NT only) Allocation of objects larger than about 512K will always raise Storage_Error on Windows NT, even if plenty of space is available. This is caused by a quirk in the Windows heap manager; the quirk does not appear on Windows 95. The bug can affect the compiler, binder and other tools when run on Windows NT; you should not have problems unless you try to process very large program units.
(Found in versions 3.1.1, 3.1.1a, and 3.1.1b)- If an aggregate containing a "null record" part is used in a package specification, the compiler may give spurious errors (especially "symbol table full" when the specification is withed. This can happen both for extensions and regular aggregates.
(Found in versions 3.1.1, 3.1.1a, 3.1.1b, and 3.1.1c)- If a record representation clause is given on a type extension with discriminants and dependent components, wrong code can be generated. Spurious Storage_Errors or Constraint_Errors can occur.
(Found in versions 3.1.1, 3.1.1a, 3.1.1b, and 3.1.1c)- If a type extension's parent type used floating point, "Floating point library not withed" messages may occur. If the problem does occur, adding a declaration like "Bug_Fix : Float := 1.0;" to the offending package specification will work around the problem.
(Found in versions 3.1.1, 3.1.1a, 3.1.1b, and 3.1.1c)- (Corder) The upper limit on the 'K' option is smaller than intended, which prevents using the option to support long source file names.
(Found in versions 3.1.1, 3.1.1a, 3.1.1b, and 3.1.1c)- If an access type points at an incomplete type later completed by a controlled type or a type with controlled components, the wrong master will be used for finalization. This may cause allocated objects to get finalized while they still exist.
(Found in versions 3.1.1, 3.1.1a, 3.1.1b, and 3.1.1c)- An enumeration type with an enumeration representation clause which forces a signed representation may give spurious errors when used in a case statement.
(Found in versions 3.1.1, 3.1.1a, 3.1.1b, and 3.1.1c)- (Syntax) Expressions like "for I in 1..100 loop" don't pretty print properly; the first dot is duplicated.
(Found in versions 3.1.1 thru 3.1.1c.)- If a tagged private type appears in a generic library package, the compiler may crash when the unit is withed. (This does not apply to formal generic private types, only to type declared in the generic specification).
(Found in versions 3.1.1 thru 3.1.1c.)- A return statement in an accept statement will cause the compiler to abort if the task is declared directly in a package. (Found in versions 3.1.1 thru 3.1.1c.)
- (Corder) Corder fails to close all of the files it uses when checking subprogram units without specifications. If enough such units are used, Corder may crash or refuse to recognize source files. (This problem can be worked around by giving the units in question specifications).
Corder also will crash if a subunit is ignored. Always specify a source name for a subunit.
(Found in versions 3.1.1 thru 3.1.1c.)- To_Unbounded_String in Ada.Strings.Unbounded (as well as some other routines) allocate memory that they never deallocate. Therefore, long running programs using Unbounded_Strings may run out of memory. The problem is also found in the Ada.Strings.Wide_Unbounded package.
(Found in versions 3.1.1 thru 3.1.1c.)- Linking the profiler to a program may cause the program to GP fault immediately when it is run.
(Windows versions only)
(Found in version 3.1.1a only)- (Syntax) Expressions like "A:Integer range 0..3:=0;" don't pretty print properly; the colon is duplicated.
(Found in versions 3.1.1 thru 3.1.1c.)- A program which overflows the stack while allocating more than 4K of local variables at one time may GP fault rather than raise Storage_Error.
(Windows versions only)
(Found in versions 3.0.7, 3.1.1, 3.1.1a, 3.1.1d)- If the actual parameter to a procedure or entry call is a protected component with no selection or indexing, and the formal parameter mode is in out or out, the compiler may get internal errors or the resulting code may crash.
(Found in versions 3.1.1 thru 3.1.1d.)- Selection/indexing of a discriminant doesn't work. Work around the problem by making a copy of the discriminant.
(Found in versions 3.1.1 thru 3.1.1d.)- A slice assignment from a primitive function of a tagged type causes the compiler to crash. The problem can be avoided by declaring the function result as a constant in a declare block, then assigning the constant into a slice.
(Found in versions 3.1.1 thru 3.1.1d.)- Universal fixed multiplies and divides may give incorrect results if the result is directly used. Avoid the problem by type converting the result (as in Ada83) or by using one of the fixed*integer or fixed/integer operations. (The latter generate better code, too.)
- A program which creates many tasks but only has a few active at a time may raise Storage_Error when plenty of memory is available.
(Windows versions only)
(Found in versions 3.1.1 thru 3.1.1d.)- Abstract subprograms in a library package specification cause the linker to require a body for the package, even though no completions are required.
(Found in versions 3.1.1 thru 3.1.1d.)
- Resetting a file may cause a general protection fault. The problem only happens on Windows 95 (not Windows 98 or Windows NT) and only to GUI applications (not console applications). Close the file and re-open it to work around the bug.
(Found in versions 3.1.1 thru 3.1.1d.)
- If a source file name or path contains blanks, Corder mistakenly removes them when writing a batch file. This can cause problems with Make and WMake as well as Corder. While all versions of Corder contain the offending code, problems occur mainly on Windows NT or Windows 95.
Avoid paths and file names with blanks, or request a repaired version of Corder from technical support.
(Found in versions 3.1.1 thru 3.1.1d.)
- If a function declared in an instantiation of a generic unit returns a classwide type or an access to classwide type, internal compiler errors will occur on any call.
(Found in versions 3.1.1 thru 3.1.1d.)
- If an exception is raised and not handled early (during elaboration) in a tasking program, a GP fault may occur as the program is exiting. The fault is harmless (all needed cleanup has been completed).
(Found in versions 3.1.1 thru 3.1.1d.)
- If a private type derived from a tagged type which has a subprogram with a controlling access parameter, overriding of the subprogram may not happen properly. The result could be that the program could get an 'undefined label' error when compiling; it could fail to link with an 'undefined entry'; or the routine could simply fail to be dispatched to.
(Found in versions 3.1.1 thru 3.1.1d.)
- If an object name containing a type conversion and following dot notation or indexing is passed to an In Out or Out parameter, additional junk code may be generated. This most commonly happens for components that are strings. Such a call could look like:
The junk code often is harmless (especially for small components), but it can cause trash to be written into heap-allocated items, including unrelated ones.Move (Source => New_Name, Target => Dialog_Type(Dialog).Item_Name);
(Found in versions 3.1.1 thru 3.1.1d.)
- If an unsupported 'Size clause is given on an array or record type, later operations on that type may cause compiler errors or even a compiler hang.
(Found in versions 3.1.1 thru 3.1.1d.)
- (Syntax) If the trailing '\' is omitted from the output path for pretty printed text, Syntax will use a garbage output file name. In particular, this causes the "AdaReformat" command in Jaws II to fail.
(Found in versions 3.1.1 thru 3.1.1d.)
- (Jaws II) (Windows 98 only) The output of compiles and links is not visible on Windows 98 (the output window is empty, although the compile or link runs). This only happens on Windows 98, not on Windows 95 or Windows NT. A patched version of Jaws II is available, click here to download it.
To install the patch, unzip the file into the compiler installation directory, overwriting the existing Jawsii.Exe file. An unzip utility can be found on disk 4 of the compiler installation disks if you don't have one.- (Jaws II) (Windows NT/2000 only) Jaws hangs when Open Project is used on Windows NT or Windows 2000. This problem does not happen on Windows 95 or 98. A patched version of Jaws II is available, click here to download it, and see the previous item for installation instructions.
- (Jaws II) (Windows only) The "Library" commands either are greyed out or show files in the root. This can be worked around by moving files in the compiler directory; see the FAQ.
- (Corder) Corder generates a spurious syntax error if a unit of the program contains a task type declaration with a discriminant part. This error is harmless unless a subunit stub appears after the task declaration (then the stub would be ignored and not compiled as needed).
(Found in versions 3.1.1 thru 3.1.1d.)
- If a generic formal specification contains a reference to 'Class of a formal type, the compiler may reject the program unnecessarily.
(Found in versions 3.1.1 thru 3.1.1d.)
- If a generic specification contains a type derived from a generic formal type, the type declared in an instantiation will match the actual type. This will cause type errors to be ignored, and may cause the wrong operators or subprograms to be called.
(Found in versions 3.1.1 thru 3.1.1d.)
- An illegal (ambiguous) program may compile successfully if a classwide routine is overloaded with a specific routine of another composite type and an unqualified aggregate is given in a call. The problem is harmless but would be a portability problem.
(Found in versions 3.1.1 thru 3.1.1d.)
- Ada.Text_IO.Set_Col(File, 1) incorrectly skips blank lines. Set_Col works properly when setting to other column numbers.
(Found in versions 3.1.1 thru 3.1.1d.)
- The compiler incorrect accepts abstract subprogram declarations in protected types, generic formal parts, and library unit declarations. These are not allowed by the standard.
(Found in versions 3.1.1 thru 3.1.1d.)
- A dereference of an In parameter used as the prefix of the Access attribute sometimes is incorrectly considered constant. You are most likely to see this bug when the prefix end with an explicit .all or an array reference with a dereference (explicit or implicit).
(Found in versions 3.1.1 thru 3.1.1d.)
- (Syntax) The /AT option causes identifiers to be written in upper case rather than title case.
(Found in versions 3.1.1 thru 3.1.1d.)
- (Syntax) Protected types and entry bodies pretty print with incorrect indentation.
(Found in versions 3.1.1 thru 3.1.1d.)
- (Windows only) If any directory in the path of a project is a long file name, or contains multiple dots or any spaces, the compiler, linker, assembler, and project manager may intermittently fail to work. This happens because Windows sometimes returns the short name in GetCurrentDirectory and sometimes the long name, confusing the project manager which expects names to be the same for each run. This problem prevents installing Janus/Ada 3.1.1 into a path with a long name, such as "Program Files", on Windows NT/2000/XP. (The problem can occur, but much less frequently, on Windows 95/98/ME).
(Found in versions 3.1.1 thru 3.1.1d.)
- If the first declaration of a visible child's private part references the full view of a private type in the parent, errors occur.
(Found in versions 3.1.1 thru 3.1.1d.)
- If a Component_Size clause is used to set an array to an unnatural (but still byte-aligned) size, bad code is generated.
(Found in versions 3.1.1 thru 3.1.1d.)
- If a discrete subtype is declared in a generic specification, and the bounds include an attribute of a formal type, then uses of the subtype from an instance may use the wrong bounds.
(Found in versions 3.1.1 thru 3.1.1d.)
- The sets in Ada.Strings.Maps.Constants are missing various Latin-1 letters (the ASCII portions are correct). As a workaround, use the similar functions in Ada.Characters.Handling, or the similar sets in Ada.Strings.Wide_Maps.Constants (except for Upper_Set, which inexplicably included lower case letters).
(Found in versions 3.1.1 thru 3.1.1d.)
- If a type is derived from a private type declared in the grandparent unit, and the parent unit have no private part, overriding does not work properly. The wrong routines may be called, or link errors may occur (if the grandparent has abstract routines). Work around the problem by adding a dummy private part to the parent unit.
(Found in versions 3.1.1 thru 3.1.1d.)
- If a package P.C is withed in some unit that is withed (but is not withed itself) in a unit U, and some child of the parent P is withed by U, P.C may be visible in U, meaning that references to it would not be detected as errors.
(Found in versions 3.1.1 thru 3.1.1d.)
- The Valid attribute can give incorrect results if the prefix contains entities with multiple definitions. (One example is if a record component C occurs in more than one record definition; the properties of any of the components named C might be used.)
(Found in versions 3.1.1 thru 3.1.1d.)
- If a named subtype is created for a classwide type (that is, subtype Sub is T'Class), the type is considered specific in various legality checks (including those checking for the legality of the profile of a primitive subprogram of a tagged type); this usually causes bogus error messages.
(Found in versions 3.1.1 thru 3.1.1d.)
- If a type includes a component of Unbounded_String, and the predefined equality is used for the type, it will always return False unless the same object is compared to itself. The value of the component does not matter. More generally, any private untagged type with a user-defined "=" whose full type is tagged will use the predefined rather than primitive equality.
(Found in versions 3.1.1 thru 3.1.1d.)
- If the PATH environment variable has more than 1023 characters, the entire PATH is ignored. This will have various effects: the most obvious is that the compiler will not run from other than its installation directory. This problem also will affect any program compiled with Janus/Ada that Opens files using the PATH.
(Found in versions 3.1.1 thru 3.1.1d.)
- If a classwide type is used as a formal type of a generic instantiation, and that generic exports a type that uses that formal type (such as an access type), the exported type will not act like a classwide type for resolution purposes.
(Found in versions 3.1.1 thru 3.1.1d.)
- If a generic formal type of unit G is used as a parameter of primitive operation of a tagged type declared in the unit G, those primitive operations will not work (producing garbage) if they are exported from an instance of G using an elementary type as the actual. This can be worked around by wrapping the elementary type in a record.
(Found in versions 3.1.1 thru 3.1.1d.)
- (Corder) If the Optional Path option (/O) is used, COrder fails to search for bodies in the current directory and on the search path. (Specifications and subunits are searched for properly.)
(Found in versions 3.1.1 thru 3.1.1d.)
- (JManager) If a a project is created in a path with one or more segments having a long name (more than 8 characters), and the case of the name is different than that used by the file system, Janus/Ada tools (including the compiler and especially COrder) may operate erratically.
(Found in versions 3.1.1 thru 3.1.1d.)
- If a record aggregate has a type that is a private extension or derived from a private type or extension, it is possible that Janus/Ada will accept the aggregate even though not all of the components are provided. In this case, the omitted components will be uninitialized garbage. All such aggregates are illegal as they violate 4.3.1(14) [which Janus/Ada did not check properly]. In many cases, an extension aggregate should be used instead.
(Found in versions 3.1.1 thru 3.1.1d.)
- (JDebug) If a non-exe file is debugged that is newer than the .DBG file, no error will be detected. In this case, "start" will do nothing and a "run" command will generate an internal error.
(Found in versions 3.1.1 thru 3.1.1d.)
- If a controlled aggregate is used to initialize an object in the specification where the type is declared, and the aggregate is qualified or parenthesized, a temporary object will be used in violation of 7.6(17.1/1); that will cause Program_Error to be raised. An easy workaround is to remove the parentheses and/or qualification; they cannot be required in this case.
(Found in versions 3.1.1 thru 3.1.1d.)
- An attempt to assign a discriminant of an in out or out parameter will succeed.
(Found in versions 3.1.1 thru 3.1.1d.)
- If a function call has a different dispatching status than the function result (for instance, a statically bound dispatching call with a classwide result), the compiler can become confused and generate the wrong kind of call. If the root function is abstract, this can result in link errors.
(Found in versions 3.1.1 thru 3.1.1d.)
- If 'Access of a class-wide object is passed to a controlling access parameter, the resulting code will fail (usually with a GP fault).
(Found in versions 3.1.1 thru 3.1.1d.)
- An instance using an access to implement whose full type is an array with an aliased component will fail to match the formal type. The only workarounds are to eliminate either the incomplete type or the "aliased" keyword (neither are likely to be practical).
(Found in versions 3.1.1 thru 3.1.1d.)
- If the result of a function call is directly returned as a float value, temporary storage used by the function call may not be freed, leading to Storage_Error being raised because of memory exhaustion. This is especially noticable for functions that return Long_Float values or any instance of a generic formal float type. A workaround is to evaluate the return expression into a local object, then return that object.
(Found in versions 3.1.1 thru 3.1.1d.)
- An attribute that is renamed as a subprogram or passed as a generic formal is required to statically conform, rather than the weaker mode conformance.
(Found in versions 3.1.1 thru 3.1.1d.)
- Generic instances with non-static subtypes as actuals, and renames of generic instances, are incorrectly rejected in Pure and Preelaborated units.
(Found in versions 3.1.1 thru 3.1.1d.)
- (Corder) Corder's parser does not support the optional unit name in pragma Elaborate_Body. A workaround is to remove the optional unit name.
(Found in versions 3.1.1 thru 3.1.1d.)
- If an exported subprogram contains elementary in out or out parameters, copy back of the parameters is performed incorrectly or not at all.
(Found in versions 3.1.1 thru 3.1.1d.)
- If a parameter or result of the actual subprogram of a generic formal subprogram is of a floating point type, and the instantiation occurs somewhere without other float operations (especially as a library-level instantiation), internal errors may result. The problem can be worked around by somewhere including a floating point operation [Kludge := 1.0; will work] in the unit surrounding the instantiation.
(Found in versions 3.1.1 thru 3.1.1d.)